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

🌱 Recreate checks always to keep them in the upper check suite #35

Closed
wants to merge 1 commit into from

Conversation

Adirio
Copy link
Contributor

@Adirio Adirio commented Feb 2, 2021

As GitHub CheckRuns and CheckSuite API doesn't allow to bind Check Runs to Check Suites, reusing a CheckRun for any action is not a valid approach. Any action (open, reopen, edit, sync) creates a new Check Suite which is the one shown in the PR. If we reuse a previous Check Run (which we can't bind to this new Check Suite) it will be hidden in the previous Check Suite and, while its results will be updated and properly used, the check sections will not show the corresponding message.

This PR recreates checks always to keep them in the upper Check Suite of the stack so that they are showed in the checks section of a PR, unless until a way of binding Check Runs to Check Suites is provided by GitHub.

⚠️ I'm not 100% sure how this will behave as there will be multiple Check Runs with the same name for the same commit SHA. Theoretically they should be different Check Runs with different IDs, and the listing method filters just the latest one. But if this theoretic behavior is not the real one, a fix will need to be pushed.

…tack so that they are showed in the checks section

Signed-off-by: Adrian Orive <adrian.orive.oneca@gmail.com>
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 2, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Adirio

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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 2, 2021
@Adirio
Copy link
Contributor Author

Adirio commented Feb 2, 2021

Proof of the issue that I'm tackling can be found comparing this PR, where only the first open action was issued, and therefore the checks section is complete.
On the other hand, #32's title was edited and the check runs are now not visible. They can be found by clicking on the "Details" link of the "PR Verifier / Verify PR contents (pull_request_target)" check, and then looking for them in the first Check Suite.

@Adirio Adirio mentioned this pull request Feb 2, 2021
6 tasks
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 3, 2021
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jun 2, 2021
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-contributor-experience at kubernetes/community.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closed this PR.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-contributor-experience at kubernetes/community.
/close

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
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants