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

generate-jobs: handle generate section key #34366

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

Conversation

bart0sh
Copy link
Contributor

@bart0sh bart0sh commented Feb 19, 2025

  • Implemented generation for the job types mentioned in the generate key for a certain section in the config file
  • Added a new job node-e2e-containerd-2-0-dra-canary as an example of this feature

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 19, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: bart0sh
Once this PR has been reviewed and has the lgtm label, please assign bentheelder for approval. For more information see the 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

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. area/config Issues or PRs related to code in /config area/jobs labels Feb 19, 2025
@k8s-ci-robot k8s-ci-robot added the sig/node Categorizes an issue or PR as relevant to SIG Node. label Feb 19, 2025
@k8s-ci-robot k8s-ci-robot added the sig/testing Categorizes an issue or PR as relevant to SIG Testing. label Feb 19, 2025
@bart0sh
Copy link
Contributor Author

bart0sh commented Feb 19, 2025

/sig node
/cc @pohly

@k8s-ci-robot k8s-ci-robot requested a review from pohly February 19, 2025 11:30
@bart0sh bart0sh force-pushed the PR072-add-pull-kubernetes-node-e2e-containerd-2-0-dra-canary-job branch 2 times, most recently from a4c6ea0 to 03dfe69 Compare February 19, 2025 12:09

# This job runs the same tests as ci-node-e2e-crio-dra with Containerd 2.0 runtime
[node-e2e-containerd-2-0-dra]
skip = ci,presubmit
Copy link
Contributor

Choose a reason for hiding this comment

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

The main use case is to generate only "canary" jobs, right? Would the opposite (an explicit allow list) make this more obvious?

generate = canary

If unset, all types get generated. If empty, nothing gets generated. May be useful to temporarily prevent generating something.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The main use case is to generate only "canary" jobs, right?

I thought that it can be used to skip only ci jobs if we want to gradually propagate changes to canary, then to presubmit and at the end - to ci.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If unset, all types get generated. If empty, nothing gets generated. May be useful to temporarily prevent generating something.

I think the current approach is more explicit, e.g. skip = canary,presubmit,ci looks more clear to me than generate = "". Probably just a matter of taste.

Copy link
Contributor

Choose a reason for hiding this comment

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

If we have tested something as canary, then we don't need the immediate step with canary+presubmit because we already test the job as a presubmit. We don't want tests to run only in presubmits, so permanently generating only those without ever adding the periodic jobs also doesn't make sense.

That leaves these two scenarios:

skip = ci,presubmit # only canary
skip = ci,canary,presubmit # disable generation

The alternative is:

generate = canary # no comment needed here, self-explanatory
generate = # disable generation

Not sure. Anyone else have an opinion?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

It's perhaps worth adding that "only canary" is going to be the more common case by far. "Disable generation" was an afterthought.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. PTAL.

@bart0sh bart0sh force-pushed the PR072-add-pull-kubernetes-node-e2e-containerd-2-0-dra-canary-job branch 2 times, most recently from 2972a01 to 878fae0 Compare February 19, 2025 17:25
@bart0sh bart0sh changed the title generate-jobs: handle skip section key generate-jobs: handle generate section key Feb 19, 2025
bart0sh and others added 2 commits February 19, 2025 21:33
Implemented generation only job types mentioned in the `generate`
key for a certain section in the config file.
If unset, all types get generated. If empty, nothing gets generated.

Co-Authored-By: Patrick Ohly <[email protected]>
@bart0sh bart0sh force-pushed the PR072-add-pull-kubernetes-node-e2e-containerd-2-0-dra-canary-job branch from 878fae0 to 2ba537c Compare February 19, 2025 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/config Issues or PRs related to code in /config area/jobs cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
Status: PRs - Needs Reviewer
Development

Successfully merging this pull request may close these issues.

3 participants