Return all open PRs instead of filtering by date #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
From the original commit:
This problem is not fixed upstream, but it is discussed in telia-oss#205. There are a few solutions provided:
digitalocean/github-pr-resource
Right now we're using solution 1, using
opendoor/digitalocean-github-pr-resource
in only the code pipeline. In all other pipelines we useopendoor/telia-oss-github-pr-resource
, which is based on the master branch in this repo and contains caching improvements to reduce GitHub API token usage.Instead of using two different version, I've applied ctreatma@50ef79a to our branch, fixed the merge conflicts and made tests pass. Once this is merged in, all pipelines can use a single version of this resource which has all the required features:
This fixes the issue by not filtering on date at all, with deduplication happening at the DB layer in concourse. In theory this will increase the DB resource usage, but that's sitting at 5% today and has never been a bottleneck.
Hopefully the api caching part will reduce the GitHub API token usage of the
code
pipeline, which is almost at the limit of a single user already.Test Plan
go test -race -v ./...
test manually
bm-fix-telia-oss-26
latest
latest
To deploy:
bm-fix-telia-oss-26
tolatest