Skip to content

Conversation

sudo-bmitch
Copy link
Contributor

Fixes issue

Fixes #922.

Describe the change

Add a regsync option to abort on errors. This stops regsync from retrying with backoffs when a registry is failing. Multiple errors are also joined using "errors.Join". Errors from the canceled context are not propagated up.

How to verify it

Use --abort-on-error on a failing registry, e.g. a registry without write access due to auth or or being in read-only mode.

regsync once --abort-on-error --config regsync.yml

Changelog text

  • Feat: regsync option to abort on errors.

Please verify and check that the pull request fulfills the following requirements

  • Tests have been added or not applicable
  • Documentation has been added, updated, or not applicable
  • Changes have been rebased to main
  • Multiple commits to the same code have been squashed

This stops regsync from retrying with backoffs when a registry is failing.
Multiple errors are also joined using "errors.Join".
Errors from the canceled context are not propagated up.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
@sudo-bmitch sudo-bmitch merged commit 4b212e6 into regclient:main Mar 18, 2025
5 checks passed
@sudo-bmitch sudo-bmitch deleted the pr-regsync-err-handling branch March 18, 2025 14:59
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.

[Question] Unauthorized in sync - how to stop trying?
1 participant