What is the default build environment for add ons?

I’m one of the maintainers of Angular DevTools, and as I’m sure add-on reviewers are aware, we’ve been struggling with reproducible builds for source verification.

Despite our best efforts at improving our build health, this seems to be a consistent and recurring problem, with the latest rejections being a platform-specific error no one on the team can reproduce. The documentation states a specific default environment which should be fine for our project. We don’t have any additional unique constraints to request in the reviewer environment and expect this should work. The fact that it doesn’t means there’s something else unique to this environment we’re not seeing.

Is there a way to easily replicate the default reviewer environment so we can reproduce the core error we need to debug? Is there some setup script or Dockerfile we can use? I suspect it might also be easier for us longer term to target a specific reviewer environment and ensure our build is successful there (potentially running it in our own CI). I’ve asked about this a couple times in replies on the release rejection, but haven’t received a response.

We’d love to get our process into a healthier state for more consistently reproducible builds, and anything you can provide to help us get there would be greatly appreciated. :folded_hands:

I would guess reviewers are using some Linux in some VM.

So when I had similar issues, I’ve created brand new Ubuntu LTS in my Virtualbox and tested my build script instructions:

npm ci
npm run prod

I’ve actually created a custom script that would unzip my source code, do the build, and then using git it would compare it with the submitted files.

Here it is, for inspiration:

#!/bin/bash
echo "Starting build"
rm -rf ~/Desktop/build
mkdir ~/Desktop/build
cd /media/sf_tmp/_build
unzip firefox_prod.zip -d ~/Desktop/build/firefox_prod
unzip firefox-source-files.zip -d ~/Desktop/build/firefox-source-files
cd ~/Desktop/build/firefox_prod
# use Git to track changes
git init
git add .
git commit -m 'test'
# delete all files
mkdir ../deleteme
mv * ../deleteme
rm -rf ../deleteme

# build files from sources:
cd ../firefox-source-files
npm ci
npm run prod
unzip ./dist/firefox_prod.zip -d ../firefox_prod
cd ../firefox_prod
git status
# wait for user input
read -p "Press enter to continue"

2 Likes