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

Split prow config #891

Merged
merged 4 commits into from
Nov 7, 2024
Merged

Conversation

lentzi90
Copy link
Member

@lentzi90 lentzi90 commented Nov 4, 2024

This moves all prow config to one folder outside of the kustomization and splits the jobs into multiple files.
Kustomize cannot automatically create configmaps from all files in a folder recursively so I think it makes more sense to handle the config separately. Then we can also keep them in a place that is perhaps easier to find.
This also paves the way for eventually separating out the secrets from the kustomization so that we can have a job for applying changes across all the manifests (not just the config).

The jobs are now in one file per repo. We can change this to one folder per repo or something else if we want.

Fixes: #713

Split out the job-config from the prow config.yaml file and use the
job-config-path flag to make prow read jobs from a folder.

Signed-off-by: Lennart Jern <lennart.jern@est.tech>
Signed-off-by: Lennart Jern <lennart.jern@est.tech>
@metal3-io-bot metal3-io-bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Nov 4, 2024
Comment on lines +451 to +454
kubectl -n prow create configmap job-config \
--from-file=config/jobs/metal3-io \
--from-file=config/jobs/Nordix \
--from-file=config/jobs
Copy link
Member Author

Choose a reason for hiding this comment

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

This is a bit error prone, since we need to remember to add new folders. On the other hand, prow will autoupdate the configmap as long as the config updater is there in the plugins.yaml. This means that as long as we create some configmap here that prow can mount, it will happily sync with folders we forgot on the first reconcile.

command:
- generic-autobumper
args:
- --config=prow/config/generic-autobumper-config.yaml
Copy link
Member Author

Choose a reason for hiding this comment

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

Updated with new location

@lentzi90
Copy link
Member Author

lentzi90 commented Nov 4, 2024

@lentzi90: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:
Test name Commit Details Required Rerun command
check-prow-config 3d2c8c9 link true /test check-prow-config

Full PR test history. Your PR dashboard.

This fails because I have not updated the in-cluster config yet. It is trying to look for the config in its old place.

Comment on lines +12 to +17
- "--config-path"
- "prow/config/config.yaml"
- "--plugin-config"
- "prow/config/plugins.yaml"
- "--job-config-path"
- "prow/config/jobs"
Copy link
Member Author

Choose a reason for hiding this comment

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

Updated

Copy link
Member

@tuminoid tuminoid left a comment

Choose a reason for hiding this comment

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

Great improvement already!

Not sure if possible, but if we could have files per release branch in BMO/CAPM3/IPAM/ironic-image, it would make setting up and managing release branches so much easier. Not sure if that is doable?

Nit: some extra branch config that could be removed, if not.

prow/config/config.yaml Outdated Show resolved Hide resolved
prow/config/jobs/metal3-io/baremetal-operator.yaml Outdated Show resolved Hide resolved
prow/config/jobs/metal3-io/baremetal-operator.yaml Outdated Show resolved Hide resolved
prow/config/jobs/metal3-io/baremetal-operator.yaml Outdated Show resolved Hide resolved
prow/config/jobs/metal3-io/ip-address-manager.yaml Outdated Show resolved Hide resolved
prow/config/jobs/metal3-io/ip-address-manager.yaml Outdated Show resolved Hide resolved
prow/config/jobs/metal3-io/ip-address-manager.yaml Outdated Show resolved Hide resolved
prow/config/jobs/metal3-io/ip-address-manager.yaml Outdated Show resolved Hide resolved
prow/config/jobs/metal3-io/ironic-image.yaml Outdated Show resolved Hide resolved
- Sort list of repos
- Remove unnecessary branch directives (when all branches are present)

Signed-off-by: Lennart Jern <lennart.jern@est.tech>
This splits the presubmits for CAPM3, BMO, IPAM and Ironic-image so that
each release branch has its own file.

Signed-off-by: Lennart Jern <lennart.jern@est.tech>
@lentzi90
Copy link
Member Author

lentzi90 commented Nov 5, 2024

Thanks for the suggestion @tuminoid ! It is definitely doable if I understood you correctly, and I think I have a working solution now. What do you think?

@tuminoid
Copy link
Member

tuminoid commented Nov 5, 2024

Thanks for the suggestion @tuminoid ! It is definitely doable if I understood you correctly, and I think I have a working solution now. What do you think?

I need to take better look, but yes, that was what I was suggesting. Thanks!

Copy link
Member

@Rozzii Rozzii left a comment

Choose a reason for hiding this comment

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

AFAIK it is:
/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 6, 2024
@Rozzii
Copy link
Member

Rozzii commented Nov 6, 2024

/remove lgtm

@Rozzii
Copy link
Member

Rozzii commented Nov 6, 2024

/lgtm cancel

@metal3-io-bot metal3-io-bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 6, 2024
@Rozzii
Copy link
Member

Rozzii commented Nov 6, 2024

/remove-lgtm

Copy link
Member

@Rozzii Rozzii left a comment

Choose a reason for hiding this comment

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

/lgtm

I have missed the comment that because this is a ci related work it breaks the ci temporarly.
I have agreed with @lentzi90 off site that were willing to take the risk.

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 7, 2024
@Rozzii
Copy link
Member

Rozzii commented Nov 7, 2024

/override check-prow-config

@metal3-io-bot
Copy link
Collaborator

@Rozzii: Overrode contexts on behalf of Rozzii: check-prow-config

In response to this:

/override check-prow-config

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.

@lentzi90
Copy link
Member Author

lentzi90 commented Nov 7, 2024

/hold

@metal3-io-bot metal3-io-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 7, 2024
@lentzi90
Copy link
Member Author

lentzi90 commented Nov 7, 2024

(Putting hold so I can apply the changes and check the test before it merges)

- make
image: docker.io/golang:1.22
imagePullPolicy: Always
- name: markdownlint
Copy link
Member

Choose a reason for hiding this comment

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

Can we also split these? Ideally each branch would be complete on its own.

Copy link
Member Author

Choose a reason for hiding this comment

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

It can be done. Can we do it separately? I already started applying this and it looks like it is working 🙂

@lentzi90
Copy link
Member Author

lentzi90 commented Nov 7, 2024

/test check-prow-config

@lentzi90
Copy link
Member Author

lentzi90 commented Nov 7, 2024

/hold cancel
The test passes now that I have applied the change

@metal3-io-bot metal3-io-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 7, 2024
@lentzi90
Copy link
Member Author

lentzi90 commented Nov 7, 2024

/override metal3-ubuntu-e2e-integration-test-main

@metal3-io-bot
Copy link
Collaborator

@lentzi90: Overrode contexts on behalf of lentzi90: metal3-ubuntu-e2e-integration-test-main

In response to this:

/override metal3-ubuntu-e2e-integration-test-main

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.

Copy link
Member

@tuminoid tuminoid left a comment

Choose a reason for hiding this comment

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

/approve

Agreed that we'll finalize the split for the rest of the linters in a follow-up

@metal3-io-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tuminoid

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

@metal3-io-bot metal3-io-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 7, 2024
@metal3-io-bot metal3-io-bot merged commit faa14ab into metal3-io:main Nov 7, 2024
7 checks passed
@metal3-io-bot metal3-io-bot deleted the lentzi90/split-prow-config branch November 7, 2024 10:18
@metal3-io-bot
Copy link
Collaborator

@lentzi90: Updated the following 4 configmaps:

  • plugins configmap in namespace prow at cluster default using the following files:
    • key plugins.yaml using file ``
    • key plugins.yaml using file prow/config/plugins.yaml
  • config configmap in namespace prow at cluster default using the following files:
    • key config.yaml using file prow/config/config.yaml
  • job-config configmap in namespace prow at cluster default using the following files:
    • key metal3-clusterapi-docs.yaml using file prow/config/jobs/Nordix/metal3-clusterapi-docs.yaml
    • key metal3-dev-tools.yaml using file prow/config/jobs/Nordix/metal3-dev-tools.yaml
    • key sles-ironic-python-agent-builder.yaml using file prow/config/jobs/Nordix/sles-ironic-python-agent-builder.yaml
    • key baremetal-operator-release-0.5.yaml using file prow/config/jobs/metal3-io/baremetal-operator-release-0.5.yaml
    • key baremetal-operator-release-0.6.yaml using file prow/config/jobs/metal3-io/baremetal-operator-release-0.6.yaml
    • key baremetal-operator-release-0.8.yaml using file prow/config/jobs/metal3-io/baremetal-operator-release-0.8.yaml
    • key baremetal-operator.yaml using file prow/config/jobs/metal3-io/baremetal-operator.yaml
    • key cluster-api-provider-metal3.yaml using file prow/config/jobs/metal3-io/cluster-api-provider-metal3.yaml
    • key cluster-api-provier-metal3-release-1.6.yaml using file prow/config/jobs/metal3-io/cluster-api-provier-metal3-release-1.6.yaml
    • key cluster-api-provier-metal3-release-1.7.yaml using file prow/config/jobs/metal3-io/cluster-api-provier-metal3-release-1.7.yaml
    • key cluster-api-provier-metal3-release-1.8.yaml using file prow/config/jobs/metal3-io/cluster-api-provier-metal3-release-1.8.yaml
    • key community.yaml using file prow/config/jobs/metal3-io/community.yaml
    • key ip-address-manager-release-1.6.yaml using file prow/config/jobs/metal3-io/ip-address-manager-release-1.6.yaml
    • key ip-address-manager-release-1.7.yaml using file prow/config/jobs/metal3-io/ip-address-manager-release-1.7.yaml
    • key ip-address-manager-release-1.8.yaml using file prow/config/jobs/metal3-io/ip-address-manager-release-1.8.yaml
    • key ip-address-manager.yaml using file prow/config/jobs/metal3-io/ip-address-manager.yaml
    • key ironic-client.yaml using file prow/config/jobs/metal3-io/ironic-client.yaml
    • key ironic-hardware-inventory-recorder-image.yaml using file prow/config/jobs/metal3-io/ironic-hardware-inventory-recorder-image.yaml
    • key ironic-image-release-24.0.yaml using file prow/config/jobs/metal3-io/ironic-image-release-24.0.yaml
    • key ironic-image-release-24.1.yaml using file prow/config/jobs/metal3-io/ironic-image-release-24.1.yaml
    • key ironic-image-release-25.0.yaml using file prow/config/jobs/metal3-io/ironic-image-release-25.0.yaml
    • key ironic-image-release-26.0.yaml using file prow/config/jobs/metal3-io/ironic-image-release-26.0.yaml
    • key ironic-image.yaml using file prow/config/jobs/metal3-io/ironic-image.yaml
    • key ironic-ipa-downloader.yaml using file prow/config/jobs/metal3-io/ironic-ipa-downloader.yaml
    • key ironic-standalone-operator.yaml using file prow/config/jobs/metal3-io/ironic-standalone-operator.yaml
    • key mariadb-image.yaml using file prow/config/jobs/metal3-io/mariadb-image.yaml
    • key metal3-dev-env.yaml using file prow/config/jobs/metal3-io/metal3-dev-env.yaml
    • key metal3-docs.yaml using file prow/config/jobs/metal3-io/metal3-docs.yaml
    • key metal3-io.github.io.yaml using file prow/config/jobs/metal3-io/metal3-io.github.io.yaml
    • key project-infra.yaml using file prow/config/jobs/metal3-io/project-infra.yaml
    • key utility-images.yaml using file prow/config/jobs/metal3-io/utility-images.yaml
    • key periodics.yaml using file prow/config/jobs/periodics.yaml
  • label-config configmap in namespace prow at cluster default using the following files:
    • key labels.yaml using file ``
    • key labels.yaml using file prow/config/labels.yaml

In response to this:

This moves all prow config to one folder outside of the kustomization and splits the jobs into multiple files.
Kustomize cannot automatically create configmaps from all files in a folder recursively so I think it makes more sense to handle the config separately. Then we can also keep them in a place that is perhaps easier to find.
This also paves the way for eventually separating out the secrets from the kustomization so that we can have a job for applying changes across all the manifests (not just the config).

The jobs are now in one file per repo. We can change this to one folder per repo or something else if we want.

Fixes: #713

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.

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.

Split Prow config into multiple files
4 participants