-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix(backend/sdk): Fix REST API outputs for pipeline versions with invalid platform specs #12183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(backend/sdk): Fix REST API outputs for pipeline versions with invalid platform specs #12183
Conversation
An empty platform spec causes a bug where the REST API will not return a pipeline spec because it errantly thinks the empty platform spec is the pipeline spec. Signed-off-by: mprahl <[email protected]>
add081d
to
31f3fd0
Compare
When a platform spec did not contain a `kubernetes` platform when defined as a Kubernetes manifest (e.g. `spec.platformSpec: {}`), `YamlStringToPipelineSpecStruct` was errantly detecting it as the pipeline spec when outputting the pipeline version through the REST API. This caused the REST API to not return a pipeline spec in the case of it being empty, and caused the UI to load the pipeline and to properly create a run. The solution is when translating from the Kubernetes object to a model representation, the invalid platform specs are not included. This allows for proper REST API output while also not modifying the user's spec in the mutating webhook which would cause GitOps tools to always reconcile. Signed-off-by: mprahl <[email protected]>
31f3fd0
to
e5000f6
Compare
/lgtm |
/approve Thanks @VaniHaripriya ! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mprahl The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…alid platform specs (kubeflow#12183) * Fix REST API outputs for pipeline versions with invalid platform specs When a platform spec did not contain a `kubernetes` platform when defined as a Kubernetes manifest (e.g. `spec.platformSpec: {}`), `YamlStringToPipelineSpecStruct` was errantly detecting it as the pipeline spec when outputting the pipeline version through the REST API. This caused the REST API to not return a pipeline spec in the case of it being empty, and caused the UI to load the pipeline and to properly create a run. The solution is when translating from the Kubernetes object to a model representation, the invalid platform specs are not included. This allows for proper REST API output while also not modifying the user's spec in the mutating webhook which would cause GitOps tools to always reconcile. Signed-off-by: mprahl <[email protected]> --------- Signed-off-by: mprahl <[email protected]> (cherry picked from commit 3ea6b60)
…alid platform specs (kubeflow#12183) * Fix REST API outputs for pipeline versions with invalid platform specs When a platform spec did not contain a `kubernetes` platform when defined as a Kubernetes manifest (e.g. `spec.platformSpec: {}`), `YamlStringToPipelineSpecStruct` was errantly detecting it as the pipeline spec when outputting the pipeline version through the REST API. This caused the REST API to not return a pipeline spec in the case of it being empty, and caused the UI to load the pipeline and to properly create a run. The solution is when translating from the Kubernetes object to a model representation, the invalid platform specs are not included. This allows for proper REST API output while also not modifying the user's spec in the mutating webhook which would cause GitOps tools to always reconcile. Signed-off-by: mprahl <[email protected]> --------- Signed-off-by: mprahl <[email protected]> (cherry picked from commit 3ea6b60)
…versions with invalid platform specs (kubeflow#12183) * Fix REST API outputs for pipeline versions with invalid platform specs When a platform spec did not contain a `kubernetes` platform when defined as a Kubernetes manifest (e.g. `spec.platformSpec: {}`), `YamlStringToPipelineSpecStruct` was errantly detecting it as the pipeline spec when outputting the pipeline version through the REST API. This caused the REST API to not return a pipeline spec in the case of it being empty, and caused the UI to load the pipeline and to properly create a run. The solution is when translating from the Kubernetes object to a model representation, the invalid platform specs are not included. This allows for proper REST API output while also not modifying the user's spec in the mutating webhook which would cause GitOps tools to always reconcile. Signed-off-by: mprahl <[email protected]> --------- Signed-off-by: mprahl <[email protected]> (cherry picked from commit 3ea6b60)
…alid platform specs (kubeflow#12183) * Skip setting spec.platformSpec when platform spec is empty An empty platform spec causes a bug where the REST API will not return a pipeline spec because it errantly thinks the empty platform spec is the pipeline spec. Signed-off-by: mprahl <[email protected]> * Fix REST API outputs for pipeline versions with invalid platform specs When a platform spec did not contain a `kubernetes` platform when defined as a Kubernetes manifest (e.g. `spec.platformSpec: {}`), `YamlStringToPipelineSpecStruct` was errantly detecting it as the pipeline spec when outputting the pipeline version through the REST API. This caused the REST API to not return a pipeline spec in the case of it being empty, and caused the UI to load the pipeline and to properly create a run. The solution is when translating from the Kubernetes object to a model representation, the invalid platform specs are not included. This allows for proper REST API output while also not modifying the user's spec in the mutating webhook which would cause GitOps tools to always reconcile. Signed-off-by: mprahl <[email protected]> --------- Signed-off-by: mprahl <[email protected]> (cherry picked from commit 3ea6b60)
…alid platform specs (kubeflow#12183) * Skip setting spec.platformSpec when platform spec is empty An empty platform spec causes a bug where the REST API will not return a pipeline spec because it errantly thinks the empty platform spec is the pipeline spec. Signed-off-by: mprahl <[email protected]> * Fix REST API outputs for pipeline versions with invalid platform specs When a platform spec did not contain a `kubernetes` platform when defined as a Kubernetes manifest (e.g. `spec.platformSpec: {}`), `YamlStringToPipelineSpecStruct` was errantly detecting it as the pipeline spec when outputting the pipeline version through the REST API. This caused the REST API to not return a pipeline spec in the case of it being empty, and caused the UI to load the pipeline and to properly create a run. The solution is when translating from the Kubernetes object to a model representation, the invalid platform specs are not included. This allows for proper REST API output while also not modifying the user's spec in the mutating webhook which would cause GitOps tools to always reconcile. Signed-off-by: mprahl <[email protected]> --------- Signed-off-by: mprahl <[email protected]> (cherry picked from commit 3ea6b60)
* fix(sdk): Set spec.description when compiling to Kubernetes manifests (#12132) Signed-off-by: mprahl <[email protected]> (cherry picked from commit 1a0c52c) * fix(tools): Fix a typo in convert_to_k8s_format (#12161) Previously, display name was being set incorrectly in the metadata field. Signed-off-by: mprahl <[email protected]> (cherry picked from commit c5038b8) * fix(backend): Fix mutating webhook when pipeline name label value is too long (#12162) * Fix mutating webhook when pipeline name label value is too long This just truncates the label value to 63 characters if it's too long. Since this is a label for convenience and not relied upon in the code for filtering, this is a safe change. Signed-off-by: mprahl <[email protected]> * Free up disk space on upgrade tests to fix CI flakes Signed-off-by: mprahl <[email protected]> --------- Signed-off-by: mprahl <[email protected]> (cherry picked from commit 7d6722e) * fix(backend): Return from pipeline deletions after the cache is updated (#12153) In Kubernetes native API mode, the REST API could delete a pipeline version but the cache could not have updated by the time the API call returns. This adds a 3 second or less polling to ensure the cache gets updated for a smooth user experience. Signed-off-by: mprahl <[email protected]> (cherry picked from commit 5870906) * fix(backend/sdk): Fix REST API outputs for pipeline versions with invalid platform specs (#12183) * Skip setting spec.platformSpec when platform spec is empty An empty platform spec causes a bug where the REST API will not return a pipeline spec because it errantly thinks the empty platform spec is the pipeline spec. Signed-off-by: mprahl <[email protected]> * Fix REST API outputs for pipeline versions with invalid platform specs When a platform spec did not contain a `kubernetes` platform when defined as a Kubernetes manifest (e.g. `spec.platformSpec: {}`), `YamlStringToPipelineSpecStruct` was errantly detecting it as the pipeline spec when outputting the pipeline version through the REST API. This caused the REST API to not return a pipeline spec in the case of it being empty, and caused the UI to load the pipeline and to properly create a run. The solution is when translating from the Kubernetes object to a model representation, the invalid platform specs are not included. This allows for proper REST API output while also not modifying the user's spec in the mutating webhook which would cause GitOps tools to always reconcile. Signed-off-by: mprahl <[email protected]> --------- Signed-off-by: mprahl <[email protected]> (cherry picked from commit 3ea6b60) * fix(backend): Add support for additional filters on the Kubernetes native API (#12189) * Add support for additional filters on the Kubernetes native API This adds support for eq, neq, and in filters. Signed-off-by: mprahl <[email protected]> * Fix filter mapping in Kubernetes native API Signed-off-by: mprahl <[email protected]> --------- Signed-off-by: mprahl <[email protected]> (cherry picked from commit 947a988) --------- Signed-off-by: mprahl <[email protected]>
…alid platform specs (kubeflow#12183) * Skip setting spec.platformSpec when platform spec is empty An empty platform spec causes a bug where the REST API will not return a pipeline spec because it errantly thinks the empty platform spec is the pipeline spec. Signed-off-by: mprahl <[email protected]> * Fix REST API outputs for pipeline versions with invalid platform specs When a platform spec did not contain a `kubernetes` platform when defined as a Kubernetes manifest (e.g. `spec.platformSpec: {}`), `YamlStringToPipelineSpecStruct` was errantly detecting it as the pipeline spec when outputting the pipeline version through the REST API. This caused the REST API to not return a pipeline spec in the case of it being empty, and caused the UI to load the pipeline and to properly create a run. The solution is when translating from the Kubernetes object to a model representation, the invalid platform specs are not included. This allows for proper REST API output while also not modifying the user's spec in the mutating webhook which would cause GitOps tools to always reconcile. Signed-off-by: mprahl <[email protected]> --------- Signed-off-by: mprahl <[email protected]>
…alid platform specs (kubeflow#12183) * Skip setting spec.platformSpec when platform spec is empty An empty platform spec causes a bug where the REST API will not return a pipeline spec because it errantly thinks the empty platform spec is the pipeline spec. Signed-off-by: mprahl <[email protected]> * Fix REST API outputs for pipeline versions with invalid platform specs When a platform spec did not contain a `kubernetes` platform when defined as a Kubernetes manifest (e.g. `spec.platformSpec: {}`), `YamlStringToPipelineSpecStruct` was errantly detecting it as the pipeline spec when outputting the pipeline version through the REST API. This caused the REST API to not return a pipeline spec in the case of it being empty, and caused the UI to load the pipeline and to properly create a run. The solution is when translating from the Kubernetes object to a model representation, the invalid platform specs are not included. This allows for proper REST API output while also not modifying the user's spec in the mutating webhook which would cause GitOps tools to always reconcile. Signed-off-by: mprahl <[email protected]> --------- Signed-off-by: mprahl <[email protected]> (cherry picked from commit 3ea6b60)
…alid platform specs (kubeflow#12183) * Skip setting spec.platformSpec when platform spec is empty An empty platform spec causes a bug where the REST API will not return a pipeline spec because it errantly thinks the empty platform spec is the pipeline spec. Signed-off-by: mprahl <[email protected]> * Fix REST API outputs for pipeline versions with invalid platform specs When a platform spec did not contain a `kubernetes` platform when defined as a Kubernetes manifest (e.g. `spec.platformSpec: {}`), `YamlStringToPipelineSpecStruct` was errantly detecting it as the pipeline spec when outputting the pipeline version through the REST API. This caused the REST API to not return a pipeline spec in the case of it being empty, and caused the UI to load the pipeline and to properly create a run. The solution is when translating from the Kubernetes object to a model representation, the invalid platform specs are not included. This allows for proper REST API output while also not modifying the user's spec in the mutating webhook which would cause GitOps tools to always reconcile. Signed-off-by: mprahl <[email protected]> --------- Signed-off-by: mprahl <[email protected]> (cherry picked from commit 3ea6b60)
Description of your changes:
See each commit for details.
Checklist: