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

[test][int][multikueue] Ignore error on config namespace multiple creation. #3146

Conversation

trasc
Copy link
Contributor

@trasc trasc commented Sep 26, 2024

What type of PR is this?

/kind bug
/kind failing-test
/kind flake

What this PR does / why we need it:

[test][int][multikueue] Ignore error on config namespace multiple creation.

Ignore Already Exists error when creating the kueue config namespace.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

none

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. kind/flake Categorizes issue or PR as related to a flaky test. labels Sep 26, 2024
@k8s-ci-robot k8s-ci-robot added 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. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 26, 2024
Copy link

netlify bot commented Sep 26, 2024

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit 791d171
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/66f6314014f648000895ad86

@@ -213,7 +213,7 @@ func managerAndMultiKueueSetup(ctx context.Context, mgr manager.Manager, gcInter
Name: "kueue-system",
},
}
gomega.Expect(mgr.GetClient().Create(ctx, managersConfigNamespace)).To(gomega.Succeed())
gomega.Expect(client.IgnoreAlreadyExists(mgr.GetClient().Create(ctx, managersConfigNamespace))).To(gomega.Succeed())
Copy link
Member

Choose a reason for hiding this comment

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

Could we just check if the kueue-system does not found in the cluster before we try to create the namespace?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can , but we'll need to use the APIReader of the manager since at this point the cache is not yet started, it might decrease a bit the performance... anyway.

Done

Copy link
Contributor

@mimowo mimowo Sep 26, 2024

Choose a reason for hiding this comment

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

but could we then have a race condition - that we checked and it wasn't there, but it is created a couple of ms later?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this particular test no, the create attempts are done once before the top level specs there is plenty of time in between.

From a generic API POV it could be, and it's a good point for attempting to create it and ignoring the "AlreadyExists" errors.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tenzen-y @mimowo let me know what you think it's the best way to go.

Copy link
Contributor

@mimowo mimowo Sep 26, 2024

Choose a reason for hiding this comment

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

But could we call managerAndMultiKueueSetup sequentially in this case. I suppose the time gain is negligible here, but it increases complexity. Is this changed by the recent manager integration reuse PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But could we call managerAndMultiKueueSetup sequentially in this case.

The calls are far apart, One when the suite with GC is starting one when the one without GC starts.
(For ginkgo parallel runs it happens in different OS processes using different clusters ).

Is this changed by the recent manager integration reuse PR?

Yes previously the envtest "clusters" wold have bean recreated.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok another option. Could we create the namespace before calling the function? It is a core namespace for kueue so sounds reasonable to be present before the manager starts

Copy link
Contributor Author

@trasc trasc Sep 26, 2024

Choose a reason for hiding this comment

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

That will be somewhere in the framework or extend the framework pass yet another init function.... it's kind of overkill since this is the only place we need it.

EDIT:
done

Copy link
Member

Choose a reason for hiding this comment

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

@trasc @mimowo Thank you for moving this forward. That sounds good to me.

@trasc
Copy link
Contributor Author

trasc commented Sep 26, 2024

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 27, 2024
@mimowo
Copy link
Contributor

mimowo commented Sep 27, 2024

/lgtm
/approve
Thanks!

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

LGTM label has been added.

Git tree hash: a3dcae289fc21721cde3519a40a185bedb9a7e96

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mimowo, 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 merged commit 425ece1 into kubernetes-sigs:main Sep 27, 2024
16 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.9 milestone Sep 27, 2024
@mbobrovskyi mbobrovskyi deleted the integration-mk-config-namespace-recreate branch September 27, 2024 06:34
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/bug Categorizes issue or PR as related to a bug. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. kind/flake Categorizes issue or PR as related to a flaky test. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants