-
Notifications
You must be signed in to change notification settings - Fork 20
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
Improve Prow test dumper script to crosscheck settings with GitHub branchprotections #915
Improve Prow test dumper script to crosscheck settings with GitHub branchprotections #915
Conversation
/hold |
Improve prow-test-dumper.py not only to dump test settings from prow config.yaml, to actually crosscheck versus GitHub branch protections. This highlights any mismatches we might have, accounting for both missing but also extra checks. Also, set defaults to metal3-io file locations so --job-dir and --config do not need to be input in our use case. GITHUB_TOKEN with maintainer read rights must be exported in env, or supplied with --token to do this. If token is not found, old behavior of just dumping the config is done, but no crosschecking. Using token with invalid/missing rights error out. Signed-off-by: Tuomo Tanskanen <[email protected]>
35bfbdd
to
2a8c4ad
Compare
/unhold /cc @kashifest @lentzi90 |
/override metal3-ubuntu-e2e-integration-test-main |
@tuminoid: Overrode contexts on behalf of tuminoid: metal3-ubuntu-e2e-integration-test-main In response to this:
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-sigs/prow repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
Works well without github token at least :)
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lentzi90 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 |
Output with token and a failing config:
|
/cc @smoshiur1237 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Improve
prow_test_dumper.py
not only to dump test settings from Prow'sconfig.yaml
, to actually crosscheck versus GitHub branch protections. This highlights any mismatches we might have, accounting for both missing but also extra checks.Also, set defaults to metal3-io file locations so
--job-dir
and--config
do not need to be input in our use case. Make--config
also flag and not positional arg.GITHUB_TOKEN
must be exported or supplied via--token
, and it must have maintainer rights to read branchprotection settings. Using token without sufficient rights lead to erroring out.This reveals we have one misconfigured branch in CAPM3/release-1.6 branch (irrelevant as it is EOS, not fixing it until this is merged, so it can work as POC this works).
Output in case of misconfigs: