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
F2186646: D4703.diff
Thu, Jul 4, 3:43 AM
Unknown Object (File)
Tue, Jul 2, 7:19 PM
Unknown Object (File)
Fri, Jun 21, 4:06 PM
Unknown Object (File)
Fri, Jun 21, 4:06 PM
Unknown Object (File)
Fri, Jun 21, 4:05 PM
Unknown Object (File)
Fri, Jun 21, 3:54 PM
Unknown Object (File)
Thu, Jun 20, 8:29 AM
Unknown Object (File)
Wed, Jun 12, 4:09 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable