Skip to content

Conversation

hbelmiro
Copy link
Contributor

@hbelmiro hbelmiro commented Apr 15, 2025

Description of your changes:
Resolves: #11840
This PR adds the option to enable/disable cache globally.

How to test

Deploy KFP with the CACHEENABLED environment variable set to "false" in the API Server deployment.

spec:
  template:
    spec:
      containers:
      - env:
        - name: CACHEENABLED
          value: "false"

Run a pipeline twice. The second run should not use the cache.

Checklist:

Copy link

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@google-oss-prow google-oss-prow bot requested review from gkcalat and rimolive April 15, 2025 18:18
@hbelmiro hbelmiro force-pushed the cache-config branch 5 times, most recently from 7e2b253 to d4957a3 Compare April 21, 2025 14:08
@hbelmiro hbelmiro changed the title WIP: Add an option to enable/disable cache globally WIP: feat(backend): add the option to enable/disable cache globally Apr 21, 2025
@hbelmiro hbelmiro changed the title WIP: feat(backend): add the option to enable/disable cache globally feat(backend): add the option to enable/disable cache globally Apr 21, 2025
@hbelmiro hbelmiro marked this pull request as ready for review April 21, 2025 14:44
@google-oss-prow google-oss-prow bot requested review from DharmitD and HumairAK April 21, 2025 14:44
@hbelmiro hbelmiro force-pushed the cache-config branch 2 times, most recently from 774c968 to 0683e55 Compare April 22, 2025 12:24
@hbelmiro
Copy link
Contributor Author

hbelmiro commented Apr 25, 2025

@rimolive regarding the changes in the PVC name, I added them because I ran all the tests with cache disabled just to see if I had done all the needed changes. When cache is disabled the PVC names conflict with each other.
I thought it would be better to leave them with different names. Not a strong opinion though. That's totally optional.

@rimolive
Copy link
Member

/lgtm

Copy link
Member

@gmfrasca gmfrasca left a comment

Choose a reason for hiding this comment

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

Tested as per PR instructions, including running a Pipeline and then cloning the run, with CACHEENABLED env var in API Server Deployment set to false, true, and unset (defaults to caching enabled). Verified expected behavior in all cases.

/lgtm

@google-oss-prow google-oss-prow bot added size/XXL and removed size/XL labels May 7, 2025
@hbelmiro hbelmiro marked this pull request as ready for review May 7, 2025 17:59
@hbelmiro
Copy link
Contributor Author

hbelmiro commented May 7, 2025

@mprahl all comments addressed/answered.
Can you please take another look?

Copy link
Collaborator

@mprahl mprahl left a comment

Choose a reason for hiding this comment

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

/lgtm

hbelmiro and others added 10 commits May 7, 2025 16:46
Signed-off-by: Helber Belmiro <helber.belmiro@gmail.com>
Signed-off-by: Helber Belmiro <helber.belmiro@gmail.com>
Co-authored-by: Giulio Frasca <giulio.m.frasca@gmail.com>
Signed-off-by: Helber Belmiro <helber.belmiro@gmail.com>
Signed-off-by: Helber Belmiro <helber.belmiro@gmail.com>
Signed-off-by: Helber Belmiro <helber.belmiro@gmail.com>
Signed-off-by: Helber Belmiro <helber.belmiro@gmail.com>
Co-authored-by: Matt Prahl <mprahl@users.noreply.github.com>
Signed-off-by: Helber Belmiro <helber.belmiro@gmail.com>
Co-authored-by: Matt Prahl <mprahl@users.noreply.github.com>
Signed-off-by: Helber Belmiro <helber.belmiro@gmail.com>
Signed-off-by: Helber Belmiro <helber.belmiro@gmail.com>
Signed-off-by: Helber Belmiro <helber.belmiro@gmail.com>
Copy link
Collaborator

@mprahl mprahl left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@google-oss-prow google-oss-prow bot added the lgtm label May 7, 2025
Copy link

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

@hbelmiro
Copy link
Contributor Author

hbelmiro commented May 8, 2025

/retest

@google-oss-prow google-oss-prow bot merged commit 9aebb62 into kubeflow:master May 8, 2025
68 of 75 checks passed
@hbelmiro hbelmiro deleted the cache-config branch May 8, 2025 12:45
hbelmiro added a commit to hbelmiro/data-science-pipelines that referenced this pull request May 28, 2025
…low#11831)

* feat(backend): add the option to enable/disable cache globally

Signed-off-by: Helber Belmiro <helber.belmiro@gmail.com>

* chore(backend): added logging when cache is disabled globally

Signed-off-by: Helber Belmiro <helber.belmiro@gmail.com>

* Update backend/src/apiserver/resource/resource_manager.go

Co-authored-by: Giulio Frasca <giulio.m.frasca@gmail.com>
Signed-off-by: Helber Belmiro <helber.belmiro@gmail.com>

* chore(backend): Fixed Scheduled Workflows

Signed-off-by: Helber Belmiro <helber.belmiro@gmail.com>

* chrore(backend): Added integration tests

Signed-off-by: Helber Belmiro <helber.belmiro@gmail.com>

* chrore(backend): Removed container arg when --cache_enabled is true

Signed-off-by: Helber Belmiro <helber.belmiro@gmail.com>

* Update backend/src/v2/cmd/driver/main.go

Co-authored-by: Matt Prahl <mprahl@users.noreply.github.com>
Signed-off-by: Helber Belmiro <helber.belmiro@gmail.com>

* Update backend/src/v2/cmd/compiler/main.go

Co-authored-by: Matt Prahl <mprahl@users.noreply.github.com>
Signed-off-by: Helber Belmiro <helber.belmiro@gmail.com>

* chrore(backend): Renamed to CacheDisabled and removed pointers

Signed-off-by: Helber Belmiro <helber.belmiro@gmail.com>

* chrore(backend): Added Argo compiler unit test with the cache disabled

Signed-off-by: Helber Belmiro <helber.belmiro@gmail.com>

---------

Signed-off-by: Helber Belmiro <helber.belmiro@gmail.com>
Co-authored-by: Giulio Frasca <giulio.m.frasca@gmail.com>
Co-authored-by: Matt Prahl <mprahl@users.noreply.github.com>

(cherry picked from commit 9aebb62)
Signed-off-by: Helber Belmiro <helber.belmiro@gmail.com>
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] Add the option to enable/disable cache globally
5 participants