Skip to content

feat(gcpubsub): update existing subscriptions on config changes#2532

Merged
auvipy merged 2 commits into
celery:mainfrom
serl:gcppubsub-update-subscription-config-when-subscription-exists
Apr 29, 2026
Merged

feat(gcpubsub): update existing subscriptions on config changes#2532
auvipy merged 2 commits into
celery:mainfrom
serl:gcppubsub-update-subscription-config-when-subscription-exists

Conversation

@serl
Copy link
Copy Markdown
Contributor

@serl serl commented Apr 28, 2026

When a subscription already exists, update it with the current configuration instead of silently ignoring the AlreadyExists exception. This allows workers to automatically sync subscription settings (ack_deadline_seconds, expiration_policy, message_retention_duration, enable_exactly_once_delivery, filters) without manual intervention in the GCP Console.

Squashed rebase of #2445 (originally authored by ranjith nagaraj rnagaraj13@users.noreply.github.com) onto current main, with conflict resolution to preserve enable_exactly_once_delivery in both the create payload and the update mask.

Fixes #2444 #2445

When a subscription already exists, update it with the current
configuration instead of silently ignoring the AlreadyExists exception.
This allows workers to automatically sync subscription settings
(ack_deadline_seconds, expiration_policy, message_retention_duration,
enable_exactly_once_delivery, filters) without manual intervention in
the GCP Console.

Squashed rebase of celery#2445 (originally authored by
ranjith nagaraj <rnagaraj13@users.noreply.github.com>) onto current
main, with conflict resolution to preserve enable_exactly_once_delivery
in both the create payload and the update mask.

Fixes celery#2444
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.52%. Comparing base (9bece76) to head (e950223).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2532      +/-   ##
==========================================
+ Coverage   82.50%   82.52%   +0.02%     
==========================================
  Files          79       79              
  Lines       10197    10209      +12     
  Branches     1171     1172       +1     
==========================================
+ Hits         8413     8425      +12     
  Misses       1582     1582              
  Partials      202      202              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@auvipy auvipy added this to the 5.7.0 milestone Apr 28, 2026
@auvipy
Copy link
Copy Markdown
Member

auvipy commented Apr 28, 2026

the integration test failures are not related to this PR

@auvipy auvipy self-requested a review April 29, 2026 07:39
@auvipy auvipy added the GCP label Apr 29, 2026
@auvipy auvipy merged commit 41ea84a into celery:main Apr 29, 2026
36 checks passed
@serl serl deleted the gcppubsub-update-subscription-config-when-subscription-exists branch April 29, 2026 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GCP Pub/Sub: Update existing subscriptions when configuration changes instead of silently ignoring

2 participants