-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding ignore errors and retries for continue on error/fail on error #368
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zackbradys
added
enhancement
New feature or request
size/M
Denotes an issue/PR requiring a relatively moderate amount of work
priority/review
labels
Nov 23, 2024
This was
linked to
issues
Nov 23, 2024
zackbradys
changed the title
adding strict mode and retries for continue on error/fail on error
adding ignore errors and retries for continue on error/fail on error
Nov 30, 2024
without --ignore-errorszackbradys@Zacks-MacBook-Pro hauler % ./dist/hauler_darwin_arm64_v8.0/hauler store sync --files testdata/hauler-manifest.yaml
2024-11-30 09:45:20 INF syncing [content.hauler.cattle.io/v1alpha1, Kind=Images] to store
2024-11-30 09:45:20 INF adding 'image' [busybox] to the store
2024-11-30 09:45:29 INF successfully added 'image' [index.docker.io/library/busybox:latest]
2024-11-30 09:45:29 INF adding 'image' [busybox:stables] to the store
2024-11-30 09:45:30 ERR error (attempt 1/3)... getting image "index.docker.io/library/busybox:stables": GET https://index.docker.io/v2/library/busybox/manifests/stables: MANIFEST_UNKNOWN: manifest unknown; unknown tag=stables
2024-11-30 09:45:35 ERR error (attempt 2/3)... getting image "index.docker.io/library/busybox:stables": GET https://index.docker.io/v2/library/busybox/manifests/stables: MANIFEST_UNKNOWN: manifest unknown; unknown tag=stables
2024-11-30 09:45:41 ERR error (attempt 3/3)... getting image "index.docker.io/library/busybox:stables": GET https://index.docker.io/v2/library/busybox/manifests/stables: MANIFEST_UNKNOWN: manifest unknown; unknown tag=stables
2024-11-30 09:45:41 ERR unable to add 'image' [index.docker.io/library/busybox:stables] to store: operation unsuccessful after 3 attempts
Error: operation unsuccessful after 3 attempts
Usage:
hauler store sync [flags]
Flags:
-f, --files strings Location of content manifests (files)... i.e. --files ./rke2-files.yaml
-h, --help help for sync
-k, --key string (Optional) Location of public key to use for signature verification
-p, --platform string (Optional) Specify the platform of the image... i.e linux/amd64 (defaults to all)
-c, --product-registry string (Optional) Specify the product registry. Defaults to RGS Carbide Registry (rgcrprod.azurecr.us)
--products strings (Optional) Specify the product name to fetch collections from the product registry i.e. rancher=v2.8.5,rke2=v1.28.11+rke2r1
-g, --registry string (Optional) Specify the registry of the image for images that do not alredy define one
Global Flags:
-d, --haulerdir string Set the location of the hauler directory (default $HOME/.hauler)
--ignore-errors Ignore/Bypass errors (i.e. warn on error) (defaults false)
-l, --log-level string Set the logging level (i.e. info, debug, warn) (default "info")
-r, --retries int Set the number of retries for operations (default 3)
-s, --store string Set the directory to use for the content store (default "store")
2024-11-30 09:45:41 ERR operation unsuccessful after 3 attempts with ignore-errorszackbradys@Zacks-MacBook-Pro hauler % ./dist/hauler_darwin_arm64_v8.0/hauler store sync --ignore-errors --files testdata/hauler-manifest.yaml
2024-11-30 09:45:59 INF syncing [content.hauler.cattle.io/v1alpha1, Kind=Images] to store
2024-11-30 09:45:59 INF adding 'image' [busybox] to the store
2024-11-30 09:46:09 INF successfully added 'image' [index.docker.io/library/busybox:latest]
2024-11-30 09:46:09 INF adding 'image' [busybox:stables] to the store
2024-11-30 09:46:09 WRN warning (attempt 1/3)... getting image "index.docker.io/library/busybox:stables": GET https://index.docker.io/v2/library/busybox/manifests/stables: MANIFEST_UNKNOWN: manifest unknown; unknown tag=stables
2024-11-30 09:46:15 WRN warning (attempt 2/3)... getting image "index.docker.io/library/busybox:stables": GET https://index.docker.io/v2/library/busybox/manifests/stables: MANIFEST_UNKNOWN: manifest unknown; unknown tag=stables
2024-11-30 09:46:20 WRN warning (attempt 3/3)... getting image "index.docker.io/library/busybox:stables": GET https://index.docker.io/v2/library/busybox/manifests/stables: MANIFEST_UNKNOWN: manifest unknown; unknown tag=stables
2024-11-30 09:46:20 WRN unable to add 'image' [index.docker.io/library/busybox:stables] to store: operation unsuccessful after 3 attempts... skipping...
2024-11-30 09:46:20 INF adding 'image' [gcr.io/distroless/base@sha256:7fa7445dfbebae4f4b7ab0e6ef99276e96075ae42584af6286ba080750d6dfe5] to the store
2024-11-30 09:46:23 INF successfully added 'image' [gcr.io/distroless/base@sha256:7fa7445dfbebae4f4b7ab0e6ef99276e96075ae42584af6286ba080750d6dfe5]
2024-11-30 09:46:23 INF syncing [content.hauler.cattle.io/v1alpha1, Kind=Charts] to store
2024-11-30 09:46:23 INF adding 'chart' [rancher] to the store
2024-11-30 09:46:24 INF successfully added 'chart' [hauler/rancher:2.8.5]
2024-11-30 09:46:24 INF adding 'chart' [hauler-helm] to the store
Pulled: ghcr.io/hauler-dev/hauler-helm:1.1.0
Digest: sha256:7b3524029fee18c886b56c174d5a558e9b7ecdf464372a2aee48fe1da9128cee
2024-11-30 09:46:25 INF successfully added 'chart' [hauler/hauler-helm:1.1.0]
2024-11-30 09:46:25 INF syncing [content.hauler.cattle.io/v1alpha1, Kind=Files] to store
2024-11-30 09:46:25 INF adding 'file' [https://get.rke2.io] to the store as [hauler/install.sh:latest]
2024-11-30 09:46:25 INF successfully added 'file' [hauler/install.sh:latest]
2024-11-30 09:46:25 INF adding 'file' [testdata/hauler-manifest.yaml] to the store as [hauler/hauler-manifest.yaml:latest]
2024-11-30 09:46:25 INF successfully added 'file' [hauler/hauler-manifest.yaml:latest] |
dweomer
approved these changes
Dec 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
priority/review
size/M
Denotes an issue/PR requiring a relatively moderate amount of work
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
adding strict mode for continue on error/fail on error
Please check below, if the PR fulfills these requirements:
Associated Links:
Types of Changes:
Proposed Changes:
--retries/-r
that allows users to set the number of retries when fetching artifacts--ignore-errors
and environment variable ofHAULER_IGNORE_ERRORS
that currently enables/allows users to havehauler
warn upon encountering an errorVerification/Testing of Changes:
Additional Context: