devtools: Respect SOURCE_DATE_EPOCH for build_id#44459
Merged
Merged
Conversation
We are probably not anywhere close to reproducible builds, but we should try to follow best practices where trivially possible. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
jschwe
commented
Apr 23, 2026
| ), | ||
| ) | ||
| .unwrap(); | ||
| let timestamp = env::var_os("SOURCE_DATE_EPOCH") |
Member
Author
There was a problem hiding this comment.
I guess we might want to parse this into chrono, if we wanted to format the build id in some standard way. But it's a bit unclear to me where the build_id is actually exposed in devtools, so perhaps some input from people familiar with devtools on the use case would also be nice.
Member
There was a problem hiding this comment.
It's sent as one property in the description of the device hosting the devtools server in
. It only matters in this particular check for whether a build is too recent to connect: https://searchfox.org/firefox-main/rev/be31b3948198286e39a9855e414823cb17b6e94c/devtools/client/shared/remote-debugging/version-checker.js#133-139
Member
Author
There was a problem hiding this comment.
Thanks for the link! I updated the PR to take that into account. The other notable change is that I switched to UTC since that is what SOURCE_DATE_EPOCH is based on. That shouldn't affect devtools in any way though I think.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
9581eb9 to
c5b769d
Compare
jdm
approved these changes
Apr 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We are probably not anywhere close to reproducible builds, but we should try to follow best practices where trivially possible.
See also: https://reproducible-builds.org/docs/source-date-epoch/
Firefox devtools expects the build_id to be provided in a datetime specific format.
This PR also switches the time to UTC instead of
Local, since there seems to be no clear reason to use Local, and SOURCE_DATE_EPOCH is UTC.Testing: No functional changes, the devtools build_id is not covered by any tests.
Fixes: #44458