Skip to content

Make changeset endpoint delivery attempts configurable (disable retries via env) - #1064

Open
arielr-lt wants to merge 2 commits into
masterfrom
feat/configurable-changeset-endpoint-attempts
Open

Make changeset endpoint delivery attempts configurable (disable retries via env)#1064
arielr-lt wants to merge 2 commits into
masterfrom
feat/configurable-changeset-endpoint-attempts

Conversation

@arielr-lt

Copy link
Copy Markdown
Collaborator

What

Makes the number of changeset → Publisher delivery attempts configurable via a new env var REGISTRY_CHANGESET_SYNC_ENDPOINT_ATTEMPTS (default 3, minimum 1). Previously the attempt count was hardcoded (ENDPOINT_DELIVERY_ATTEMPTS = 3) with no way to tune it.

Setting it to 1 makes the registry POST each changeset to the Publisher exactly once — no retries.

Why

The Publisher stores the changeset on the first POST (it currently returns a non-2xx only on a later workflow-submission step). On our side, any non-2xx is treated as a failed delivery and retried up to 3× under the publish-lock, which (a) re-POSTs/re-stores the same changeset multiple times on the Publisher side and (b) holds the publish-lock longer. The Publisher team asked us not to retry the upload endpoint. The only retry-related config today is the interval, not the count — so this needs a code change.

Change

  • changeset_endpoint_attempts reads REGISTRY_CHANGESET_SYNC_ENDPOINT_ATTEMPTS (defaults to the existing constant, clamped to ≥ 1).
  • deliver_changeset_to_endpoint uses it instead of the hardcoded constant. No behavior change unless the env var is set.

To activate in prod (separate config, not in this PR)

Set in the credreg-prod configmap and deploy the new image:

REGISTRY_CHANGESET_SYNC_ENDPOINT_ATTEMPTS: "1"

Default (3) is unchanged for all other environments.

Ariel Rolfo added 2 commits August 12, 2026 17:43
Add REGISTRY_CHANGESET_SYNC_ENDPOINT_ATTEMPTS env var (default 3, min 1) so the
number of delivery attempts can be tuned per environment. Set to 1 to POST each
changeset to the Publisher endpoint exactly once with no retries.
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