Skip to content

Conversation

@asim-reza
Copy link
Contributor

Issue

Unknown field checks are not enabled for ProwJob configuration. #26368

Description

Prow's checkconfig tool is responsible for presubmit validation of ProwJob configuration. It has an optional check for unknown fields in ProwJob config that can be enabled with --warnings=unknown-fields-all. We currently do not have this check enabled.
As a result it is possible to add configuration that is not recognized by Prow, causing it to be silently ignored. Common examples of this are typos in a field name and incorrect indentation.

What was done

All errors in the configs were fixed (of which there were alot) ....

docker run -i --rm -v "${PWD}:${PWD}" -w "${PWD}" gcr.io/k8s-prow/checkconfig:v20220905-8bcebc6376 --config-path=config/prow/config.yaml --job-config-path=config/jobs --plugin-config=config/prow/plugins.yaml --strict --warnings=mismatched-tide-lenient --warnings=tide-strict-branch --warnings=needs-ok-to-test --warnings=validate-owners --warnings=missing-trigger --warnings=validate-urls --warnings=unknown-fields --warnings=duplicate-job-refs --warnings=unknown-fields-all

was used to perform the tests

Note:

The commits were made by type of errors and there were 2 merges with the main branch as there were changes made to the repo as I was working

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 6, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @asim-reza. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 6, 2022
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. area/config Issues or PRs related to code in /config area/jobs area/provider/gcp Issues or PRs related to gcp provider area/release-eng Issues or PRs related to the Release Engineering subproject sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/release Categorizes an issue or PR as relevant to SIG Release. sig/testing Categorizes an issue or PR as relevant to SIG Testing. sig/windows Categorizes an issue or PR as relevant to SIG Windows. labels Sep 6, 2022
testgrid-tab-name: gubernator

# Please keep this in sync with the `ci-test-infra-prow-checkconfig` job
- name: pull-test-infra-prow-checkconfig
Copy link
Contributor

Choose a reason for hiding this comment

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

Please don't modify this job in place. Duplicate this job instead, aka creating a new job called pull-test-infra-prow-checkconfig-beta which is optional and validates with unknown-fields-all

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

@chaodaiG
Copy link
Contributor

chaodaiG commented Sep 6, 2022

as mentioned in #27386 , please revert all changes other than the config validation job

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 6, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: asim-reza
Once this PR has been reviewed and has the lgtm label, please assign chases2 for approval by writing /assign @chases2 in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@asim-reza
Copy link
Contributor Author

asim-reza commented Sep 6, 2022

@chaodaiG

as mentioned in #27386 , please revert all changes other than the config validation job

done... I reverted all the changes and created a dublicate job

@chaodaiG
Copy link
Contributor

chaodaiG commented Sep 6, 2022

Please squash the commits, it's weird that such a small change has 13 commits

@asim-reza
Copy link
Contributor Author

Please squash the commits, it's weird that such a small change has 13 commits

@asim-reza asim-reza closed this Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Issues or PRs related to code in /config area/jobs area/provider/gcp Issues or PRs related to gcp provider area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/release Categorizes an issue or PR as relevant to SIG Release. 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/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants