Skip to content

[image-builder] Introduce retry for all resolver requests (timeout 15s, up to 3 times) for all network-related issues #20868

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

Merged
merged 4 commits into from
Jun 5, 2025

Conversation

geropl
Copy link
Member

@geropl geropl commented Jun 2, 2025

Description

Uses a custom RoundTripper for Resolve calls which:

  • times out after 15s latest
  • if it's a network error, or timeout error, it retires (up to 3 times)

Enabled with feature flag imagebuilder_retry_resolve

Looking for an in-depth code review, to pick up any issues I did not see 🙏

Related Issue(s)

Fixes CLC-1367

How to test

Documentation

Preview status

gitpod:summary

Build Options

Build
  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer
  • analytics=segment
  • with-dedicated-emulation
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • /werft preemptible
    Saves cost. Untick this only if you're really sure you need a non-preemtible machine.
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh. If enabled, with-preview and with-large-vm will be enabled.
  • with-monitoring

/hold

geropl added 4 commits June 5, 2025 06:36
…esolved on startup

[image-builder] Drop superfluous imports

[image-builder] Switch to github.com/hashicorp/go-retryablehttp, incl. better unit tests at orchestrator level!
@geropl geropl force-pushed the gpl/1367-resolve branch from 7b1c075 to df93f6a Compare June 5, 2025 06:50
Copy link
Contributor

@iQQBot iQQBot left a comment

Choose a reason for hiding this comment

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

using network policy blocked all egress for image-builder-mk3, it can actually retry, and final failed with several times retry.

image image

and then restart a new workspace, during retry, I deleted the network policy, retry actually works, image build start successfully.

image image

@geropl
Copy link
Member Author

geropl commented Jun 5, 2025

/unhold

@roboquat roboquat merged commit c568be5 into main Jun 5, 2025
19 checks passed
@roboquat roboquat deleted the gpl/1367-resolve branch June 5, 2025 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants