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: restrict the use of specific presets to certain jobs #20946

Merged

Conversation

chewong
Copy link
Member

@chewong chewong commented Feb 22, 2021

Signed-off-by: Ernest Wong chuwon@microsoft.com

Addresses the second bullet point mentioned in kubernetes/k8s.io#1673 (comment)

/assign @spiffxp

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 22, 2021
@k8s-ci-robot k8s-ci-robot added 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. area/jobs sig/windows Categorizes an issue or PR as relevant to SIG Windows. labels Feb 22, 2021
@chewong chewong force-pushed the add-test-job-presets-restricted branch from 693f4bd to 7f5a76d Compare February 23, 2021 00:35
Copy link
Member

@spiffxp spiffxp left a comment

Choose a reason for hiding this comment

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

Thank you for doing this!

This is a great start, but doesn't prevent other job definitions from using the secrets defined in these presets.

I think you could blend this with the secret-based logic in TestTrustedJobSecretsRestricted if you add something that gathers secret names from a preset.

@chewong chewong force-pushed the add-test-job-presets-restricted branch 2 times, most recently from faaba2e to 340b50a Compare February 23, 2021 20:30
@chewong chewong changed the title test: only allow certain jobs to use certain labels/presets at presubmit time test: restrict the use of specific presets to certain jobs Feb 23, 2021
Copy link
Member

@spiffxp spiffxp left a comment

Choose a reason for hiding this comment

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

Getting close...

@chewong chewong requested a review from spiffxp February 24, 2021 00:33
Signed-off-by: Ernest Wong <chuwon@microsoft.com>
@chewong chewong force-pushed the add-test-job-presets-restricted branch from 2c64f8b to aba51c2 Compare February 24, 2021 17:39
@chewong chewong requested a review from spiffxp February 24, 2021 17:39
Copy link
Member

@spiffxp spiffxp left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chewong, spiffxp

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 Feb 24, 2021
@k8s-ci-robot k8s-ci-robot merged commit d52eca3 into kubernetes:master Feb 24, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.21 milestone Feb 24, 2021
@chewong chewong deleted the add-test-job-presets-restricted branch February 25, 2021 06:20
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. 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. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/testing Categorizes an issue or PR as relevant to SIG Testing. sig/windows Categorizes an issue or PR as relevant to SIG Windows. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants