You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.
The check-forward-deploy check (and probably check-recent-deploy) is very slow when operating on a repo with over 16,000 tags, taking about 10 minutes.
It tries to determine the last deployment tag for the environment:
Retrieving the last deploy tag was a slow operation, taking ~10 mins on
a repo with 16k tags. This was because `Octokit::Client#tags` is a
paginated API call to GitHub, only retrieving 30 at a time. To find the
latest deploy tag, all tags were being pulled back and then filtered and
sorted on the client.
This splits the operation into two parts - first pulling back all tag
names via the `#refs` API operation, and then retrieving the commit SHA
when we know which tag we need.
The refs retrieval supports filtering by prefix - although since most
tags in our repos have the same prefixes, this is only slightly faster.
It however has no pagination, so we can retrieve thousands of ref names
in a single API call fairly quickly, though it doesn't return commit
object information. The `#last_deploy_tag` call now runs in 5.6s against
the same repo with 16k tags, rather than 10 mins.
Fixes#9
The check-forward-deploy check (and probably check-recent-deploy) is very slow when operating on a repo with over 16,000 tags, taking about 10 minutes.
It tries to determine the last deployment tag for the environment:
fa-harness-tools/lib/fa-harness-tools/check_forward_deploy.rb
Lines 19 to 20 in 2df0cb6
However this relies on loading all tags from the GitHub API with pagination and filtering them by prefix:
fa-harness-tools/lib/fa-harness-tools/github_client.rb
Lines 25 to 28 in 2df0cb6
We need a more optimised way of finding the latest deployment tag. Possibly:
deploy-production
prefixed tags.The text was updated successfully, but these errors were encountered: