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

Enable mixer reset functionality #702

Open
reaganlo opened this issue Jan 15, 2020 · 3 comments
Open

Enable mixer reset functionality #702

reaganlo opened this issue Jan 15, 2020 · 3 comments

Comments

@reaganlo
Copy link
Contributor

User should have an option to reset mixer to a desired version. Based on implicit behavior or through additional flags user should be able to do the following:

  • Reset the mixer workspace to the previous successful mix version or to a specified mix version.
    E.g. sudo mixer reset or sudo mixer reset --to <ver>
    This should include resetting the latest version files and recreating the latest signature file. The content of rest of the mix versions should not be modified.
  • User should have an option of deleting the content of all mix versions greater than the reset version.
    E.g. sudo mixer reset --clean
  • User should have an option of not recreating the latest signature file.
    E.g. sudo mixer reset --no-signing

Note: Currently the following are the files related to mix versioning:

- mixversion
- mixer.state
- update/image/LAST_VER
- update/www/version/latest_version
- update/www/version/latest_version.sig
- update/www/version/format<format>/latest_version
- update/www/version/format<format>/latest_version.sig
@reaganlo
Copy link
Contributor Author

@mbelluzzo I have listed the requirements based on our discussion. Can you please take a look at it and confirm.
@ashleshaAtrey @jwakre FYI

@mbelluzzo
Copy link

Should --to <ver> imply --clean?

I mean, is it possible to have a sane state of the update/ folder if one rollbacks 3 builds and than issue a new build without passing --clean? Even for rolling back just a single version.

Maybe another way to think about this is: do we have an use case where --clean would not be desired? If so, is that the default case? Or instead of --clean we actually should have --no-clean to deal with this corner case.

The --no-signing is needed and looks good!

@rchiossi
Copy link
Contributor

Should --to <ver> imply --clean?

One of the planned uses for this feature is to crete "forks" on the stream, which mean being freely able to move back an forth through previous builds (e.g. go back 2 versions in case of a format bump).

I mean, is it possible to have a sane state of the update/ folder if one rollbacks 3 builds and than issue a new build without passing --clean? Even for rolling back just a single version.

It really depends on how this is implemented. Ideally, published content won't change during a reset (everything inside update/www) unless clean is specified, in which case rolling back to an arbitrary version is possible without a clean. Relevant published content like update/www/version/latest_version and its respective sig will be overwritten once a successful build in generated, so keeping them around shouldn't affect sanity.

Maybe another way to think about this is: do we have an use case where --clean would not be desired? If so, is that the default case? Or instead of --clean we actually should have --no-clean to deal with this corner case.

Also consider that clean can be fairly dangerous and can destroy a good update stream if misused. Keeping it explicit could minimize the risk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants