Skip to content

Conversation

@petr-muller
Copy link
Member

@petr-muller petr-muller commented Aug 23, 2018

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.

@openshift-ci-robot openshift-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Aug 23, 2018
@petr-muller
Copy link
Member Author

/assign @stevekuznetsov

Some correctness-supporting material:

  1. https://gist.github.com/petr-muller/7f6357eec69b64059b2c3c10b3cb60fd shows a result of running yamldiff on all files. It only shows changes caused by omitempty: either discarding fields that are omitempty but were previously defined with a false-ish value, or adding false-ish values on keys that do not have omitempty set on appropriate members and were not previously defined.
  2. https://github.com/petr-muller/release/blob/prowgen-utils/tools/ci-operator-prowgen/cmd/determinize/main.go is the program I used to regenerate the configs

@stevekuznetsov
Copy link
Contributor

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

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 23, 2018
@petr-muller
Copy link
Member Author

Especially with the code migration for the generator... Let's get the reformatter/determinizer checked in to the prowgen repo

Will do.

... and add a pre submit to this repo that ensures we only check in new config that is formatted and ordered correctly.

Maybe we could add a bot that would fix what humans committed instead of annoying people in PRs?

@stevekuznetsov
Copy link
Contributor

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.
@petr-muller petr-muller force-pushed the regenerate-bloody-everything branch from 6209387 to 13d1a3d Compare August 28, 2018 10:40
@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 28, 2018
@petr-muller petr-muller force-pushed the regenerate-bloody-everything branch from 13d1a3d to 8e79e8c Compare August 28, 2018 12:25
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.
@petr-muller petr-muller force-pushed the regenerate-bloody-everything branch from 8e79e8c to b2512e1 Compare August 28, 2018 12:46
@petr-muller
Copy link
Member Author

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 28, 2018
@stevekuznetsov
Copy link
Contributor

/lgtm
/hold cancel

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Aug 28, 2018
@openshift-ci-robot
Copy link
Contributor

[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

Details 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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 28, 2018
@openshift-merge-robot openshift-merge-robot merged commit 70d7e83 into openshift:master Aug 28, 2018
@openshift-ci-robot
Copy link
Contributor

@petr-muller: Updated the job-config configmap using the following files:

  • key openshift-cluster-api-provider-aws-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-api-provider-aws/openshift-cluster-api-provider-aws-postsubmits.yaml
  • key openshift-cluster-dns-operator-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-dns-operator/openshift-cluster-dns-operator-postsubmits.yaml
  • key openshift-jenkins-openshift-login-plugin-postsubmits.yaml using file ci-operator/jobs/openshift/jenkins-openshift-login-plugin/openshift-jenkins-openshift-login-plugin-postsubmits.yaml
  • key openshift-openshift-azure-periodics.yaml using file ci-operator/jobs/openshift/openshift-azure/openshift-openshift-azure-periodics.yaml
  • key openshift-s2i-s2i-wildfly-postsubmits.yaml using file ci-operator/jobs/openshift-s2i/s2i-wildfly/openshift-s2i-s2i-wildfly-postsubmits.yaml
  • key openshift-cluster-operator-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-operator/openshift-cluster-operator-postsubmits.yaml
  • key openshift-cluster-samples-operator-presubmits.yaml using file ci-operator/jobs/openshift/cluster-samples-operator/openshift-cluster-samples-operator-presubmits.yaml
  • key openshift-image-registry-postsubmits.yaml using file ci-operator/jobs/openshift/image-registry/openshift-image-registry-postsubmits.yaml
  • key openshift-ose-periodics.yaml using file ci-operator/jobs/openshift/ose/openshift-ose-periodics.yaml
  • key infra-periodics.yaml using file ci-operator/jobs/infra-periodics.yaml
  • key openshift-online-console-extensions-postsubmits.yaml using file ci-operator/jobs/openshift/online-console-extensions/openshift-online-console-extensions-postsubmits.yaml
  • key openshift-azure-misc-postsubmits.yaml using file ci-operator/jobs/openshift/azure-misc/openshift-azure-misc-postsubmits.yaml
  • key openshift-cluster-ingress-operator-presubmits.yaml using file ci-operator/jobs/openshift/cluster-ingress-operator/openshift-cluster-ingress-operator-presubmits.yaml
  • key openshift-configmap-reload-postsubmits.yaml using file ci-operator/jobs/openshift/configmap-reload/openshift-configmap-reload-postsubmits.yaml
  • key openshift-prometheus-operator-postsubmits.yaml using file ci-operator/jobs/openshift/prometheus-operator/openshift-prometheus-operator-postsubmits.yaml
  • key kubernetes-incubator-descheduler-presubmits.yaml using file ci-operator/jobs/kubernetes-incubator/descheduler/kubernetes-incubator-descheduler-presubmits.yaml
  • key openshift-api-presubmits.yaml using file ci-operator/jobs/openshift/api/openshift-api-presubmits.yaml
  • key openshift-ci-operator-prowgen-postsubmits.yaml using file ci-operator/jobs/openshift/ci-operator-prowgen/openshift-ci-operator-prowgen-postsubmits.yaml
  • key openshift-ci-operator-presubmits.yaml using file ci-operator/jobs/openshift/ci-operator/openshift-ci-operator-presubmits.yaml
  • key openshift-cluster-api-provider-aws-presubmits.yaml using file ci-operator/jobs/openshift/cluster-api-provider-aws/openshift-cluster-api-provider-aws-presubmits.yaml
  • key openshift-cluster-ingress-operator-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-ingress-operator/openshift-cluster-ingress-operator-postsubmits.yaml
  • key openshift-kubernetes-autoscaler-postsubmits.yaml using file ci-operator/jobs/openshift/kubernetes-autoscaler/openshift-kubernetes-autoscaler-postsubmits.yaml
  • key openshift-kubernetes-autoscaler-presubmits.yaml using file ci-operator/jobs/openshift/kubernetes-autoscaler/openshift-kubernetes-autoscaler-presubmits.yaml
  • key openshift-machine-api-operator-presubmits.yaml using file ci-operator/jobs/openshift/machine-api-operator/openshift-machine-api-operator-presubmits.yaml
  • key openshift-openshift-azure-presubmits.yaml using file ci-operator/jobs/openshift/openshift-azure/openshift-openshift-azure-presubmits.yaml
  • key openshift-service-serving-cert-signer-postsubmits.yaml using file ci-operator/jobs/openshift/service-serving-cert-signer/openshift-service-serving-cert-signer-postsubmits.yaml
  • key openshift-telemeter-presubmits.yaml using file ci-operator/jobs/openshift/telemeter/openshift-telemeter-presubmits.yaml
  • key openshift-cluster-samples-operator-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-samples-operator/openshift-cluster-samples-operator-postsubmits.yaml
  • key openshift-installer-postsubmits.yaml using file ci-operator/jobs/openshift/installer/openshift-installer-postsubmits.yaml
  • key openshift-service-serving-cert-signer-presubmits.yaml using file ci-operator/jobs/openshift/service-serving-cert-signer/openshift-service-serving-cert-signer-presubmits.yaml
  • key openvswitch-ovn-kubernetes-postsubmits.yaml using file ci-operator/jobs/openvswitch/ovn-kubernetes/openvswitch-ovn-kubernetes-postsubmits.yaml
  • key kubernetes-incubator-cri-o-periodics.yaml using file ci-operator/jobs/kubernetes-incubator/cri-o/kubernetes-incubator-cri-o-periodics.yaml
  • key openshift-ci-vm-operator-presubmits.yaml using file ci-operator/jobs/openshift/ci-vm-operator/openshift-ci-vm-operator-presubmits.yaml
  • key openshift-coredns-presubmits.yaml using file ci-operator/jobs/openshift/coredns/openshift-coredns-presubmits.yaml
  • key openshift-jenkins-plugin-presubmits.yaml using file ci-operator/jobs/openshift/jenkins-plugin/openshift-jenkins-plugin-presubmits.yaml
  • key openshift-jenkins-sync-plugin-presubmits.yaml using file ci-operator/jobs/openshift/jenkins-sync-plugin/openshift-jenkins-sync-plugin-presubmits.yaml
  • key openshift-jenkins-presubmits.yaml using file ci-operator/jobs/openshift/jenkins/openshift-jenkins-presubmits.yaml
  • key openshift-kube-state-metrics-postsubmits.yaml using file ci-operator/jobs/openshift/kube-state-metrics/openshift-kube-state-metrics-postsubmits.yaml
  • key openshift-machine-api-operator-postsubmits.yaml using file ci-operator/jobs/openshift/machine-api-operator/openshift-machine-api-operator-postsubmits.yaml
  • key openshift-openshift-ansible-postsubmits.yaml using file ci-operator/jobs/openshift/openshift-ansible/openshift-openshift-ansible-postsubmits.yaml
  • key openshift-s2i-s2i-wildfly-presubmits.yaml using file ci-operator/jobs/openshift-s2i/s2i-wildfly/openshift-s2i-s2i-wildfly-presubmits.yaml
  • key openshift-azure-misc-presubmits.yaml using file ci-operator/jobs/openshift/azure-misc/openshift-azure-misc-presubmits.yaml
  • key openshift-ci-operator-prowgen-presubmits.yaml using file ci-operator/jobs/openshift/ci-operator-prowgen/openshift-ci-operator-prowgen-presubmits.yaml
  • key openshift-jenkins-sync-plugin-postsubmits.yaml using file ci-operator/jobs/openshift/jenkins-sync-plugin/openshift-jenkins-sync-plugin-postsubmits.yaml
  • key kubernetes-incubator-cri-o-postsubmits.yaml using file ci-operator/jobs/kubernetes-incubator/cri-o/kubernetes-incubator-cri-o-postsubmits.yaml
  • key openshift-ci-ns-ttl-controller-presubmits.yaml using file ci-operator/jobs/openshift/ci-ns-ttl-controller/openshift-ci-ns-ttl-controller-presubmits.yaml
  • key openshift-cluster-monitoring-operator-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-monitoring-operator/openshift-cluster-monitoring-operator-postsubmits.yaml
  • key openshift-console-presubmits.yaml using file ci-operator/jobs/openshift/console/openshift-console-presubmits.yaml
  • key openshift-origin-periodics.yaml using file ci-operator/jobs/openshift/origin/openshift-origin-periodics.yaml
  • key openshift-release-presubmits.yaml using file ci-operator/jobs/openshift/release/openshift-release-presubmits.yaml
  • key openshift-ci-operator-postsubmits.yaml using file ci-operator/jobs/openshift/ci-operator/openshift-ci-operator-postsubmits.yaml
  • key openshift-cluster-version-operator-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-version-operator/openshift-cluster-version-operator-postsubmits.yaml
  • key openshift-cluster-version-operator-presubmits.yaml using file ci-operator/jobs/openshift/cluster-version-operator/openshift-cluster-version-operator-presubmits.yaml
  • key openshift-jenkins-openshift-login-plugin-presubmits.yaml using file ci-operator/jobs/openshift/jenkins-openshift-login-plugin/openshift-jenkins-openshift-login-plugin-presubmits.yaml
  • key openshift-kubernetes-metrics-server-postsubmits.yaml using file ci-operator/jobs/openshift/kubernetes-metrics-server/openshift-kubernetes-metrics-server-postsubmits.yaml
  • key openshift-machine-config-operator-postsubmits.yaml using file ci-operator/jobs/openshift/machine-config-operator/openshift-machine-config-operator-postsubmits.yaml
  • key openshift-origin-metrics-presubmits.yaml using file ci-operator/jobs/openshift/origin-metrics/openshift-origin-metrics-presubmits.yaml
  • key openshift-origin-web-console-server-postsubmits.yaml using file ci-operator/jobs/openshift/origin-web-console-server/openshift-origin-web-console-server-postsubmits.yaml
  • key openshift-service-catalog-presubmits.yaml using file ci-operator/jobs/openshift/service-catalog/openshift-service-catalog-presubmits.yaml
  • key kubernetes-incubator-cri-o-presubmits.yaml using file ci-operator/jobs/kubernetes-incubator/cri-o/kubernetes-incubator-cri-o-presubmits.yaml
  • key openshift-jenkins-postsubmits.yaml using file ci-operator/jobs/openshift/jenkins/openshift-jenkins-postsubmits.yaml
  • key openshift-online-console-extensions-presubmits.yaml using file ci-operator/jobs/openshift/online-console-extensions/openshift-online-console-extensions-presubmits.yaml
  • key openshift-jenkins-client-plugin-presubmits.yaml using file ci-operator/jobs/openshift/jenkins-client-plugin/openshift-jenkins-client-plugin-presubmits.yaml
  • key openshift-jenkins-plugin-postsubmits.yaml using file ci-operator/jobs/openshift/jenkins-plugin/openshift-jenkins-plugin-postsubmits.yaml
  • key openshift-openshift-azure-postsubmits.yaml using file ci-operator/jobs/openshift/openshift-azure/openshift-openshift-azure-postsubmits.yaml
  • key openshift-origin-web-console-server-presubmits.yaml using file ci-operator/jobs/openshift/origin-web-console-server/openshift-origin-web-console-server-presubmits.yaml
  • key openshift-cluster-capacity-postsubmits.yaml using file ci-operator/jobs/openshift/cluster-capacity/openshift-cluster-capacity-postsubmits.yaml
  • key openshift-cluster-capacity-presubmits.yaml using file ci-operator/jobs/openshift/cluster-capacity/openshift-cluster-capacity-presubmits.yaml
  • key openshift-descheduler-presubmits.yaml using file ci-operator/jobs/openshift/descheduler/openshift-descheduler-presubmits.yaml
  • key openshift-jenkins-client-plugin-postsubmits.yaml using file ci-operator/jobs/openshift/jenkins-client-plugin/openshift-jenkins-client-plugin-postsubmits.yaml
  • key openshift-kubernetes-metrics-server-presubmits.yaml using file ci-operator/jobs/openshift/kubernetes-metrics-server/openshift-kubernetes-metrics-server-presubmits.yaml
  • key openshift-online-hibernation-presubmits.yaml using file ci-operator/jobs/openshift/online-hibernation/openshift-online-hibernation-presubmits.yaml
  • key openshift-origin-web-console-presubmits.yaml using file ci-operator/jobs/openshift/origin-web-console/openshift-origin-web-console-presubmits.yaml
  • key openshift-origin-presubmits.yaml using file ci-operator/jobs/openshift/origin/openshift-origin-presubmits.yaml
  • key openvswitch-ovn-kubernetes-presubmits.yaml using file ci-operator/jobs/openvswitch/ovn-kubernetes/openvswitch-ovn-kubernetes-presubmits.yaml
  • key openshift-imagebuilder-presubmits.yaml using file ci-operator/jobs/openshift/imagebuilder/openshift-imagebuilder-presubmits.yaml
  • key openshift-installer-presubmits.yaml using file ci-operator/jobs/openshift/installer/openshift-installer-presubmits.yaml
  • key openshift-online-hibernation-postsubmits.yaml using file ci-operator/jobs/openshift/online-hibernation/openshift-online-hibernation-postsubmits.yaml
  • key openshift-origin-metrics-postsubmits.yaml using file ci-operator/jobs/openshift/origin-metrics/openshift-origin-metrics-postsubmits.yaml
  • key openshift-origin-postsubmits.yaml using file ci-operator/jobs/openshift/origin/openshift-origin-postsubmits.yaml
  • key openshift-service-catalog-postsubmits.yaml using file ci-operator/jobs/openshift/service-catalog/openshift-service-catalog-postsubmits.yaml
  • key openshift-cluster-operator-presubmits.yaml using file ci-operator/jobs/openshift/cluster-operator/openshift-cluster-operator-presubmits.yaml
  • key openshift-coredns-postsubmits.yaml using file ci-operator/jobs/openshift/coredns/openshift-coredns-postsubmits.yaml
  • key openshift-descheduler-postsubmits.yaml using file ci-operator/jobs/openshift/descheduler/openshift-descheduler-postsubmits.yaml
  • key openshift-kube-rbac-proxy-postsubmits.yaml using file ci-operator/jobs/openshift/kube-rbac-proxy/openshift-kube-rbac-proxy-postsubmits.yaml
  • key openshift-machine-config-operator-presubmits.yaml using file ci-operator/jobs/openshift/machine-config-operator/openshift-machine-config-operator-presubmits.yaml
  • key openshift-online-registration-presubmits.yaml using file ci-operator/jobs/openshift/online-registration/openshift-online-registration-presubmits.yaml
  • key openshift-ose-presubmits.yaml using file ci-operator/jobs/openshift/ose/openshift-ose-presubmits.yaml
  • key openshift-autoheal-presubmits.yaml using file ci-operator/jobs/openshift/autoheal/openshift-autoheal-presubmits.yaml
  • key openshift-cluster-dns-operator-presubmits.yaml using file ci-operator/jobs/openshift/cluster-dns-operator/openshift-cluster-dns-operator-presubmits.yaml
  • key openshift-console-postsubmits.yaml using file ci-operator/jobs/openshift/console/openshift-console-postsubmits.yaml
  • key openshift-image-registry-presubmits.yaml using file ci-operator/jobs/openshift/image-registry/openshift-image-registry-presubmits.yaml
  • key openshift-openshift-ansible-presubmits.yaml using file ci-operator/jobs/openshift/openshift-ansible/openshift-openshift-ansible-presubmits.yaml
  • key openshift-origin-aggregated-logging-postsubmits.yaml using file ci-operator/jobs/openshift/origin-aggregated-logging/openshift-origin-aggregated-logging-postsubmits.yaml
  • key openshift-origin-aggregated-logging-presubmits.yaml using file ci-operator/jobs/openshift/origin-aggregated-logging/openshift-origin-aggregated-logging-presubmits.yaml
  • key openshift-origin-web-console-postsubmits.yaml using file ci-operator/jobs/openshift/origin-web-console/openshift-origin-web-console-postsubmits.yaml
  • key openshift-os-presubmits.yaml using file ci-operator/jobs/openshift/os/openshift-os-presubmits.yaml
  • key openshift-telemeter-postsubmits.yaml using file ci-operator/jobs/openshift/telemeter/openshift-telemeter-postsubmits.yaml
Details

In response to this:

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.

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.

@petr-muller
Copy link
Member Author

wteq

@petr-muller petr-muller deleted the regenerate-bloody-everything branch August 28, 2018 15:19
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)?)?)?)?)?)?$"
Copy link
Member

@wking wking Aug 28, 2018

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?

Copy link
Member Author

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

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. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants