-
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
Restore Cobalt version info #4478
base: main
Are you sure you want to change the base?
Conversation
Adds back GN target for generating build-id from Git commit info. Also plugs the version info values back into user-agent. b/377927950 b/380126852
@@ -54,7 +54,7 @@ UserAgentPlatformInfo CreateOnlyOSNameAndVersionPlatformInfo() { | |||
TEST(UserAgentStringTest, StartsWithMozilla) { | |||
std::string user_agent_string = | |||
CreateOnlyOSNameAndVersionPlatformInfo().ToString(); | |||
EXPECT_EQ(0, user_agent_string.find("Mozilla/5.0")); | |||
EXPECT_EQ(0UL, user_agent_string.find("Mozilla/5.0")); |
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.
This fixes a compile error on Linux ( long/int comparison )
@@ -265,9 +268,8 @@ void InitializeUserAgentPlatformInfoFields(UserAgentPlatformInfo& info) { | |||
// TODO(cobalt, b/374213479): How to determine below Cobalt build macros. |
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.
Can this comment be removed now? Or at least the part about build_info.py?
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.
Possibly - but as @haozheng-cobalt is working on more changes in here, i'd leave this to a follow-up if thats okay ? We are still missing at least Starboard and build type 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.
Sure, SGTM.
# TODO(b/377927950): This should be consolidated with the above | ||
action("cobalt_build_info") { | ||
script = "build/build_info.py" | ||
outputs = [ "$root_gen_dir/build_info.json" ] |
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.
Is this build_info.json output file actually used in this PR? It looks like InitializeUserAgentPlatformInfoFields()
is just getting COBALT_VERSION
from cobalt/version.h, which is an input to build_info.py.
I guess it must be used elsewhere (Kokoro?), or by something that will be added later?
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.
It's used downstream in Copybara->Kokoro->Piper flow. I'll consolidate the scripts+build rule and remove the .txt
version of legacy build info as a follow-up, but for now just bringing the build rules back.
CI failed to find module cobalt: https://github.com/youtube/cobalt/actions/runs/11965044968/job/33358527141?pr=4478
Looks like PYTHONPATH is not configured on the CI. |
Adds back GN target for generating build-id from Git commit info.
Also plugs the version info values back into user-agent.
b/377927950
b/380126852