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

(feat): Warning users about create OSTree static deltas before rolling out waves #285

Conversation

camilamacedo86
Copy link
Contributor

@camilamacedo86 camilamacedo86 commented Sep 28, 2023

Adds a warning message to inform users about the recommendation to use Static Deltas to optimize OTA downloads.
The message only appears when users create weaves that do not have static deltas.

Local tests:

When no Static Deltas are in place:

Screenshot 2023-10-03 at 01 37 14

@camilamacedo86 camilamacedo86 changed the title (feat): Warning users about create OSTree static deltas before rolling out waves WIP: (feat): Warning users about create OSTree static deltas before rolling out waves Sep 28, 2023
subcommands/waves/init.go Outdated Show resolved Hide resolved
subcommands/waves/init.go Outdated Show resolved Hide resolved
subcommands/waves/init.go Outdated Show resolved Hide resolved
subcommands/waves/init.go Outdated Show resolved Hide resolved
@camilamacedo86 camilamacedo86 force-pushed the add-warning-before-create-weave-init branch 3 times, most recently from 3db8013 to 854ab1c Compare October 1, 2023 08:46
subcommands/waves/init.go Outdated Show resolved Hide resolved
subcommands/waves/init.go Outdated Show resolved Hide resolved
@camilamacedo86 camilamacedo86 force-pushed the add-warning-before-create-weave-init branch 3 times, most recently from 5f63f5e to 7ded640 Compare October 3, 2023 00:46
@camilamacedo86 camilamacedo86 changed the title WIP: (feat): Warning users about create OSTree static deltas before rolling out waves (feat): Warning users about create OSTree static deltas before rolling out waves Oct 3, 2023
@camilamacedo86 camilamacedo86 changed the title (feat): Warning users about create OSTree static deltas before rolling out waves WIP: (feat): Warning users about create OSTree static deltas before rolling out waves Oct 3, 2023
@camilamacedo86 camilamacedo86 changed the title WIP: (feat): Warning users about create OSTree static deltas before rolling out waves (feat): Warning users about create OSTree static deltas before rolling out waves Oct 3, 2023
Copy link
Contributor

@kprosise kprosise left a comment

Choose a reason for hiding this comment

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

Left some minor, and optional suggestions.

subcommands/waves/init.go Outdated Show resolved Hide resolved
subcommands/waves/init.go Outdated Show resolved Hide resolved
OTA update download. 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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
You can then cancel this wave and create a new one for a target with a static delta.
You can then cancel the wave and create a new one by using a static delta.

Optional suggestion! Just shortening the sentence a bit.

Copy link
Member

Choose a reason for hiding this comment

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

@kprosise @camilamacedo86 This suggestion makes a message somewhat misleading.

A user cannot create a wave by using a static delta, but a user can create a wave for a target which has static deltas defined.

So, I suggest to either revert this message to its original, or make a new suggestion which provides a more accurate context to the user.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree. Good point.

@camilamacedo86 camilamacedo86 force-pushed the add-warning-before-create-weave-init branch from 7ded640 to df7ac89 Compare October 3, 2023 13:38
@camilamacedo86 camilamacedo86 merged commit 7ce110d into foundriesio:main Oct 3, 2023
1 check passed
@camilamacedo86 camilamacedo86 deleted the add-warning-before-create-weave-init branch October 3, 2023 13:41
Copy link
Member

@vkhoroz vkhoroz left a comment

Choose a reason for hiding this comment

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

@camilamacedo86 please, make a follow-up PR to address the 2 comments from me.

Comment on lines +32 to +33
We recommend that you generate static deltas for your production targets to optimize
OTA update download. Consider generating a static delta for targets using:
Copy link
Member

Choose a reason for hiding this comment

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

We use the semantic newlines in help messages.
Please, see the related section in the style guide.

Suggested change
We recommend that you generate static deltas for your production targets to optimize
OTA update download. Consider generating a static delta for targets using:
We recommend that you generate static deltas for your production targets to optimize OTA update download.
Consider generating a static delta for targets using:

The line length is absolutely irrelevant here, as long as the sentence fits within 25 words.

Comment on lines +157 to +163
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
OTA update download. Consider generating a static delta for targets using:
$ fioctl targets static-deltas

You can then cancel the wave and create a new one by using a static delta.
Copy link
Member

Choose a reason for hiding this comment

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

Same about semantic newlines:

Suggested change
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
OTA update download. Consider generating a static delta for targets using:
$ fioctl targets static-deltas
You can then cancel the wave and create a new one by using a static delta.
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 OTA update download.
Consider generating a static delta for targets using:
$ fioctl targets static-deltas
You can then cancel the wave and create a new one for a target which has static deltas defined.

This also incorporates my above suggestion about using static deltas.

@vkhoroz
Copy link
Member

vkhoroz commented Oct 3, 2023

Other than above, this LGTM.

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.

4 participants