Skip to content
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

Persistent Worker: allow pre-pulling specified Tart VMs periodically #796

Merged
merged 2 commits into from
Oct 1, 2024

Conversation

edigaryev
Copy link
Contributor

@edigaryev edigaryev commented Oct 1, 2024

Can be configured as follows:

tart-pre-pull:
  - ghcr.io/cirruslabs/macos-runner:sonoma
  - ghcr.io/cirruslabs/macos-runner:sequoia

Only works when standby is configured and only triggers before the standby creation/re-creation.

@edigaryev edigaryev requested a review from fkorotkov October 1, 2024 11:11
Comment on lines +238 to +246
// Pre-pull the configured Tart VM images first
for _, image := range worker.tartPrePull {
worker.logger.Infof("pre-pulling Tart VM image %q...", image)

if err := tart.PrePull(ctx, image, worker.echelonLogger); err != nil {
worker.logger.Errorf("failed to pre-pull Tart VM image %q: %v", image, err)
}
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Should it be after the next next if statement after locking resources and just before warmup?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, moved in c7b6903.

@edigaryev edigaryev requested a review from fkorotkov October 1, 2024 14:02
@edigaryev edigaryev merged commit 4eece3f into master Oct 1, 2024
11 checks passed
@edigaryev edigaryev deleted the tart-pre-pull branch October 1, 2024 16:40
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