-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Controlled upgrades #47877
Controlled upgrades #47877
Conversation
return ( | ||
<div> | ||
<OnLatestVersionMessage> | ||
{t`You're running Metabase ${currentVersion}`} |
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.
Context string suggestion: c("{0} is a version number."}
- new setting upgrade-threshold (`MB_UPGRADE_THRESHOLD`) number 0-100 - conditionally removing latest from upgrade checks AS OF RIGHT NOW IT ALWAYS REMOVES the latest. Should help FE make this optional
nothing is sacred in the settings order. no reason. i think i was just trying to minimize the diff, which a dumb and ignoble goal.
f226313
to
8a4e186
Compare
src/metabase/public_settings.clj
Outdated
:type :integer | ||
:setter :none | ||
:getter (fn [] | ||
(-> (site-uuid) hash (mod 100)))) |
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 mentioned that in Slack, but maybe we don't want this number to be THAT stable and adding a version info (or something like this) to re-hash our distribution after every upgrade is the better way?
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.
updated! good idea
hopefully helps rotate people from early to late, and late to early across major versions. Idea from sanya and quite nice!
* Initial commit of controlled upgrades - new setting upgrade-threshold (`MB_UPGRADE_THRESHOLD`) number 0-100 - conditionally removing latest from upgrade checks AS OF RIGHT NOW IT ALWAYS REMOVES the latest. Should help FE make this optional * dumb mistake * handle no latest version info * implement and basic test * More tests, refactor name * more tests * cljfmt does not like commas in source code. * Just move site-uuid to the declaration and don't declare it nothing is sacred in the settings order. no reason. i think i was just trying to minimize the diff, which a dumb and ignoble goal. * add context strings * update unit tests * use display version * Have upgrade threshold include current major version hopefully helps rotate people from early to late, and late to early across major versions. Idea from sanya and quite nice! --------- Co-authored-by: Ryan Laurie <iethree@gmail.com> # Conflicts: # frontend/src/metabase/admin/settings/components/SettingsUpdatesForm/VersionUpdateNotice/VersionUpdateNotice.tsx
Let's add a
rollout
number 0-100 onlatest
Version information has two keys:
The proposal here is that we add a
rollout
to thelatest
map, and then we only show thelatest
to the frontend (and therefore the upgrade) if some number of the local instance is lower than the rollout number.This derives the rollout threshold of the instance from the
site-uuid
which is constant for all instances in a cluster.(and of course overridable with
MB_UPGRADE_THRESHOLD=90 java -jar ...
if they want to be in a higher cohort)This lets us uniformly distribute self-hosted instances into buckets of 0-100. And as we increase the
rollout
number of the version-info json file, more instances will show the upgrade information in the application.This really only matters across major upgrades. We always show upgrades of minor upgrades in the same major.
Ex:
0.49.5
will always show a banner for a latest of0.49.6
Of course
0.49.5
will compare rollout thresholds on whether to show an update to the latest of0.50.2
Also,
0.49.5
will compare rollout thresholds on whether to show an update to the latest of0.51.2
(2 majors). We can make this show the latest 50 in the future if we want. (and the same scenario for more exaggerated version jumps, 49 -> 83 ,etc).See this explanation in notion of how it worked running it 200 times.
Started a jar up 200 times, fetching versions that included a 25% rollout threshold and had the following results: