Skip to content
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

Get builds reproducible enough for Firefox to resume accepting #3999

Closed
danfinlay opened this issue Apr 17, 2018 · 6 comments · Fixed by #4070
Closed

Get builds reproducible enough for Firefox to resume accepting #3999

danfinlay opened this issue Apr 17, 2018 · 6 comments · Fixed by #4070
Labels
area-buildSystem related to our build system type-bug
Milestone

Comments

@danfinlay
Copy link
Contributor

Mozilla has increased the strictness of their addon acceptance, and now requires that the source code we provide reliably produce exact matches of our submitted built addon.

Our build is not perfectly deterministic, it varies slightly on different platforms.

This is very bad for our Firefox support, and so we have a lot of bugs on Firefox that have been fixed on master.

This issue represents the urgent need to resume our ability to publish to Firefox's addon store.

@danfinlay danfinlay added type-bug P1-asap area-buildSystem related to our build system labels Apr 17, 2018
@danfinlay danfinlay added this to the Sprint 04 milestone Apr 17, 2018
@danfinlay
Copy link
Contributor Author

This could also be fixed by negotiating better terms with Mozilla, to get them accepting our builds as they are (since their acceptance criteria do not seem to require deterministic builds).

@danfinlay
Copy link
Contributor Author

Maybe related to:
browserify/browserify#1796

@danfinlay
Copy link
Contributor Author

Also related to #3664.

@williamchong
Copy link
Contributor

just curious, will this allow a deterministic script hash usable in CSP to mitigate #3133 ?

@danfinlay danfinlay self-assigned this Apr 24, 2018
@danfinlay
Copy link
Contributor Author

Investigated a bit, looks very likely that browserify non-determinism is caused by a bug in uglifyify that deletes options flags when they pass through the transform.

There seems to be a good fix for it in this PR, but it's been sitting around for nearly a year, so I don't expect it merged any time soon.

We should probably move to a different minification strategy, but in the meanwhile, I've merged that patch into my own branch at danfinlay/uglifyify#keep-flags, so we can install from that and have control of our source, I can also move that into the MetaMask org.

Another fix could be to remove minification, but I know that could increase our bundle size beyond what Mozilla accepts (oh, the irony, that their requirements caused us to breach them!)

I think the short-term fix is to probably use this branch, so I'll open a PR for switching to that, and we can see how Mozilla likes that if no one objects.

@ghost ghost added in progress labels Apr 24, 2018
danfinlay added a commit that referenced this issue Apr 24, 2018
May fix #3999, but will need to see if Mozilla can reproduce the build
with this updated repo.

Switches our `uglifyify` dependency from the production one
(under-maintained) to one that I've merged a critical patch into.

I'm open to discussion of how else we might approach this problem here.
Maybe we should use a different minification module entirely, remove
minification, or maybe refactor our build system!
@ghost ghost removed the in progress label Apr 25, 2018
@danfinlay
Copy link
Contributor Author

Yes, I agree. The issue was automatically closed, my mistake for using "fixes" wording on the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-buildSystem related to our build system type-bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants