HomePhabricator
Diffusion Comm 7b4d5315646a

[CI] Add `getRemoteGitTags()` to Harbormaster tag removal script

Description

[CI] Add getRemoteGitTags() to Harbormaster tag removal script

Summary:
Right now we're attempting to remove tags associated with diffs that have been "Closed" or "Abandoned".

However, we didn't have a check to see whether or not the tag actually existed on remote (eg had already been removed). This was fine since the command to remove git tag is idempotent and we just get a warning (see below) when we attempt to delete a tag that doesn't exist.

remote: warning: deleting a non-existent ref

However, after pushing to master and kicking off the first run of the workflow, it looks like these extra commands can be pretty slow (https://github.com/CommE2E/comm/runs/7618422763?check_suite_focus=true).

Just added a .filter(...) to getGitTagsToBeRemoved to ensure that we only run the git remove tag command for tags that actually exist at remote. I totally should have done this earlier tbh.

Test Plan: Tested locally and ensured that all the tags in the generated tag_removal_script.sh existed on remote.

Reviewers: abosh, varun, tomek

Reviewed By: varun

Subscribers: ashoat, adrian

Differential Revision: https://phab.comm.dev/D4703

Details

Provenance
atulAuthored on Aug 1 2022, 12:53 PM
Reviewer
varun
Differential Revision
D4703: [CI] Add `getRemoteGitTags()` to Harbormaster tag removal script
Parents
rCOMMee4a0f41af7b: [CI] Add removal of irrelevant Harbormaster git tags to GH Actions
Branches
Unknown
Tags
Unknown