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

Unable to reproduce release build, minified files differ #959

Open
lidel opened this issue Feb 13, 2019 · 3 comments
Open

Unable to reproduce release build, minified files differ #959

lidel opened this issue Feb 13, 2019 · 3 comments
Labels
exp/intermediate Prior experience is likely helpful kind/discussion Topical discussion; usually not changes to codebase P2 Medium: Good to have, but can wait until someone steps up

Comments

@lidel
Copy link
Member

lidel commented Feb 13, 2019

Problem

Build pipeline produces different output than one represented by a CID attached to release notes, which causes ipfs-companion to be hidden from addons.mozilla.org (ipfs/ipfs-companion#679) due to reproducibility issues:

  1. I've built webui branch https://github.com/ipfs-shipyard/ipfs-webui/releases/tag/v2.3.3 using node 8.12.0 and npm 6.4.1, but the resulting code is different from the webui folder in the xpi. Please see the attached build https://drive.google.com/open?id=1Ba9kvMhSUZM0KMQMhP7ebYmGX8CCAUAh
    Please test your build steps on a virtual machine with a clean setup and update the instructions for us.

I compared

Indeed, minified content differs:

[ Click to expand diff ]
$ diff --brief -r build_webui webui_QmXc9raDM1M5G5fpBnVyQ71vR4gbnskwnB9iMEzBuLgvoZ                                                                                                                                       
Files build_webui/asset-manifest.json and webui_QmXc9raDM1M5G5fpBnVyQ71vR4gbnskwnB9iMEzBuLgvoZ/asset-manifest.json differ
Files build_webui/index.html and webui_QmXc9raDM1M5G5fpBnVyQ71vR4gbnskwnB9iMEzBuLgvoZ/index.html differ
Only in build_webui: manifest.json
Only in webui_QmXc9raDM1M5G5fpBnVyQ71vR4gbnskwnB9iMEzBuLgvoZ: _previous-versions
Files build_webui/service-worker.js and webui_QmXc9raDM1M5G5fpBnVyQ71vR4gbnskwnB9iMEzBuLgvoZ/service-worker.js differ
Only in build_webui/static/css: main.ace3c083.css.map
Only in build_webui/static/js: 0.45d2ea26.chunk.js
Only in build_webui/static/js: 0.45d2ea26.chunk.js.map
Only in webui_QmXc9raDM1M5G5fpBnVyQ71vR4gbnskwnB9iMEzBuLgvoZ/static/js: 0.f150ccdd.chunk.js
Only in webui_QmXc9raDM1M5G5fpBnVyQ71vR4gbnskwnB9iMEzBuLgvoZ/static/js: 1.61c650c3.chunk.js
Only in build_webui/static/js: 1.6bbfba19.chunk.js
Only in build_webui/static/js: 1.6bbfba19.chunk.js.map
Only in build_webui/static/js: 2.bc355859.chunk.js
Only in build_webui/static/js: 2.bc355859.chunk.js.map
Only in webui_QmXc9raDM1M5G5fpBnVyQ71vR4gbnskwnB9iMEzBuLgvoZ/static/js: 2.d164b02b.chunk.js
Only in build_webui/static/js: 3.52556504.chunk.js
Only in build_webui/static/js: 3.52556504.chunk.js.map
Only in webui_QmXc9raDM1M5G5fpBnVyQ71vR4gbnskwnB9iMEzBuLgvoZ/static/js: 3.c371693f.chunk.js
Only in webui_QmXc9raDM1M5G5fpBnVyQ71vR4gbnskwnB9iMEzBuLgvoZ/static/js: 4.2f4edf06.chunk.js
Only in build_webui/static/js: 4.cdb20f5c.chunk.js
Only in build_webui/static/js: 4.cdb20f5c.chunk.js.map
Only in webui_QmXc9raDM1M5G5fpBnVyQ71vR4gbnskwnB9iMEzBuLgvoZ/static/js: 5.5fd1145b.chunk.js
Only in build_webui/static/js: 5.e171992c.chunk.js
Only in build_webui/static/js: 5.e171992c.chunk.js.map
Only in build_webui/static/js: 6.6b80439c.chunk.js
Only in build_webui/static/js: 6.6b80439c.chunk.js.map
Only in webui_QmXc9raDM1M5G5fpBnVyQ71vR4gbnskwnB9iMEzBuLgvoZ/static/js: 6.e9a35513.chunk.js
Only in webui_QmXc9raDM1M5G5fpBnVyQ71vR4gbnskwnB9iMEzBuLgvoZ/static/js: 7.9c60492f.chunk.js
Only in build_webui/static/js: 7.ee081174.chunk.js
Only in build_webui/static/js: 7.ee081174.chunk.js.map
Only in build_webui/static/js: main.2b881fc1.js
Only in build_webui/static/js: main.2b881fc1.js.map
Only in webui_QmXc9raDM1M5G5fpBnVyQ71vR4gbnskwnB9iMEzBuLgvoZ/static/js: main.bf82967b.js

Looking for a Solution

So far options are:

  • (A) Recreate release build and provide step-by-step instruction for reviewer
    • Are we able to provide steps on how to reproduce minified output from QmXc9raDM1M5G5fpBnVyQ71vR4gbnskwnB9iMEzBuLgvoZ ?
    • Who built it? What was the version of node/npm? Will steps work cross-platform?
  • (B) Update build pipeline to support reproducible build and make a new release
    • Is it technically feasible to provide reproducible build of ipfs-webui that works the same across all platforms?
      • We provide docker-based build pipeline for ipfs-companion, which is an overkill but works.
  • (C) Remove bundled Web UI from IPFS Companion and load it from IPFS
    • We may do this anyway just to restore ipfs-companion in Firefox addon store (and add bundled Web UI when it is possible to build in reproducible manner)
  • (D) ?

@olizilla @alanshaw @hugomrdias would love to hear your thoughts on this

@olizilla
Copy link
Member

olizilla commented Feb 13, 2019

webui has never guaranteed a reproducible build. We've relied on Jenkins to create a traceable build / release process.

In the short term, I think webui should be extracted from companion and loaded from IPFS as the daemon does.

In the longer term, I'm in favour of making the webui build be reproducible.

@olizilla
Copy link
Member

Als of note, Jenkins is being decommissioned, so now is a good time for us to revisit this!

@olizilla olizilla added exp/intermediate Prior experience is likely helpful kind/discussion Topical discussion; usually not changes to codebase P2 Medium: Good to have, but can wait until someone steps up labels Feb 18, 2019
@lidel
Copy link
Member Author

lidel commented Feb 26, 2019

We went with (C)ipfs/ipfs-companion#680
(Removed bundled Web UI from IPFS Companion and load it from IPFS)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/intermediate Prior experience is likely helpful kind/discussion Topical discussion; usually not changes to codebase P2 Medium: Good to have, but can wait until someone steps up
Projects
No open projects
Status: Needs Grooming
Development

No branches or pull requests

2 participants