Page MenuHomePhabricator

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

Authored by atul on Aug 1 2022, 12:57 PM.
Tags
None
Referenced Files
F3532925: D4703.diff
Wed, Dec 25, 10:20 AM
Unknown Object (File)
Wed, Nov 27, 9:38 AM
Unknown Object (File)
Nov 20 2024, 12:30 AM
Unknown Object (File)
Nov 9 2024, 11:38 AM
Unknown Object (File)
Nov 8 2024, 8:36 PM
Unknown Object (File)
Nov 8 2024, 8:36 PM
Unknown Object (File)
Nov 5 2024, 2:06 AM
Unknown Object (File)
Oct 7 2024, 4:57 AM
Subscribers

Details

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.

Diff Detail

Repository
rCOMM Comm
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage