Closed Bug 1867289 Opened 1 year ago Closed 1 year ago

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)

defect

Tracking

()

RESOLVED FIXED
124 Branch
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 the platform.ini file (as well as other places, like AppConstants.sys.mjs and application.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 from application.ini), as well as the platformBuildID (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 the MOZ_BUILDID which is built into the binary, given how we're using it right now for detecting about: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 the MOZ_BUILDID which is built into the binary, given how we're using it right now for detecting about: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.

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

Flags: needinfo?(lissyx+mozillians)
Severity: -- → S3
Assignee: nobody → lissyx+mozillians
Flags: needinfo?(lissyx+mozillians)

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 ?

Flags: needinfo?(nika)

(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-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 ?

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.

Flags: needinfo?(nika)
Depends on: 1874190

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 :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-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 ?

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.

So after discussing the matter in the IPC meeting, we will only care for copying platform.ini for artifact build.

Pushed by alissy@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/456ba9da5197 Do not rebuild platform.ini on artifact builds r=nalexander,glandium,mkaply
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 124 Branch
Blocks: 1876590
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: