Skip to content

feat(component): Refactors sync.py to use json templates for resources. Fixes #11851 #11858

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

grudloffev
Copy link

@grudloffev grudloffev commented Apr 25, 2025

Description of your changes:

This PR introduces a refactor to the sync.py file, making the loading of the desired resources completely dynamic by reading the list of resources from a template json file. Moreover, an additional template (empty by default) is also available to pass additional resources in case one would like to do so with kustomize.

Fixes #11851

How is this achieved?

  • The desired_resources object is populated through a function, which reads the resources from json templates, where variables to be replaced are indicated with double curly braces.
  • The templates are mounted jointly with the sync.py via a ConfigMap.
  • This PR builds on top of feat(components): dynamically compute expected value in Profile Controller: Fixes #11828 #11849, and therefore the expected numbers for each kind of resources are not hardcoded and are computed dynamically from desired_resources.

Checklist:

Copy link

Hi @grudloffev. Thanks for your PR.

I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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/test-infra repository.

@google-oss-prow google-oss-prow bot requested review from gkcalat and zijianjoy April 25, 2025 12:54
Copy link

🚫 This command cannot be processed. Only organization members or owners can use the commands.

@grudloffev grudloffev changed the title feat(component): Refactors sync.py to use json templates for resources. Fixes #11828 WIP: feat(component): Refactors sync.py to use json templates for resources. Fixes #11828 Apr 25, 2025
@grudloffev
Copy link
Author

Changes to WIP, as fixing the test has not been done yet.

@grudloffev grudloffev changed the title WIP: feat(component): Refactors sync.py to use json templates for resources. Fixes #11828 WIP: feat(component): Refactors sync.py to use json templates for resources. Fixes #11851 Apr 25, 2025
@grudloffev
Copy link
Author

All tests are failing on current main branch😞

@grudloffev
Copy link
Author

grudloffev commented Apr 28, 2025

Confirmed regression source by rolling back to a6b944b894a4a297a6310f5028a8c27e3603ac16 (Commit before the metacontroller update) and then rolling forward to ebaaf756319ac4ac9498aca5f7dfb3978ff36496 (Metacontroller update), and on the former all tests pass while on the later they all fail.

@grudloffev grudloffev changed the title WIP: feat(component): Refactors sync.py to use json templates for resources. Fixes #11851 feat(component): Refactors sync.py to use json templates for resources. Fixes #11851 Apr 28, 2025
@grudloffev
Copy link
Author

Tests are passing now

@grudloffev
Copy link
Author

Fixes #11859

@hbelmiro
Copy link
Contributor

/ok-to-test

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.

@grudloffev
Copy link
Author

@grudloffev Can you please sign off your commits?

My bad, I missed one. I think it is good now

@hbelmiro
Copy link
Contributor

/ok-to-test

@hbelmiro
Copy link
Contributor

/unhold

Copy link

Approvals successfully granted for pending runs.

@grudloffev
Copy link
Author

related issue #10904

Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign humairak for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

/ok-to-test

Copy link

Approvals successfully granted for pending runs.

@hbelmiro
Copy link
Contributor

/ok-to-test

Copy link

Approvals successfully granted for pending runs.

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] Metacontroller resource list loaded from ConfigMap
2 participants