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

Add flag to disable container spec validation when restoring checkpoints #11323

Merged

Conversation

cweld510
Copy link
Contributor

This PR adds a new flag entitled skip-restore-spec-validation-unsafe, defaulting to false. If the flag is set, the container spec given when restoring a checkpoint will no longer be validated against the original container spec given when the checkpoint was taken. In practice, many spec differences are benign, and it can be useful to allow the container specs to vary somewhat between checkpoint and restore. See #11307 .

@EtiennePerot
Copy link
Contributor

Please move the word "unsafe" to beginning of the flag/variable name (--unsafe-skip-restore-spec-validation); otherwise it kind of sounds like it is skipping something unsafe (which would be a safe thing to do).

@cweld510
Copy link
Contributor Author

Thanks, done!

@cweld510 cweld510 force-pushed the cweld/skip-spec-validation-unsafe branch from c9dc733 to 8cfb7df Compare December 27, 2024 23:05
@@ -132,7 +132,7 @@ func (r *restorer) restoreContainerInfo(l *Loader, info *containerInfo) error {

if len(r.containers) == r.totalContainers {
// Trigger the restore if this is the last container.
return r.restore(l)
return r.restore(l, info.conf.SkipRestoreSpecValidationUnsafe)
Copy link
Contributor

Choose a reason for hiding this comment

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

Still need to update this one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed; really sorry about that.

@cweld510 cweld510 force-pushed the cweld/skip-spec-validation-unsafe branch from 8cfb7df to 17b2c1b Compare December 30, 2024 16:33
copybara-service bot pushed a commit that referenced this pull request Dec 30, 2024
This PR adds a new flag entitled `skip-restore-spec-validation-unsafe`, defaulting to false. If the flag is set, the container spec given when restoring a checkpoint will no longer be validated against the original container spec given when the checkpoint was taken. In practice, many spec differences are benign, and it can be useful to allow the container specs to vary somewhat between checkpoint and restore. See #11307 .

FUTURE_COPYBARA_INTEGRATE_REVIEW=#11323 from cweld510:cweld/skip-spec-validation-unsafe 17b2c1b
PiperOrigin-RevId: 710752422
copybara-service bot pushed a commit that referenced this pull request Dec 30, 2024
This PR adds a new flag entitled `skip-restore-spec-validation-unsafe`, defaulting to false. If the flag is set, the container spec given when restoring a checkpoint will no longer be validated against the original container spec given when the checkpoint was taken. In practice, many spec differences are benign, and it can be useful to allow the container specs to vary somewhat between checkpoint and restore. See #11307 .

FUTURE_COPYBARA_INTEGRATE_REVIEW=#11323 from cweld510:cweld/skip-spec-validation-unsafe 17b2c1b
PiperOrigin-RevId: 710752422
@copybara-service copybara-service bot merged commit 0a28828 into google:master Dec 30, 2024
5 checks passed
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.

2 participants