Skip to content

Remove PR ref from delete workflow#170

Merged
sarahchen6 merged 1 commit into
masterfrom
sarahchen6/delete-pr-ref
Jul 7, 2026
Merged

Remove PR ref from delete workflow#170
sarahchen6 merged 1 commit into
masterfrom
sarahchen6/delete-pr-ref

Conversation

@sarahchen6

Copy link
Copy Markdown
Contributor

Since README instructions recommend deleting the images after merge, the tested PR's changes will already be in master when we want to delete its test images.

Moreover, after the PR is merged, GitHub removes references to refs/pull/${{ github.event.inputs.pr_number }}/merge.

See: https://github.com/DataDog/dd-trace-java-docker-build/actions/runs/28878825640/job/85661134146

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a4fb67a500

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -24,7 +24,6 @@ jobs:
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
path: dd-trace-java-docker-build

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve cleanup for unmerged variant-change PRs

When cleanup is needed before the source PR is merged or after it is closed without merging, this now checks out the default workflow ref instead of the PR ref. The create workflow still runs the PR version of scripts/create-test-mirror-entries.sh, which writes tags from that PR's CI_VARIANTS, while delete-test-mirror-entries.sh reconstructs an exact mirror.yaml block from the checked-out script and exits if it does not match. A PR that adds/removes a variant can therefore create mirror entries that this delete workflow cannot remove unless the PR has already landed; consider falling back to the PR ref when it exists or deleting by prefix rather than by the default-branch variant list.

Useful? React with 👍 / 👎.

@sarahchen6 sarahchen6 merged commit 0e4a2a5 into master Jul 7, 2026
6 checks passed
@sarahchen6 sarahchen6 deleted the sarahchen6/delete-pr-ref branch July 7, 2026 16:42
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