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

audit: update audit job to only push changes when there are changes to push #2087

Closed
spiffxp opened this issue May 24, 2021 · 2 comments
Closed
Labels
area/audit Audit of project resources, audit followup issues, code in audit/ kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Milestone

Comments

@spiffxp
Copy link
Member

spiffxp commented May 24, 2021

I should have opened an issue for this earlier.

The audit job was (and may still be) force-pushing changes to its PR branch after each run. This results in lots of traffic on a PR that looks like this:
Screen Shot 2021-05-24 at 1 06 28 PM

When in reality nothing has actually changed.

I tried to fix this via kubernetes/test-infra#22239 but I'm not sure it worked. It's difficult to tell right now because the job may be pushing spurious etag updates (issue to fix: #2062) (ref: #2074 (comment))

So ideally:

  • the audit job only creates a PR when there are changes to PR (I believe it does this)
  • the audit job only update the PR when there are new changes compared to the HEAD of its PR
  • the audit job updates the PR in a way that makes it clear what new changes have occurred (append a commit to the branch vs. force-push overtop? provide a comment with a link that shows the delta? etc.)

/wg k8s-infra
/area infra/auditing
/sig-testing
/kind bug
/priority important-soon
/milestone v1.22

@k8s-ci-robot k8s-ci-robot added wg/k8s-infra area/audit Audit of project resources, audit followup issues, code in audit/ kind/bug Categorizes issue or PR as related to a bug. labels May 24, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.22 milestone May 24, 2021
@k8s-ci-robot k8s-ci-robot added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label May 24, 2021
@spiffxp
Copy link
Member Author

spiffxp commented Aug 3, 2021

/close
Yeah this works now. From a recent run...

Identifying changes ...
 M audit/projects/k8s-infra-ii-sandbox/services/bigquery/bigquery.datasets.riaan_data_store.access.json
 M audit/projects/k8s-infra-prow-build-trusted/iam.json
 M audit/projects/k8s-infra-prow-build-trusted/services/container/clusters/prow-build-trusted.json
 M audit/projects/k8s-infra-prow-build-trusted/services/logging/logs.json
Adding changes ...
Committing changes ...
[main 1d8e30dc] audit: update as of 2021-08-03
 4 files changed, 12 insertions(+), 3 deletions(-)
Fetching fork remote 'fork' ...
From https://github.com/k8s-infra-ci-robot/k8s.io
 * branch              autoaudit-prow -> FETCH_HEAD
Verifying whether HEAD differs from https://github.com/k8s-infra-ci-robot/k8s.io/tree/autoaudit-prow ...
No new changes to push, exiting early...

@k8s-ci-robot
Copy link
Contributor

@spiffxp: Closing this issue.

In response to this:

/close
Yeah this works now. From a recent run...

Identifying changes ...
M audit/projects/k8s-infra-ii-sandbox/services/bigquery/bigquery.datasets.riaan_data_store.access.json
M audit/projects/k8s-infra-prow-build-trusted/iam.json
M audit/projects/k8s-infra-prow-build-trusted/services/container/clusters/prow-build-trusted.json
M audit/projects/k8s-infra-prow-build-trusted/services/logging/logs.json
Adding changes ...
Committing changes ...
[main 1d8e30dc] audit: update as of 2021-08-03
4 files changed, 12 insertions(+), 3 deletions(-)
Fetching fork remote 'fork' ...
From https://github.com/k8s-infra-ci-robot/k8s.io
* branch              autoaudit-prow -> FETCH_HEAD
Verifying whether HEAD differs from https://github.com/k8s-infra-ci-robot/k8s.io/tree/autoaudit-prow ...
No new changes to push, exiting early...

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/audit Audit of project resources, audit followup issues, code in audit/ kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

No branches or pull requests

2 participants