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

Handle creating a mix that touches or skips a format bump in Clear Linux #59

Closed
cmarcelo opened this issue Dec 26, 2017 · 8 comments
Closed

Comments

@cmarcelo
Copy link
Contributor

Mixer should be aware about the format bumps in the upstream (Clear Linux), since right now it might be producing a stream that is not usable (skipping a bump in upstream, leading to some invalid state).

"Handle" here might refer first to "be aware and fail if the input is invalid" and then to "create the intermediate mixes as needed", so might make sense implement this in steps. Just the warning would go great length to avoid issues.

See also #30 description that have a concrete example. That PR added more information with the intent of making life easy to identify this bumps.

For the record @mdhorn implemented this outside mixer for our test mix.

@cmarcelo
Copy link
Contributor Author

@tmarcu I know this was in your Roadmap, added to GitHub so we have a way to keep track (and comment) on this, since we are doing the format bump work from outside the mixer at the moment. Any updates on this?

@cmarcelo cmarcelo changed the title Handle format bumps in Clear Linux Handle creating a mix that touches or skips a format bump in Clear Linux Dec 26, 2017
@kevincwells
Copy link
Contributor

@tmarcu -- wanted to make an observation about how we might implement this, with regards to when we attempt to deal with format bumps and how we expose this to the user.

I was talking with @cmarcelo about steering the CLI away from "what tasks does the tool need to do" and more toward "what goals does the user want to accomplish". With that in mind, we run into the need for auto format bumps when the user wants to update the upstream version their mix is based on, and that version happens to be one or more formats above the old one. As such, I would recommend attempting to do the auto-bump at the time the user changes their upstream CLR version, rather than as a reaction to a new CLR version at a later event (like a build or a deliberate format bump).

This has the nice benefit of tying the format bump activities to the user's action that actually causes their need, as well as simplifying the already complicated output of a later build. (Imagine explaining to the user "You wanted to do a build, but at some other point you changed something else, so we tried to do these other builds you didn't ask for because you didn't know you needed them, and somewhere it all went wrong!" Something along the lines of "Warning: Updating to upstream version 19350 requires additional format bump builds to keep up with changes to upstream." is way easier to understand.)

Right now it's not possible easy to detect "the time the user changes their upstream CLR version", because it's just the .clearversion file; this is another reason why a command like mixer config set UpstreamVersion 19350 (or whatever it ends up looking like) is useful.

Not sure what your thoughts on this were already, but wanted to put that out there.

@cmarcelo
Copy link
Contributor Author

cmarcelo commented Feb 6, 2018

Proposal on how we get this moving forward:

  • Start with Fail when the user is trying to create a mix that breaks format bumps #145 so we stop producing "invalid" mixes.
  • Teach mixer how to create a "bump" pair of versions assuming no bump in upstream (the bump is only in the mix). If we are going to mixversion N, this creates N+10 in format F+1, copy it back to N, doing some filesystem fixes.
  • Teach mixer how to create a bump if we are at the edge of the bump. So if upstream bumps in U/U+1, and the mix is in U-1, this will automatically create a mix to U+1 with a mix bump. So will generate two versions N/N+1 that follow the upstream bump.

With these in place, it will be easier to think about a more generalized automatic format bumps, or how to improve the UI to direct the user better.

@cmarcelo
Copy link
Contributor Author

cmarcelo commented Feb 6, 2018

@tmarcu @kevincwells makes sense?

@matthewrsj
Copy link
Contributor

@tmarcu is putting together a proposal involving containerizing mixer and publishing a dockerfile as part of the build collateral. This approach will allow users to create any number of mixes to get to the latest format and handle the bumps for them via a simple script that loops running the dockerfile for each format. tmarcu should explain more when the proposal is fully hashed out.

@cmarcelo
Copy link
Contributor Author

cmarcelo commented Feb 6, 2018

@tmarcu is putting together a proposal

OK. Let's wait on that for the big picture. Meanwhile I think that #145 (or a variant of it that just warns) would be something acceptable. What do you think?

...via a simple script that loops...

Just a note: we've done the approach of handling format bumps from the outside (Mark's work mentioned above), and we found out that we were reimplementing in bash some logic and information gathering already done by mixer.

cmarcelo added a commit to cmarcelo/mixer-tools that referenced this issue Feb 16, 2018
Replace the workflow of manually updating the two files to get a new
version.

It does check the upstream format and do not cross format bumps. So it
helps preventing people generating wrong content.

Updates clearlinux#145.
Updates clearlinux#59.

Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
cmarcelo added a commit to cmarcelo/mixer-tools that referenced this issue Feb 16, 2018
Replace the workflow of manually updating the two files to get a new
version.

It does check the upstream format and do not cross format bumps. So it
helps preventing people generating wrong content.

Also make the download function previously used to get latest file
reusable for other purposes.

Updates clearlinux#145.
Updates clearlinux#59.

Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
cmarcelo added a commit to cmarcelo/mixer-tools that referenced this issue Feb 17, 2018
Replace the workflow of manually updating the two files to get a new
version. The 'mixer versions' prints the relevant versions and 'mixer
versions update' provides a way to update those versions.

When updating the command does check the upstream format and do not
cross format bumps. So it helps preventing people generating wrong
content. The commands will provide a point to do more checks in the
future, like if there is a problem with the local bundles after an
update.

Also make the download function previously used to get latest file
reusable for other purposes.

To keep commands consistent both 'versions update' and 'init' will
accept --clear-version or --upstream-version (they are equivalent).

Updates clearlinux#145.
Updates clearlinux#59.

Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
cmarcelo added a commit to cmarcelo/mixer-tools that referenced this issue Feb 17, 2018
Replace the workflow of manually updating the two files to get a new
version. The 'mixer versions' prints the relevant versions and 'mixer
versions update' provides a way to update those versions.

When updating the command does check the upstream format and do not
cross format bumps. So it helps preventing people generating wrong
content. The commands will provide a point to do more checks in the
future, like if there is a problem with the local bundles after an
update.

Also make the download function previously used to get latest file
reusable for other purposes, and returning error for non-OK status
codes.

To keep commands consistent both 'versions update' and 'init' will
accept --clear-version or --upstream-version (they are equivalent).

Updates clearlinux#145.
Updates clearlinux#59.

Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
cmarcelo added a commit to cmarcelo/mixer-tools that referenced this issue Feb 17, 2018
Replace the workflow of manually updating the two files to get a new
version. The 'mixer versions' prints the relevant versions and 'mixer
versions update' provides a way to update those versions.

When updating the command does check the upstream format and do not
cross format bumps. So it helps preventing people generating wrong
content. The commands will provide a point to do more checks in the
future, like if there is a problem with the local bundles after an
update.

Also make the download function previously used to get latest file
reusable for other purposes, and returning error for non-OK status
codes.

To keep commands consistent both 'versions update' and 'init' will
accept --clear-version or --upstream-version (they are equivalent).

Updates clearlinux#145.
Updates clearlinux#59.

Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
cmarcelo added a commit to cmarcelo/mixer-tools that referenced this issue Feb 17, 2018
Replace the workflow of manually updating the two files to get a new
version. The 'mixer versions' prints the relevant versions and 'mixer
versions update' provides a way to update those versions.

When updating the command does check the upstream format and do not
cross format bumps. So it helps preventing people generating wrong
content. The commands will provide a point to do more checks in the
future, like if there is a problem with the local bundles after an
update.

Also make the download function previously used to get latest file
reusable for other purposes, and returning error for non-OK status
codes.

To keep commands consistent both 'versions update' and 'init' will
accept --clear-version or --upstream-version (they are equivalent).

Updates clearlinux#145.
Updates clearlinux#59.

Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
cmarcelo added a commit to cmarcelo/mixer-tools that referenced this issue Feb 17, 2018
Replace the workflow of manually updating the two files to get a new
version. The 'mixer versions' prints the relevant versions and 'mixer
versions update' provides a way to update those versions.

When updating the command does check the upstream format and do not
cross format bumps. So it helps preventing people generating wrong
content. The commands will provide a point to do more checks in the
future, like if there is a problem with the local bundles after an
update.

Also make the download function previously used to get latest file
reusable for other purposes, and returning error for non-OK status
codes.

To keep commands consistent both 'versions update' and 'init' will
accept --clear-version or --upstream-version (they are equivalent).

Updates clearlinux#145.
Updates clearlinux#59.

Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
tmarcu pushed a commit that referenced this issue Feb 21, 2018
Replace the workflow of manually updating the two files to get a new
version. The 'mixer versions' prints the relevant versions and 'mixer
versions update' provides a way to update those versions.

When updating the command does check the upstream format and do not
cross format bumps. So it helps preventing people generating wrong
content. The commands will provide a point to do more checks in the
future, like if there is a problem with the local bundles after an
update.

Also make the download function previously used to get latest file
reusable for other purposes, and returning error for non-OK status
codes.

To keep commands consistent both 'versions update' and 'init' will
accept --clear-version or --upstream-version (they are equivalent).

Updates #145.
Updates #59.

Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
@tmarcu
Copy link
Contributor

tmarcu commented Feb 22, 2018

Proposal and architecture have been reviewed, and issues are being tracked for this on github now (see #203). Adding this to the board.

@tmarcu tmarcu added this to To do in Auto Format Bump Feb 22, 2018
@tmarcu
Copy link
Contributor

tmarcu commented Jul 2, 2018

Merged but awaiting major release for default usage.

@tmarcu tmarcu closed this as completed Jul 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

No branches or pull requests

4 participants