platform.ini build ID doesn't necessarily match libxul build ID in artifact builds - avoid showing about:restartrequired and/or failing automated tests for this unless necessary
Categories
(Core :: IPC, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox124 | --- | fixed |
People
(Reporter: Gijs, Assigned: gerard-majax)
References
Details
Attachments
(1 file)
Filed based on bug 1812314 where I wallpapered the fact that artifact builds on infra complain in some of the browser tests that check for buildid vs about:restartrequired issues. I wallpapered because frontend folks regularly use artifact builds on trypushes to get faster try results, and it's annoying when all the debug runs of the test complain about this thing which is unrelated to any specific patch. Potentially related context: bug 1651133.
Context from bug 1812314:
(In reply to Geoff Brown [:gbrown] from bug 1812314 comment #3)
In https://treeherder.mozilla.org/jobs?repo=try&revision=fcaf9de151092ce4f241aadac236cce4c017cfc6 you can see that ensureBuildID() successfully retrieves the contents of platform.ini, as seen in the artifact build's target.tar.bz. However, the build ID in platform.ini is different from the build ID provided by Services.appinfo.platformBuildID.
I believe Services.appinfo.platformBuildID is gToolkitBuildID, which is compiled into libxul and comes from https://searchfox.org/mozilla-central/rev/e1b4aec181f4e630fd9b08ac29c1d00a56ae5eed/toolkit/library/gen_buildid.py#36.
I don't know what to do about the difference.
(In reply to Nika Layzell [:nika] (ni? for response) from bug 1812314 comment #9)
It seems likely that the
MOZ_BUILDID
constant is not the same in artifact builds compared to the artifacts they are building off of, like is usually the case. This constant is preprocessed into theplatform.ini
file (as well as other places, likeAppConstants.sys.mjs
andapplication.ini
) when running the build system.It makes sense that artifact builds would use different build IDs, given that the value is determined from the current date, in order to ensure it's unique for every build.
In general it's OK for us to have multiple different build IDs, in fact we track both the
appBuildID
(https://searchfox.org/mozilla-central/rev/e1b4aec181f4e630fd9b08ac29c1d00a56ae5eed/xpcom/system/nsIXULAppInfo.idl#46, taken fromapplication.ini
), as well as theplatformBuildID
(https://searchfox.org/mozilla-central/rev/e1b4aec181f4e630fd9b08ac29c1d00a56ae5eed/xpcom/system/nsIPlatformInfo.idl#18, taken from the binary), as they can be different.I think specifically, the
platform.ini
file probably needs to agree with theMOZ_BUILDID
which is built into the binary, given how we're using it right now for detectingabout:restartrequired
false-positives, so perhaps it is an artifact which should be downloaded, instead of built for artifact builds.
(In reply to Jed Davis [:jld] ⟨⏰|UTC-8⟩ ⟦he/him⟧ from bug 1812314 comment #11)
(In reply to Nika Layzell [:nika] (ni? for response) from comment #9)
I think specifically, the
platform.ini
file probably needs to agree with theMOZ_BUILDID
which is built into the binary, given how we're using it right now for detectingabout:restartrequired
false-positives, so perhaps it is an artifact which should be downloaded, instead of built for artifact builds.That code can be changed, if there's a better / more reliable way to tell when the install on disk doesn't match the running install (ideally without needing to execute anything). But, if it's relatively simple to just include
platform.ini
in the artifact part of the artifact build along with libxul, that's at least be a short-term solution.
Reporter | ||
Updated•1 year ago
|
Comment 1•1 year ago
|
||
Back in the day, there was a suggestion that the updater team wanted to remove platform.ini, however that appears to have not manifested. Perhaps a solution here would be to instead ensure that the defines for MOZ_BUILDID
are consistent between separate artifact builds using the same binaries?
Leaving a ni? for :gerard-majax for more context as to what the plan was
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 2•1 year ago
|
||
So I was told by :bytesized
on matrix that there was no actual plan to get rid of this ; I've come up with changes to just re-use platform.ini
for artifact builds.
Nika, when you said ensure that the defined for MOZ_BUILDID are consistent between separate artifact builds using the same binaries
, was there something else on your mind than re-using platform.ini
?
Assignee | ||
Comment 3•1 year ago
|
||
Comment 4•1 year ago
|
||
(In reply to :gerard-majax from comment #2)
So I was told by
:bytesized
on matrix that there was no actual plan to get rid of this ; I've come up with changes to just re-useplatform.ini
for artifact builds.Nika, when you said
ensure that the defined for MOZ_BUILDID are consistent between separate artifact builds using the same binaries
, was there something else on your mind than re-usingplatform.ini
?
Yes. In addition to MOZ_BUILDID
being included in the binary and platform.ini
, it's also built into places like AppConstants.sys.mjs
(https://searchfox.org/mozilla-central/rev/b1a029fadaaabb333d8139f9ec3924a20c0c941f/toolkit/modules/AppConstants.sys.mjs#352). We should strive to keep these consistent.
Assignee | ||
Comment 5•1 year ago
|
||
Ok, looking at https://searchfox.org/mozilla-central/search?q=%40MOZ_BUILDID%40&path=&case=false®exp=false that seems to be the only other place.
Assignee | ||
Comment 6•1 year ago
|
||
Maybe it is time we consider sending explicit match and mismatch IPC message, we could simplify this and remove the related telemetry. I'm working on that (it is working) I just need to find a correct way to verify behavior in tests and how we can guarantee stability of those simple messages.
Assignee | ||
Comment 7•1 year ago
|
||
(In reply to :gerard-majax from comment #6)
Maybe it is time we consider sending explicit match and mismatch IPC message, we could simplify this and remove the related telemetry. I'm working on that (it is working) I just need to find a correct way to verify behavior in tests and how we can guarantee stability of those simple messages.
(In reply to Nika Layzell [:nika] (ni? for response) from comment #4)
(In reply to :gerard-majax from comment #2)
So I was told by
:bytesized
on matrix that there was no actual plan to get rid of this ; I've come up with changes to just re-useplatform.ini
for artifact builds.Nika, when you said
ensure that the defined for MOZ_BUILDID are consistent between separate artifact builds using the same binaries
, was there something else on your mind than re-usingplatform.ini
?Yes. In addition to
MOZ_BUILDID
being included in the binary andplatform.ini
, it's also built into places likeAppConstants.sys.mjs
(https://searchfox.org/mozilla-central/rev/b1a029fadaaabb333d8139f9ec3924a20c0c941f/toolkit/modules/AppConstants.sys.mjs#352). We should strive to keep these consistent.
So after discussing the matter in the IPC meeting, we will only care for copying platform.ini
for artifact build.
Comment 9•1 year ago
|
||
bugherder |
Description
•