Skip to content
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

feat(backend): Remove PipelineSpec Template storage from ObjStore responsibilies. Fixes #10509 #10790

Merged
merged 3 commits into from
Oct 3, 2024

Conversation

gmfrasca
Copy link
Member

@gmfrasca gmfrasca commented May 6, 2024

Description of your changes:
Fixes #10509

The PipelineSpec definition is currently stored in two places, DB and ObjStore, creating the potential for a competing source-of-truth problem. The ObjStore copy doesn't appear to actually be used/retrieved anywhere, so remove it from the list of responsibilities

Checklist:

@HumairAK
Copy link
Collaborator

HumairAK commented May 9, 2024

/test kubeflow-pipeline-backend-test

Copy link

@gmfrasca: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
kubeflow-pipeline-e2e-test 84ebbf7 link false /test kubeflow-pipeline-e2e-test
kubeflow-pipeline-backend-test 84ebbf7 link true /test kubeflow-pipeline-backend-test
kubeflow-pipeline-upgrade-test 32c5462 link false /test kubeflow-pipeline-upgrade-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

…ponsibilies. Fixes kubeflow#10509

Signed-off-by: Giulio Frasca <gfrasca@redhat.com>
Signed-off-by: Giulio Frasca <gfrasca@redhat.com>
Comment on lines 1527 to 1538

// Switch to a bad object store
manager.objectStore = &FakeBadObjectStore{}

// Delete the above pipeline_version.
err = manager.DeletePipelineVersion(FakeUUIDOne)
assert.NotNil(t, err)

// Verify the version in deleting status.
version, err := manager.pipelineStore.GetPipelineVersionWithStatus(FakeUUIDOne, model.PipelineVersionDeleting)
assert.Nil(t, err)
assert.NotNil(t, version)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it didn't jump out at me why this entire block is being deleted. Is there nothing here test-worthy if the object store storage goes away? Specifically wondering if it makes sense to keep the check of the deleting status.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, this specific test can probably remain, albeit the expected results are now the exact opposite: the RM should not throw an error if the ObjStore is bad, should be able to delete the pipelineversion, and the pipelineversion should not exist after performing the delete operation (essentially flip the asserts in L1533, L1537, and L1538)

PipelineId: DefaultFakeUUID,
Name: "pipeline_version",
PipelineId: DefaultFakeUUID,
PipelineSpec: "apiVersion: argoproj.io/v1alpha1\nkind: Workflow",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how is this related to this PR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a mock PipelineSpec isn't provided, the Mock ResourceManager will attempt to fetch the spec from ObjectStore which will break as it no longer is uploaded there. This behavior only exists in the test RM, I believe

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep:

PipelineSpec: pipelineSpec.String,
this is now fetched from the PipelineSpec column in the DB.

…k ObjStore

- Add PipelineSpec to mock PVs as they are no longer retrieved from
  ObjStore

Signed-off-by: Giulio Frasca <gfrasca@redhat.com>
@gregsheremeta
Copy link
Contributor

what's the status of this? Just need reviews?

@gmfrasca
Copy link
Member Author

what's the status of this? Just need reviews?

yes, believe so

Copy link
Contributor

@hbelmiro hbelmiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@HumairAK
Copy link
Collaborator

HumairAK commented Oct 3, 2024

Confirmed this with pre-existing pipelines, they continue to be fetched successfully. New pipelines as well, and they are not stored in the object store. Great work!

/lgtm
/approve

Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: HumairAK

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit 374b18b into kubeflow:master Oct 3, 2024
12 checks passed
@HumairAK
Copy link
Collaborator

HumairAK commented Oct 3, 2024

@gmfrasca this now has decoupled api server from the object store, can we update the docs here:

https://github.com/kubeflow/website/blob/master/content/en/docs/components/pipelines/operator-guides/configure-object-store.md

I think we can basically remove the entire first section

fyi @chensun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature] Store Pipeline IR in database, not object storage
4 participants