-
Notifications
You must be signed in to change notification settings - Fork 121
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
Add Omaha config IDs to configurator. #4401
base: 25.lts.1+
Are you sure you want to change the base?
Conversation
b/277111513 Change-Id: I01875374a777f245f7a8e4e802180fa0cec9e458
7719a88
to
9730642
Compare
…nels. Change-Id: Ic0f6877b0233d0d21dee2e8586ba6191735842d1
9730642
to
20afff8
Compare
chrome/updater/configurator.cc
Outdated
} | ||
return kOmahaCobaltTrunkAppID; | ||
// Should not reach here. |
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.
Change to comment to:
// Requests with other SB versions go to the legacy config.
chrome/updater/configurator.cc
Outdated
} | ||
LOG(INFO) << "Configurator::GetAppGuidHelper updater channel and starboard combination is invalid."; | ||
|
||
// All invalid channel requests get updates from prod config. |
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.
// All undefined channel requests go to prod configs.
chrome/updater/configurator.cc
Outdated
return kOmahaCobaltTrunkAppID; | ||
} | ||
std::string channel(updater_channel); | ||
if (std::regex_match(updater_channel, std::regex("2[5-9]lts\\d+"))) { |
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'm wondering if std::regex("\d+lts\d+") is more future proof.
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.
also add a comment explaining what are you trying to match
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.
Added a comment and changed to "\d+lts\d+", but I was wondering if it needs to be future proof.
I was going to use "25lts\d+" since we don't expect Chrobalt to be compatible with SB14-16. These configs will only be used for C25. Given we don't know when we will ship Chrobalt, I used "2[5-9]lts\d+", but these should really just be used by C25.
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.
The static channels should work universally even when setting a device to an older static channel. For example, if a device is running 25lts20 with this code, setting its channel to 24lts10
should work. This means the regex here should match all static channels, and the new config should contain cohorts and rules of all applicable static channels for the specific SB verison.
{"tseries214", "{7CB65840-5FA4-4706-BC9E-86A89A56B4E0}"}, | ||
{"tseries215", "{7CCA7DB3-C27D-4CEB-B6A5-50A4D6DE40DA}"}, | ||
{"tseries216", "{012BF4F5-8463-490F-B6C8-E9B64D972152}"}, | ||
}; | ||
const char kOmahaCobaltAppID[] = "{6D4E53F3-CC64-4CB8-B6BD-AB0B8F300E1C}"; |
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.
Nit: kOmahaCobaltAppID, kOmahaCobaltTrunkAppID and kOmahaCobaltLTSNightlyAppID can be moved to utils and shared. kOmahaCobaltProdSb15AppID and kOmahaCobaltProdSb14AppID can be removed and accessed by the same method in configurator.cc.
chrome/updater/configurator.cc
Outdated
return kOmahaCobaltTrunkAppID; | ||
} | ||
std::string channel(updater_channel); | ||
if (std::regex_match(updater_channel, std::regex("2[5-9]lts\\d+"))) { |
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.
The static channels should work universally even when setting a device to an older static channel. For example, if a device is running 25lts20 with this code, setting its channel to 24lts10
should work. This means the regex here should match all static channels, and the new config should contain cohorts and rules of all applicable static channels for the specific SB verison.
chrome/updater/configurator.cc
Outdated
@@ -318,26 +273,29 @@ std::string Configurator::GetAppGuidHelper(const std::string& updater_channel, | |||
return kOmahaCobaltTrunkAppID; | |||
} | |||
std::string channel(updater_channel); | |||
if (std::regex_match(updater_channel, std::regex("2[5-9]lts\\d+"))) { | |||
// This regex matches to all static channels in the format of XXltsX. | |||
if (std::regex_match(updater_channel, std::regex("\\dlts\\d+"))) { |
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.
A '+' is missed. It should be std::regex("\d+lts\d+")
dc7daad
to
fdda00d
Compare
Change-Id: I5ef381e9010803909e94807e1b9b978e28d11369
fdda00d
to
7056504
Compare
b/277111513