-
Notifications
You must be signed in to change notification settings - Fork 2k
Machine-write all Prow job config YAMLs #1265
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
Machine-write all Prow job config YAMLs #1265
Conversation
|
/assign @stevekuznetsov Some correctness-supporting material:
|
|
Especially with the code migration for the generator... Let's get the reformatter/determinizer checked in to the prowgen repo, and add a pre submit to this repo that ensures we only check in new config that is formatted and ordered correctly |
Will do.
Maybe we could add a bot that would fix what humans committed instead of annoying people in PRs? |
@petr-muller a job is something i can set up in 10 minutes, a bot to auto-merge fixes would be novel tech, but i don't disagree with you. for whatever reason, ensuring that generated code is up to date is on the devs in the k8s ecosystem |
These jobs had duplicate 'resources:' set.
6209387 to
13d1a3d
Compare
13d1a3d to
8e79e8c
Compare
This should have no impact on *any* job definition. It just rewrites all YAML in syntactically different, but semantically equivalent way. We are building tooling to generate Prow job configuration and merge it with existing jobs, which will result in marshaling job configs into existing files. To prepare for using these tools, this commit rewrites all configs with the same YAML marshal lib, so that changes done by the tools are better isolated and readable.
8e79e8c to
b2512e1
Compare
|
/hold |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: petr-muller, stevekuznetsov The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@petr-muller: Updated the
DetailsIn 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/test-infra repository. |
| rerun_command: "/test e2e-aws" | ||
| # The abomination below is equivilent to `^((?!Documentation).)*$`. Since | ||
| # Go doesn't support negative lookaheads, we are stuck with the following. | ||
| run_if_changed: "^([^D]|D(D|oD|ocD|ocuD|ocum(D|e(D|n(D|t(D|aD|atD|atiD|atioD)))))*([^Do]|o[^Dc]|oc[^Du]|ocu[^Dm]|ocum([^De]|e([^Dn]|n([^Dt]|t([^Da]|a[^Dt]|at[^Di]|ati[^Do]|atio[^Dn]))))))*(D(D|oD|ocD|ocuD|ocum(D|e(D|n(D|t(D|aD|atD|atiD|atioD)))))*(o|oc|ocu|ocum(e(n(t(a|at|ati|atio)?)?)?)?)?)?$" |
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.
Stripping the comment here makes the terrible regexp harder to understand ;). Is it worth adding the comment back, or do we expect future mechanical YAML rewrites to continue to clobber comments?
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.
Oh, right, comments :/ We plan to put in place more tooling that interact with jobs but I think it's worth the effort to keep the comments there. I cannot simply put them back because we now have a check in place that would fail but I can fix the check as well. All changes will go through PRs and we do not plan any huge rewrites like this so we can keep the comments with just a little care.
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.

This should have no impact on any job definition. It just rewrites all
YAML in syntactically different, but semantically equivalent way.
We are building tools to generate Prow job configuration and merge it
with existing jobs, which will result in marshaling job configs into
existing files. To prepare for using these tools, this commit rewrites
all configs with the same YAML marshal lib, so that changes done by the
tools are better isolated and readable.
This is starting to be really messy as we have a zillion PRs pending related to this, with various dependencies. What needs to happen:
Then, in close succession;
Then, finally merge this PR, which regenerates all configs and adds the job that keeps them in this shape.