diff --git a/subcommands/waves/init.go b/subcommands/waves/init.go index 0bab2f07..62bdf802 100644 --- a/subcommands/waves/init.go +++ b/subcommands/waves/init.go @@ -27,7 +27,12 @@ func init() { This command only initializes a wave, but does not provision its updates to devices. Use a "fioctl wave rollout " to trigger updates of this wave to a device group. Use a "fioctl wave complete " to update all devices (make it globally available). -Use a "fioctl wave cancel to cancel a wave (make it no longer available).`, +Use a "fioctl wave cancel to cancel a wave (make it no longer available). + +We recommend that you generate static deltas for your production targets to optimize +the size of the update. Please, consider generating a static delta for targets using: +$ fioctl targets static-deltas. +`, Run: doInitWave, Args: cobra.ExactArgs(3), Example: ` @@ -145,6 +150,24 @@ func doInitWave(cmd *cobra.Command, args []string) { } else { subcommands.DieNotNil(api.FactoryCreateWave(factory, &wave), "Failed to create a wave") } + + if !hasStaticDelta() { + fmt.Print(` +WARNING: You created a wave for a target version without static deltas. + +We recommend that you generate static deltas for your production targets to optimize +the size of the update. Please, consider generating a static delta for targets using: +$ fioctl targets static-deltas. + +You can then cancel this wave and create a new one for a target with a static delta. +`) + + } +} + +func hasStaticDelta() bool { + // TODO: + return true } func pruneTargets(currentTargets *client.AtsTargetsMeta, versions []string) client.AtsTargetsMeta {