-
Notifications
You must be signed in to change notification settings - Fork 37
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
Mixer reset #608
base: master
Are you sure you want to change the base?
Mixer reset #608
Conversation
6ac0537
to
4d0e202
Compare
2a433a4
to
e462906
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You also need to update the docs to include this new command.
317b5c5
to
12eab83
Compare
fd6eede
to
7ca1bda
Compare
I updated the docs, but I am not sure auto-completion. How do we enable that ? |
2e7cb67
to
e3f6243
Compare
850bb2d
to
65baba4
Compare
if err = ioutil.WriteFile(filepath.Join(b.Config.Builder.ServerStateDir, "/www/version/", newFormat, "latest"), []byte(b.MixVer), 0644); err != nil { | ||
return fmt.Errorf("couldn't update latest file: %s", err) | ||
} | ||
//update the sig file for the latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy mistake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This actually needs to be decided, whether we should update the sig file or not
if err = ioutil.WriteFile(filepath.Join(b.Config.Builder.ServerStateDir, "/www/version/", "latest_version"), []byte(b.MixVer), 0644); err != nil { | ||
return fmt.Errorf("couldn't update latest_version file: %s", err) | ||
} | ||
//update the sig file for the latest_version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy mistake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same for this, need to decide if updating the sig is a good idea or not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think mixer reset
should change these files. They should be updated by mixer build update
. Also, when rolling back the version and re-building, I think that mixer should erase manifests at mix versions ahead of the current mix because they will be corrupted.
@reaganlo Thoughts?
mixer/cmd/reset.go
Outdated
} | ||
} | ||
|
||
if b.MixVer == "0"{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mixversions are required to be > 0. Allowing a mix to be reset to 0 will lead to failures later.
mixer init
sudo mixer reset
sudo mixer build all
ERROR: Couldn't build update: failed to create update metadata: manifest has version zero, version must be positive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I will make it invalid to give reset 0 then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what will be good approach to reset the mix to a state which is after mixer init?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the previous version is 0, I would use the current mixversion. If that is invalid (< 1), I would print a warning and default to 10 which is the mixer init
mixversion default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jwakre can you test the recent commit. I made the changes.
847eede
to
7901e1c
Compare
7901e1c
to
357cabb
Compare
It reverts the mix to a previous version in case of a build failure or in case the user wants to roll back to a specific version. By default, the command will bring back the mix to the same state it have when it last build a successful mix. This value can be overridden if a `--to` flag is provided with a version number. The command will not be destructive unless a `--clean` flag is provided specified. If so, mixer will delete all files associated with versions that are bigger than the one provided. If not, only the values of the state files will change, but the files will be kept. Signed-off-by: Ashlesha Atrey <[email protected]>
357cabb
to
c2ca375
Compare
It reverts the mix to a good state in case of a build failure or in case the user wants to roll back to a previous version.
By default, the command will bring back the mix to the same state it have when it last build a successful mix.
This value can be overridden if a
--to
flag is provided with a version number.The command will not be destructive unless a--clean
flag is provided specified. If so, mixer will delete all files associated with versions that are bigger than the one provided. If not, only the values of the state files will change, but the files will be kept.Signed-off-by: Ashlesha Atrey [email protected]