HomePhabricator
Diffusion Comm 003e533f4a6d

[CI] Introduce Harbormaster tag removal script generator

Description

[CI] Introduce Harbormaster tag removal script generator

Summary:
This script

  1. Uses the Phabricator differential.query API (https://phab.comm.dev/conduit/method/differential.query/) to determine which revisions of diffs are no longer relevant (because the diffs have been closed or abandoned)
  2. Writes a new shell script with a series of git commands to remove the git tags associated with those no longer relevant revisions.

The way this script will be used on the CI will be something like:

cd scripts && node generate-phab-removal-script.js
chmod +x tag_removal_script.sh
./tag_removal_script.sh

Test Plan:
Tested locally (with the steps above) and removed a few thousand extraneous tags.

What happens if the script attempts to remove a tag that has already been removed from the repo?

That's fine it's a noop that logs the following:

remote: warning: deleting a non-existent ref

The way the script is written now, we will definitely be attempting to remove tags that have already been removed since we aren't checking whether the tag already exists on remote. This is fine because the remove tag command is idempotent, but I'll address it anyways in a subsequent diff.

Reviewers: ashoat, tomek, jacek, abosh, varun

Reviewed By: abosh, varun

Subscribers: adrian

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

Details

Provenance
atulAuthored on Jul 31 2022, 11:55 AM
Reviewer
abosh
Differential Revision
D4689: [CI] Introduce Harbormaster tag removal script generator
Parents
rCOMMeec927757d3d: [services] Tunnelbroker - Add test for `removeMessageItemsByIDsForDeviceID`…
Branches
Unknown
Tags
Unknown