Skip to content

feat: pull with retries before building#809

Open
HastD wants to merge 1 commit into
blue-build:mainfrom
HastD:retry-pull
Open

feat: pull with retries before building#809
HastD wants to merge 1 commit into
blue-build:mainfrom
HastD:retry-pull

Conversation

@HastD

@HastD HastD commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

This should reduce the frequency of build failures caused by network/server issues when pulling a remote image before building.

Additionally, improve the retry utility functions:

  • Make the retry functions accept a Duration rather than a u64 representing seconds. This makes it clear at the call site that the argument represents a duration.
  • Make retry_async use tokio::time::sleep instead of the blocking std::thread::sleep. Async functions shouldn't block for an extended period of time.

@HastD HastD requested a review from gmpinder as a code owner July 2, 2026 14:49

@gmpinder gmpinder left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there's a bug in the logic you introduced. It's trying to pull images that don't exist yet

@HastD

HastD commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

Oops, I see the issue, it's trying to pull the image to be created, but it should pull the base image instead. One sec, fixing it.

This should reduce the frequency of build failures caused by
network/server issues when pulling a remote image before building.

Additionally, improve the retry utility functions:
* Make the retry functions accept a `Duration` rather than a `u64`
  representing seconds. This makes it clear at the call site that the
  argument represents a duration.
* Make `retry_async` use `tokio::time::sleep` instead of the blocking
  `std::thread::sleep`. Async functions shouldn't block for an extended
  period of time.
@HastD HastD requested a review from gmpinder July 2, 2026 15:34
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