Skip to content

Conversation

@Alphasite
Copy link

@Alphasite Alphasite commented Jan 28, 2026

CLI counterpart to cloudfoundry/bosh#2656

The goal is to allow resumption of failed bosh repave (recreate) from where it failed, speeding up repave operations.

CLI counterpart to !2656

The goal is to allow resumption of failed bosh repave (recreate) from where it failed, speeding up repave operations.
cmd/opts/opts.go Outdated
SkipUploadReleases bool `long:"skip-upload-releases" description:"Skips the upload procedure for releases"`
Recreate bool `long:"recreate" description:"Recreate all VMs in deployment"`
RecreatePersistentDisks bool `long:"recreate-persistent-disks" description:"Recreate all persistent disks in deployment"`
RecreateVMsCreatedBefore string `long:"recreate-vms-created-before" description:"Only recreate VMs created before the given RFC 3339 timestamp (requires --recreate)"`
Copy link
Member

Choose a reason for hiding this comment

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

Could this be a time.Time or similar in stead of a plain string?

It seems like the a string type here means that the CLI will rely on the bosh director (and the round-trip) to validate the contents of this string.

Having this typed would also eliminate the mysterious "" arg added various places.

Copy link
Author

Choose a reason for hiding this comment

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

Hmm I can try and see how it works, I’m not sure if the library can handle it though…

Copy link
Author

Choose a reason for hiding this comment

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

ok, hows that?

@Alphasite Alphasite requested a review from aramprice January 29, 2026 19:56
@Alphasite
Copy link
Author

See other pr for manual testing

@Alphasite Alphasite marked this pull request as ready for review January 30, 2026 04:03
Replace opaque string types with proper time.Time for the
recreate-vms-created-before and vms-created-before flags. This provides
type safety, validation at parse time, and clearer error messages for
invalid RFC 3339 timestamps.

- Add TimeArg type with UnmarshalFlag for parsing RFC 3339 timestamps
- Update DeployOpts and RecreateOpts to use TimeArg
- Update director UpdateOpts and RecreateOpts to use time.Time
- Add comprehensive tests for TimeArg parsing and formatting
@Alphasite Alphasite force-pushed the recreate-vms-timestamp branch from df07972 to 8cd5366 Compare January 30, 2026 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

2 participants