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

adding stream information in OS release version string #211

Closed
dustymabe opened this issue Jun 28, 2019 · 18 comments · Fixed by #298
Closed

adding stream information in OS release version string #211

dustymabe opened this issue Jun 28, 2019 · 18 comments · Fixed by #298

Comments

@dustymabe
Copy link
Member

In #81 we decided on the following format for OS versioning: <Fedora release>.<snapshot YYYYMMDD>.<number>. This format fits both Proposal 2 and Proposal 3 from that ticket. Proposal 2 is the ultimate goal but we may implement Proposal 3 in the interim.

One outstanding point from that ticket was whether or not we should include something in the OS version number that indicates what stream this commit was built against. Let's discuss whether we should add a stream indicator in the version number here in this ticket.

Proposal 1

No stream indicator. Manually look up where a commit was built or infer this from the branch/ref information in rpm-ostree

Proposal 2

Add a +stream (I think this goes along with semver)

  • 30.20190628.0+stable
  • 30.20190628.0+testing
  • 30.20190628.0+testing-devel

Please add comments/concerns or other proposals below!

@sinnykumari
Copy link
Contributor

I like Proposal 2

@jlebon
Copy link
Member

jlebon commented Jul 2, 2019

I like proposal 2 as well, though the verbosity is a bit unfortunate. E.g. these version identifiers will probably end up on the download page too where we'll list the latest version by stream already. Maybe something along the lines of @lucab's abbreviations in #81 (comment). E.g. something like:

  • 30.20190628.s.0
  • 30.20190628.t.0
  • 30.20190628.td.0

?

Could also just use all numbers, e.g. have the patch number be 3 digits where the first digit is bumped on each promotion:

  • 30.20190628.100 -> testing-devel
  • 30.20190628.200 -> testing
  • 30.20190628.300 -> stable
  • 30.20190628.201 -> testing respin
  • 30.20190628.301 -> stable respin

etc...

@bgilbert
Copy link
Contributor

bgilbert commented Jul 12, 2019

I really like the numeric approach. It's brief, there are no abbreviations to be interpreted, and it sorts cleanly. It also has a nice property that Proposal 2 doesn't: it distinguishes routine promotions from bugfixes. With proposal 2, a user on stable might run, in turn, 30.n.2, 30.n.3, 30.n+1.3, and 30.n+2.1; there's no consistency about the initial value of Z after a Y bump. But with this approach, Z would always start at 300.

We won't have release builds for testing-devel, so: 1xx for next, 2xx for testing, 3xx for stable? We could probably even use two-digit numbers, since we shouldn't ever release nine respins in two weeks.

Edit: I meant proposal 2 from #81, not the one from this ticket.

@dustymabe
Copy link
Member Author

sorry your previous comment has me a bit confused @bgilbert - we decided in #81 (comment) on a <Fedora release>.<snapshot YYYYMMDD>.<number> format. In this ticket we are just deciding if we should add stream information on top of that or not.

Are you in favor of adding stream information (proposal 2 from this ticket) or leaving as is without the stream indicator (proposal 1 from this ticket) ?

@bgilbert
Copy link
Contributor

bgilbert commented Aug 7, 2019

@dustymabe I'm suggesting a refinement of @jlebon's proposal that the stream be encoded in the Z value:

  • 30.20190628.1xx -> next
  • 30.20190628.2xx -> testing
  • 30.20190628.3xx -> stable

In the interest of getting this nailed down, I propose that we pursue that approach. Objections?

@dustymabe
Copy link
Member Author

@dustymabe I'm suggesting a refinement of @jlebon's proposal that the stream be encoded in the Z value:

* 30.20190628.1xx -> `next`

* 30.20190628.2xx -> `testing`

* 30.20190628.3xx -> `stable`

In the interest of getting this nailed down, I propose that we pursue that approach. Objections?

Ahh now it makes sense. I don't think I have any problems with this approach. Call it Proposal 3 maybe?

@bgilbert
Copy link
Contributor

bgilbert commented Aug 8, 2019

Call it Proposal 3 maybe?

Sure. There were also questions about versioning of official nightly non-production builds. Updated proposal:

Stream Z version
rawhide 01x
branched 02x
bodhi-updates-testing 03x
bodhi-updates 04x
next-devel 08x
testing-devel 09x
next 1xx
testing 2xx
stable 3xx

I don't expect that people will remember all the 0xx mappings; the idea is just that there's some structured way to assign versions to non-prod builds.

@dustymabe
Copy link
Member Author

I think one concern about having a single x is the chance of doing 10 builds in a day. In that case we wrap. We probably would never for rawhide/branched/bodhi*. Not sure about testing-devel or next-devel. Maybe if we ever hit that case we just make it 0910, 0911.

Actually.. There's another thought. Why don't we just make all non-production streams have 4 numbers and we'll just know automatically. So keeping with your scheme above 01xx, 02xx, etc..

@dustymabe
Copy link
Member Author

if we do the 4 numbers we could match the first number for the devel and prod streams of next and testing

Stream Z version
next-devel 10xx
testing-devel 20xx
next 1xx
testing 2xx

Which will make it a little easier to correlate without having to look it up. i.e. if 1xx it is part of next*. If 1xxx it's next-devel.

@bgilbert
Copy link
Contributor

bgilbert commented Aug 8, 2019

AIUI the non-production official builds are expected to have exactly one build per day: the nightly snapshot. So the x in 0-prefixed numbers is already a factor of 10 safety margin. 🙂 We could also use the 00 prefix for overflow space if it's ever needed.

The 10xx/20xx scheme breaks the sort order and I'm concerned that it could confuse users. i.e., 200 is a release users should run, but 2000 is a release users should probably never run. We could reverse the scheme (official releases have 4-digit numbers) but that's starting to feel over-engineered to me.

@dustymabe
Copy link
Member Author

AIUI the non-production official builds are expected to have exactly one build per day: the nightly snapshot.

hmm.. I guess I was under the impression it doesn't take long to build so we might be iterating many times if we were trying to fix a specific problem in a short period of time and our attempts weren't working

@cgwalters
Copy link
Member

I also have a deeply ingrained dislike to anything that assumes a build can happen at most once a day - for a long time Fedora pungi worked that way. It's just wrong - it's always "night" somewhere in the globe.

@dustymabe
Copy link
Member Author

I do agree that 10 seems like a safe number, but there can be cases where a "run" fails very early on (maybe some infrastructure/networking related issue) but not so early that a version number hasn't been allocated already. So we start the build, it fails after 5 minutes. Tweak. Build. Tweak. Build.. You can hit 10 quickly.

@bgilbert
Copy link
Contributor

I was under the impression it doesn't take long to build so we might be iterating many times if we were trying to fix a specific problem in a short period of time and our attempts weren't working

Aren't those dev builds though? If a nightly fails, I assume we don't get an official one until the next day. If we do need to debug a prod build issue in prod, we can always borrow one of the other Z ranges to do it.

@bgilbert
Copy link
Contributor

@dustymabe, @jlebon, and I bikeshedded for a while and came up with a compromise proposal that we hope is good enough for now:

OS versions will have the form X.Y.Z.A. X and Y follow the existing rules: X is the Fedora major version and Y is the datestamp that the initial snapshot was taken. (So, the build date, except that for next/testing/stable, the date that next-devel or testing-devel was snapshotted.) Z is a code number corresponding to the stream:

Stream Z version
next 1
testing 2
stable 3
next-devel 10
testing-devel 20
rawhide 91
branched 92
bodhi-updates-testing 93
bodhi-updates 94

A is a revision number, which starts at 0 and is incremented whenever a new official build is needed with the same X.Y.Z parameters as an existing build.

Developer builds (those not produced by the official pipeline) will continue being versioned X.Y.dev.A.

The Z codes were chosen to make production versions short and simple, development versions clearly related to production versions, and mechanical versions clearly separated into a distinct group. The use of a separate A parameter allows an unlimited number of daily builds on all branches.

Objections? If none, we're planning to move ahead with this approach soon.

@dustymabe
Copy link
Member Author

And for those of us that like a little more concrete examples:

Stream version comment
next 32.20191018.1.0 f32 based first build of the day
testing 31.20191018.2.1 f31 based 2nd build of the day
stable 31.20191001.3.1 respin of 20191001 snapshot (+backports)
next-devel 31.20191018.10.10 11th build of the day
testing-devel 31.20191018.20.0 -
rawhide 33.20191018.91.0 f33 based first build of the day
branched 32.20191018.92.0 -
bodhi-updates-testing 31.20191018.93.0 -
bodhi-updates 31.20191018.94 -

jlebon added a commit to jlebon/fedora-coreos-releng-automation that referenced this issue Oct 21, 2019
This script implements the versioning scheme as described in:
coreos/fedora-coreos-tracker#211

The tricky bit is the Y component: the "snapshot" date of the Fedora
content. The algorithm I went with here is to use the git timestamp of
the commit that last changed the base manifest lockfile (e.g.
`manifest-lock.x86_64.json`).

The reasoning is that this lockfile defines the base content from which
we build. These lockfiles are updated by bots daily and are promoted as
is through e.g. `testing-devel` -> `testing`, so we correctly maintain
the X.Y components of the version during releases.

OTOH, the overrides lockfile is maintained by humans, and will be what
we use to override content if we need to backport/revert packages and
respin a release (and thus, the base lockfile remains the same).

The next step is to use this in the FCOS pipeline to drive versioning.
@jlebon
Copy link
Member

jlebon commented Oct 21, 2019

I started on an implementation of this in coreos/fedora-coreos-releng-automation#50.

@bgilbert
Copy link
Contributor

PR in #298.

jlebon added a commit to jlebon/fedora-coreos-releng-automation that referenced this issue Nov 11, 2019
This script implements the versioning scheme as described in:
coreos/fedora-coreos-tracker#211

The next step is to use this in the FCOS pipeline to drive versioning.
jlebon added a commit to jlebon/fedora-coreos-releng-automation that referenced this issue Dec 11, 2019
This script implements the versioning scheme as described in:
coreos/fedora-coreos-tracker#211

The next step is to use this in the FCOS pipeline to drive versioning.
jlebon added a commit to jlebon/fedora-coreos-releng-automation that referenced this issue Dec 11, 2019
This script implements the versioning scheme as described in:
coreos/fedora-coreos-tracker#211

The next step is to use this in the FCOS pipeline to drive versioning.
jlebon added a commit to jlebon/fedora-coreos-releng-automation that referenced this issue Dec 11, 2019
This script implements the versioning scheme as described in:
coreos/fedora-coreos-tracker#211

The next step is to use this in the FCOS pipeline to drive versioning.
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 a pull request may close this issue.

5 participants