Skip to content

Commit

Permalink
fix: image pull retry logic (#139)
Browse files Browse the repository at this point in the history
Issue #, if available:

*Description of changes:*
Earlier push had a bug as we want to check logic for exit code outside
for image pull

*Testing done:*



- [ ] I've reviewed the guidance in CONTRIBUTING.md


#### License Acceptance

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.

Signed-off-by: Shubharanshu Mahapatra <[email protected]>
  • Loading branch information
Shubhranshu153 authored Mar 27, 2024
1 parent a25bc55 commit 4c30166
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func SetupLocalRegistry(o *option.Option) {
// retry pull for 3 times
var session *gexec.Session
for i := 0; i < retryPull; i++ {
session = command.New(o, "pull", ref).WithTimeoutInSeconds(30).WithoutSuccessfulExit().Run()
session = command.New(o, "pull", ref).WithTimeoutInSeconds(30).WithoutCheckingExitCode().Run()
if session.ExitCode() == 0 {
break
}
Expand Down

0 comments on commit 4c30166

Please sign in to comment.