test-infra icon indicating copy to clipboard operation
test-infra copied to clipboard

tests: ensure that pre-submits get additional reviews

Open pohly opened this issue 1 year ago • 16 comments

Blocking pre-submit jobs must be for stable, important features. Non-blocking pre-submit jobs should only be run automatically if they meet the criteria outlined in https://github.com/kubernetes/community/pull/8196.

To ensure that this is considered when defining pre-submit jobs, they need to be listed in config/tests/jobs/policy/presubmit-jobs.yaml. make update-config-fixtures re-generates that file to the expected state for inclusion in a PR.

pohly avatar Dec 16 '24 10:12 pohly

/assign @aojea @BenTheElder

seems an interesting approach that may solve the existing problem, @BenTheElder is more familiar with all the edges here, let's hear his thoughts

aojea avatar Dec 16 '24 10:12 aojea

https://prow.k8s.io/view/gs/kubernetes-ci-logs/pr-logs/pull/test-infra/33958/pull-test-infra-unit-test/1868608463559462912

The test worked, my branch was out-dated and thus I didn't include an up-to-date generated file:

$ git diff
diff --git a/config/tests/jobs/presubmit-jobs.yaml b/config/tests/jobs/presubmit-jobs.yaml
index b7415779ba..197152ed12 100644
--- a/config/tests/jobs/presubmit-jobs.yaml
+++ b/config/tests/jobs/presubmit-jobs.yaml
@@ -25,7 +25,7 @@ run_if_changed:
       run_if_changed: ^(go.mod|go.sum|vendor)
     - name: pull-kubernetes-apidiff-client-go
       optional: true
-      run_if_changed: (^staging\/src\/k8s.io\/client-go)|(^staging\/src\/k8s.io\/code-generator\/examples)
+      run_if_changed: ((^staging\/src\/k8s.io\/client-go)|(^staging\/src\/k8s.io\/code-generator\/examples))/.*\.go
     - name: pull-kubernetes-conformance-image-test
       optional: true
       run_if_changed: conformance

pohly avatar Dec 16 '24 11:12 pohly

LGTM

tagging @michelle192837 too

aojea avatar Dec 16 '24 12:12 aojea

I suggest we remove or update jobs in separate PRs. I can then rebase this one and we merge it when we are happy with the current state.

pohly avatar Dec 16 '24 14:12 pohly

Interesting...

$ make go-unit
hack/make-rules/go-test/unit.sh
+ umask 0022
+ mkdir -p /work/gopath/src/k8s.io/test-infra/_output
+ /work/gopath/src/k8s.io/test-infra/_bin/gotestsum --junitfile=/work/gopath/src/k8s.io/test-infra/_output/junit-unit.xml -- ./...
✓  config/prow/cluster/build/boskos-resources (cached)
✓  config/tests/jobs/policy (cached)
✓  config/tests/lint (cached)
✓  config/tests/mergelists (cached)
✓  config/tests/jobs (cached)
∅  def/configmap
...
DONE 6812 tests in 1.006s

$ echo $?
0

No failure!

But when I run go test manually, there is one:

$ go test ./...
...
--- FAIL: TestPresubmitsKubernetesDashboards (0.00s)
    config_test.go:456: pull-kubernetes-e2e-gce-network-proxy-http-connect: should not be in presubmits-kubernetes-blocking because not actually merge-blocking for kubernetes/kubernetes
FAIL
FAIL	k8s.io/test-infra/config/tests/testgrids	1.280s
...
ok  	k8s.io/test-infra/testgrid/pkg/configurator/prow	(cached)
FAIL

Not good!

pohly avatar Dec 17 '24 17:12 pohly

No failure!

My _bin/gotestsum might have been too old. I can't reproduce after rebuilding it.

pohly avatar Dec 17 '24 17:12 pohly

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Mar 17 '25 18:03 k8s-triage-robot

/remove-lifecycle stale

@BenTheElder: did I address your comments?

pohly avatar Mar 18 '25 11:03 pohly

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Jun 16 '25 11:06 k8s-triage-robot

/remove-lifecycle stale ... too many things came up.

BenTheElder avatar Jun 16 '25 21:06 BenTheElder

I think everything is addressed, just needs updating to the latest jobs (we've removed more from this list ...) /test all

BenTheElder avatar Jun 16 '25 21:06 BenTheElder

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: pohly Once this PR has been reviewed and has the lgtm label, please ask for approval from aojea. For more information see the 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

k8s-ci-robot avatar Jun 17 '25 11:06 k8s-ci-robot

https://github.com/kubernetes/community/pull/8196 is also still open.

pohly avatar Jun 17 '25 11:06 pohly

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Sep 15 '25 11:09 k8s-triage-robot

/remove-lifecycle stale

I prefer to merge https://github.com/kubernetes/community/pull/8196 first.

pohly avatar Sep 16 '25 09:09 pohly