Skip to content

Fix PubSub subscription path double-prefix in stale_cleaner (#39772) - #39778

Open
waterWang wants to merge 1 commit into
apache:masterfrom
waterWang:fix/stale-cleaner-subscription-path
Open

Fix PubSub subscription path double-prefix in stale_cleaner (#39772)#39778
waterWang wants to merge 1 commit into
apache:masterfrom
waterWang:fix/stale-cleaner-subscription-path

Conversation

@waterWang

Copy link
Copy Markdown

The Clean Up GCP Resources workflow (beam_CleanUpGCPResources.yml) fails
over 80% of the time. Root cause:

PubSubSubscriptionCleaner._delete_resource() calls
subscription_path(project_id, resource_name) on a resource name that is
already a fully-qualified path from list_subscriptions(). This produces
projects/<project>/subscriptions/projects/<project>/subscriptions/<sub-id>
which GCP rejects with InvalidArgument: 400 Invalid resource name given.

PubSubTopicCleaner._delete_resource() correctly passes the full path
directly to delete_topic(). This fix mirrors that pattern.

Fixes #39772

…9772)

PubSubSubscriptionCleaner._delete_resource() receives resource names from
list_subscriptions() which are already fully-qualified paths
(e.g. "projects/<project>/subscriptions/<sub-id>"). Calling
subscription_path() on them double-prefixes the path, producing
"projects/<project>/subscriptions/projects/<project>/subscriptions/<sub-id>"
which GCP rejects with InvalidArgument 400.

The PubSubTopicCleaner._delete_resource() already handles this correctly
by passing the full path directly to delete_topic().

Signed-off-by: waterWang <waterwang@apache.org>
@github-actions github-actions Bot added the infra label Aug 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @kennknowles added as fallback since no labels match configuration

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

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.

The Clean Up GCP Resources job is flaky

1 participant