Skip to content

fix: Debounce releases and skip empty tags in code workflow#1983

Merged
charlesvien merged 10 commits intomainfrom
05-02-skip_empty_releases_in_code_tag_workflow
May 4, 2026
Merged

fix: Debounce releases and skip empty tags in code workflow#1983
charlesvien merged 10 commits intomainfrom
05-02-skip_empty_releases_in_code_tag_workflow

Conversation

@charlesvien
Copy link
Copy Markdown
Member

@charlesvien charlesvien commented May 2, 2026

Problem

Scheduled releases can fire mid stack merge (we all use Graphite) and the workflow crashes trying to create tags that already exist.

Changes

  1. Add a debounce check that waits for 15m of commit inactivity before tagging on scheduled releases
  2. Re-dispatch the workflow instead of blocking the runner with a long sleep
  3. Skip gracefully when the computed tag already exists

How did you test this?

I did not, we should make a simple ACT tooling setup to test this stuff easily.

@charlesvien charlesvien changed the title Skip empty releases in code tag workflow fix: Skip empty releases in code tag workflow May 2, 2026
@charlesvien charlesvien changed the title fix: Skip empty releases in code tag workflow fix: Debounce releases and skip empty tags in code-tag workflow May 3, 2026
@charlesvien charlesvien changed the title fix: Debounce releases and skip empty tags in code-tag workflow fix: Debounce releases and skip empty tags in code workflow May 3, 2026
@charlesvien charlesvien force-pushed the 05-02-fix_stacked_chevrons_in_project_select_dropdowns branch from e396426 to b936821 Compare May 3, 2026 08:53
@charlesvien charlesvien force-pushed the 05-02-skip_empty_releases_in_code_tag_workflow branch from 9e4a4a8 to 231aed4 Compare May 3, 2026 08:53
@charlesvien charlesvien marked this pull request as ready for review May 3, 2026 17:55
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 3, 2026

Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
.github/scripts/compute-release-tag.sh:41
**`base_tag` output is never consumed**

The script outputs `base_tag=$LATEST_TAG` on stdout, but the workflow only parses `tag=` from `$RESULT` (via `grep '^tag='`). The `base_tag` line goes into `$RESULT` and is silently discarded. Per simplicity rule #4, this is a superfluous part — either remove the `base_tag` echo or consume it in the workflow (e.g. enrich the "Creating tag" log line).

### Issue 2 of 2
.github/scripts/compute-release-tag.test.sh:68-159
**Tests not parameterised**

Every test case repeats the same `setup_repo``run_script``assert_*``teardown_repo` pattern. The team convention is to prefer parameterised tests. A data-driven table of `(description, setup_commands, expected_exit, expected_stdout_contains, expected_stderr_contains)` tuples iterated by a single `run_test` function would eliminate the repetition and make adding new cases trivial.

Reviews (1): Last reviewed commit: "Harden test cleanup and TMPDIR fallback" | Re-trigger Greptile

Comment thread .github/scripts/compute-release-tag.sh Outdated
Comment thread .github/scripts/compute-release-tag.test.sh Outdated
@charlesvien charlesvien force-pushed the 05-02-skip_empty_releases_in_code_tag_workflow branch from 231aed4 to ccfdb79 Compare May 3, 2026 23:13
@charlesvien charlesvien force-pushed the 05-02-fix_stacked_chevrons_in_project_select_dropdowns branch from b936821 to aaa1c0d Compare May 3, 2026 23:13
@charlesvien charlesvien force-pushed the 05-02-skip_empty_releases_in_code_tag_workflow branch from ccfdb79 to ae2ccda Compare May 4, 2026 01:38
@charlesvien charlesvien force-pushed the 05-02-fix_stacked_chevrons_in_project_select_dropdowns branch from aaa1c0d to 833d5a4 Compare May 4, 2026 01:38
Copy link
Copy Markdown
Contributor

@jonathanlab jonathanlab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, lets try this and see if we like it

Copy link
Copy Markdown
Member Author

charlesvien commented May 4, 2026

Merge activity

  • May 4, 6:05 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • May 4, 6:18 PM UTC: Graphite rebased this pull request as part of a merge.
  • May 4, 6:28 PM UTC: @charlesvien merged this pull request with Graphite.

@charlesvien charlesvien changed the base branch from 05-02-fix_stacked_chevrons_in_project_select_dropdowns to graphite-base/1983 May 4, 2026 18:06
@charlesvien charlesvien changed the base branch from graphite-base/1983 to main May 4, 2026 18:16
@charlesvien charlesvien force-pushed the 05-02-skip_empty_releases_in_code_tag_workflow branch from ae2ccda to 7ba8c45 Compare May 4, 2026 18:17
@charlesvien charlesvien merged commit 7e65d8f into main May 4, 2026
16 checks passed
@charlesvien charlesvien deleted the 05-02-skip_empty_releases_in_code_tag_workflow branch May 4, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants