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

devops: encode build number together with Chromium revision #3769

Conversation

aslushnikov
Copy link
Contributor

This is an alternative approach to #3698 that was setting up a custom
mapping between chromium revisions and our mirrored builds. For example, we were
taking chromium 792639 and re-packaging it to our CDN as Chromium 1000.

One big downside of this opaque mapping was inability to quickly
understand which Chromium is mirrored to CDN.

To solve this, this patch starts treating browser revision as a fractional number,
with and integer part being a chromium revision, and fractional
part being our build number. For example, we can generate builds 792639, 792639.1,
792639.2 etc, all of which will pick Chromium 792639 and re-package it to our CDN.

In the Playwright code itself, there are a handful of places that treat
browser revision as integer, exclusively to compare revision with some particular
revision numbers. This code would still work as-is, but I changed these places
to use parseFloat instead of parseInt for correctness.

This is an alternative approach to microsoft#3698 that was setting up a custom
mapping between chromium revisions and our mirrored builds.

One big downside of the opaque mapping was inability to quickly
understand which Chromium is mirrored to CDN.

To solve this, this patch starts treating browser revision as a fractional number,
with and integer part being a chromium revision, and fractional
part being our build number.

For example:
- current `BUILD_NUMBER` for Chromium that we mirror to our CDN is `792639`.
- if I want to change the packaging procedure, e.g. update bundled
FFMPEG, I can change `BUILD_NUMBER` to `792639.1`.

In the Playwright code itself, there are a handful of places that treat
browser revision as integer, mostly to compare them with some particular
revision numbers. This code would still work, but I changed these places
to parse float instead for correctness.
Copy link
Member

@mxschmitt mxschmitt left a comment

Choose a reason for hiding this comment

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

Stamp!

@aslushnikov aslushnikov merged commit a755d10 into microsoft:master Sep 4, 2020
@aslushnikov aslushnikov deleted the experimental-introduce-fractional-chromium-revision branch September 4, 2020 10:12
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.

2 participants