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

[jobframework] Only check if the owner is managed for enabled integrations. #2493

Merged
merged 6 commits into from
Jul 12, 2024

Conversation

trasc
Copy link
Contributor

@trasc trasc commented Jun 27, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

Only check if the owner of a job is managed against the list of jobs integrations currently enabled .

Which issue(s) this PR fixes:

Fixes #2481

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Allow usage of the pod integration for pods belonging to jobs that Kueue supports, if the support for the job type is explicitly disabled

@k8s-ci-robot
Copy link
Contributor

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

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 27, 2024
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 27, 2024
Copy link

netlify bot commented Jun 27, 2024

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit a31adae
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/6691417fe61ac500089b1c99

@trasc
Copy link
Contributor Author

trasc commented Jun 27, 2024

/test all

@trasc trasc marked this pull request as ready for review June 27, 2024 18:08
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 27, 2024
@trasc
Copy link
Contributor Author

trasc commented Jun 27, 2024

/retest

@mimowo
Copy link
Contributor

mimowo commented Jul 8, 2024

/assign

Copy link
Contributor

@mimowo mimowo left a comment

Choose a reason for hiding this comment

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

Implementation lgtm. Question related to improving reliability by an integration level test, which would cover the change in SetupControllers.

pkg/controller/jobframework/setup.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 9, 2024
@mimowo
Copy link
Contributor

mimowo commented Jul 10, 2024

/lgtm
/assign @alculquicondor

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 10, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 5b8b87cd12688d45b899edfe7a71db8c79d94b35

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 11, 2024
@k8s-ci-robot k8s-ci-robot requested a review from mimowo July 11, 2024 04:24
@alculquicondor
Copy link
Contributor

/release-note-edit

Allow usage of the pod integration for pods belonging to jobs that Kueue supports, if the support for the job type is explicitly disabled


// EnableIntegrationsForTest - should be used only in tests
// Mark the frameworks identified by names and return a revert function.
func EnableIntegrationsForTest(tb testing.TB, names ...string) func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe for a follow up, but I would prefer that, instead, we get rid of the manager as a global variable and pass it to the functions or store it in the structs that need it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not a fan of global states, however in this case when we are doing init bases framework registration this is our best option.

Copy link
Contributor

Choose a reason for hiding this comment

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

It can still be done differently. There could be one DefaultIntegrationManager that the implementations can register to.

But, you still can pass a different manager to the objects that need it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure it could have been done in a different way, but it was done like this a long time ago and reviewed at that time.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, but, at that time, we were not modifying it in tests.

pkg/controller/jobframework/integrationmanager_test.go Outdated Show resolved Hide resolved
pkg/controller/jobs/pod/pod_controller_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@alculquicondor alculquicondor 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

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 12, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: ab20814953f829dba2144f872197f1081f81772c

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alculquicondor, trasc

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 12, 2024
@k8s-ci-robot k8s-ci-robot merged commit 6248b58 into kubernetes-sigs:main Jul 12, 2024
16 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.8 milestone Jul 12, 2024
@trasc trasc deleted the owner-integration-disabled branch July 12, 2024 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow usage of plain Pod owned by integrations that are disabled
5 participants