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

Handle the case of multiple versions of a status #2194

Merged
merged 1 commit into from
Mar 10, 2020

Conversation

afrittoli
Copy link
Member

@afrittoli afrittoli commented Mar 9, 2020

Changes

The GitHub API keeps old versions of a status for historical
reasons. The statuses are returned in reverse chronological
order. This patch pulls-in a version of go-scm that handles
this behaviour and only returns the latest status.

Fixes #2188

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide for more details.

Double check this list of stuff that's easy to miss:

Reviewer Notes

If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.

@googlebot googlebot added the cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit label Mar 9, 2020
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 9, 2020
@afrittoli
Copy link
Member Author

@tomgeorge

@dibyom
Copy link
Member

dibyom commented Mar 9, 2020

/cc @wlynch

@tekton-robot tekton-robot requested a review from wlynch March 9, 2020 18:11
pkg/pullrequest/api.go Outdated Show resolved Hide resolved
pkg/pullrequest/api.go Outdated Show resolved Hide resolved
pkg/pullrequest/api.go Outdated Show resolved Hide resolved
pkg/pullrequest/api.go Outdated Show resolved Hide resolved
@afrittoli afrittoli force-pushed the issues/2188 branch 3 times, most recently from f06f2c5 to e88daa1 Compare March 10, 2020 10:49
@afrittoli
Copy link
Member Author

afrittoli commented Mar 10, 2020

The go-scm patch is merged, and we have a new release, https://github.com/jenkins-x/go-scm/releases/tag/v1.5.79, so the only change in this patch should be the update to go.mod now.

@tomgeorge I believe this might make your life easier for the label check too.

@tekton-robot tekton-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 10, 2020
@afrittoli
Copy link
Member Author

Oh, I need to sync the vendor folder

@ghost ghost added the needs-cherry-pick Indicates a PR needs to be cherry-pick to a release branch label Mar 10, 2020
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 10, 2020
The GitHub API keeps old versions of a status for historical
reasons. The statuses are returned in reverse chronological
order. This patch pulls-in a version of go-scm that handles
this behaviour and only returns the latest status.

Fixes tektoncd#2188

Signed-off-by: Andrea Frittoli <andrea.frittoli@uk.ibm.com>
@tekton-robot tekton-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 10, 2020
@ghost
Copy link

ghost commented Mar 10, 2020

@bobcatfish just reminded me that we've got the pullrequest Catalog Task now which is pinned to a specific version of the pullrequest-init binary. It's going to be a bit painful until we transition the pullrequest Task away from the binary here but we should probably keep that pinned version up to date as well. PR Task is only on the v1beta1-wip branch at the moment in the catalog (see it here)

@wlynch
Copy link
Member

wlynch commented Mar 10, 2020

/lgtm
/approve

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 10, 2020
@afrittoli
Copy link
Member Author

/test pull-tekton-pipeline-integration-tests

@afrittoli
Copy link
Member Author

/test pull-tekton-pipeline-integration-tests

@afrittoli
Copy link
Member Author

@bobcatfish just reminded me that we've got the pullrequest Catalog Task now which is pinned to a specific version of the pullrequest-init binary. It's going to be a bit painful until we transition the pullrequest Task away from the binary here but we should probably keep that pinned version up to date as well. PR Task is only on the v1beta1-wip branch at the moment in the catalog (see it here)

Ack - once this is in the release I will update the catalog task.

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

/lgtm
/meow

@tekton-robot
Copy link
Collaborator

@vdemeester: cat image

In response to this:

/lgtm
/meow

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.

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester, wlynch

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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 10, 2020
@afrittoli
Copy link
Member Author

@vdemeester: cat image

owww, cute

@afrittoli
Copy link
Member Author

/test pull-tekton-pipeline-build-tests

1 similar comment
@afrittoli
Copy link
Member Author

/test pull-tekton-pipeline-build-tests

@tekton-robot tekton-robot merged commit a5794f2 into tektoncd:master Mar 10, 2020
@ghost ghost removed the needs-cherry-pick Indicates a PR needs to be cherry-pick to a release branch label Mar 10, 2020
@afrittoli
Copy link
Member Author

@bobcatfish just reminded me that we've got the pullrequest Catalog Task now which is pinned to a specific version of the pullrequest-init binary. It's going to be a bit painful until we transition the pullrequest Task away from the binary here but we should probably keep that pinned version up to date as well. PR Task is only on the v1beta1-wip branch at the moment in the catalog (see it here)

Ack - once this is in the release I will update the catalog task.

tektoncd/catalog#218
@bobcatfish @sbwsg

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. cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken logic for pull request statuses in PR resource
6 participants