Skip to content

ci: Avoid cancelling release-drafter ack jobs when PRs are opened - #167

Open
edgarrmondragon wants to merge 1 commit into
mainfrom
ci/ack-workflow-no-cancel
Open

edgarrmondragon wants to merge 1 commit into
mainfrom
ci/ack-workflow-no-cancel

Conversation

@edgarrmondragon

@edgarrmondragon edgarrmondragon commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Small but annoying issue: a new PR triggers the opened event, then labels are added, so a few labeled events are added. This combined with the concurreny config recommended by zizmor, causes the job to be cancelled.

Fix: make a concurrency group per PR (or per merge queue branch) and queue in-flight runs of ack.yml instead of cancelling.

Small but annoying issue: a new PR triggers the `opened` event, then
labels are added, so a few `labeled` events are added. This combined
with the concurreny config recommended by zizmor, cause the job to be
cancelled.

Instead: make a concurrency group per PR (or per merge queue branch) and
don't cancel in-flight runs of `ack.yml`.

Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
@henryiii

Copy link
Copy Markdown
Contributor

These will be disabled in just a few days. https://github.blog/changelog/2026-11-02-pull_request_target-blocked-by-default-december-2/

There might be a setting we can change, it looks like.

@edgarrmondragon

edgarrmondragon commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator Author

There might be a setting we can change, it looks like.

I think we can import something like

policy.json

policy.json

{
  "id": 9999,
  "name": "Allow PR labeling from forks",
  "target": "actions",
  "source_type": "Repository",
  "source": "pytest-dev/pytest-github-actions-annotate-failures",
  "enforcement": "active",
  "conditions": {
    "workflow_path": {
      "exclude": [],
      "include": [
        ".github/workflows/ack.yml"
      ]
    }
  },
  "rules": [
    {
      "type": "restrict_action_events",
      "parameters": {
        "allowed_events": [
          "merge_group",
          "pull_request_target"
        ]
      }
    }
  ],
  "bypass_actors": []
}

in https://github.com/pytest-dev/pytest-github-actions-annotate-failures/settings/actions/rules (I don't have such access though). That should allow just this workflow to be triggered by the pull_request_target event.

@edgarrmondragon

Copy link
Copy Markdown
Collaborator Author

I'm curious what @ssbarnea thinks

This branch was successfully deployed

1 active deployment
ack — d85c2e26 Deployed Nov 1, 2026 by edgarrmondragon via Acknowledge pull request / ack #224
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants