Open Bug 1908935 Opened 1 year ago Updated 1 year ago

"mach build" for artifact builds fails if target archive wasn't completely downloaded

Categories

(Firefox Build System :: General, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: whimboo, Unassigned)

References

(Blocks 1 open bug)

Details

While mach build was running for my artifact build I closed the lit of the laptop which put it into hibernation mode. After reopening the lid and logging in the before ongoing download was aborted. As result the DMG is not fully downloaded and not mach fails to attach it. Running mach build again will give the same results until the half-downloaded file gets removed.

/usr/bin/make -f client.mk -j10 -s
 0:19.41 Downloading artifact to local cache: /Users/henrik/.mozbuild/package-frontend/fcdcea09db645990-target.common.tests.tar.gz
 0:20.52 Downloading... 0.0 %
 0:24.01 Downloading... 56.0 %
 0:26.73 Downloading... 100.0 %
 0:26.73 Purged artifact /Users/henrik/.mozbuild/package-frontend/ce9b14fc2eb189f9-target.common.tests.tar.gz.processed.jar
 0:28.43 Downloading artifact to local cache: /Users/henrik/.mozbuild/package-frontend/79eea1d7098b16c3-target.dmg
 0:28.88 Downloading... 0.0 %
 0:31.95 Downloading... 10.1 %
 0:35.84 Downloading... 20.2 %
 0:40.16 Downloading... 30.3 %
 3:09.37 Downloading... 40.4 %
 3:17.01 Downloading... 50.5 %
 3:26.58 Downloading... 60.6 %
 3:27.33 Purged artifact /Users/henrik/.mozbuild/package-frontend/88140e165658c6fc-target.dmg
 3:27.42 hdiutil: attach failed - image not recognised
 3:28.16 Error running mach:
 3:28.16     mach --log-no-times artifact install
 3:28.16 The error occurred in code that was called by the mach command. This is either
 3:28.16 a bug in the called code itself or in the way that mach is calling it.
 3:28.16 You can invoke ``./mach busted`` to check if this issue is already on file. If it
 3:28.16 isn't, please use ``./mach busted file artifact`` to report it. If ``./mach busted`` is
 3:28.17 misbehaving, you can also inspect the dependencies of bug 1543241.
 3:28.17 If filing a bug, please include the full output of mach, including this error
 3:28.17 message.
 3:28.17 The details of the failure are as follows:
 3:28.17 mozinstall.mozinstall.InstallError: Failed to install "/Users/henrik/.mozbuild/package-frontend/79eea1d7098b16c3-target.dmg ([Errno 2] No such file or directory: '')"
 3:28.17   File "/Users/henrik/code/gecko/python/mozbuild/mozbuild/artifact_commands.py", line 196, in artifact_install
 3:28.17     return artifacts.install_from(source, distdir or command_context.distdir)
 3:28.17   File "/Users/henrik/code/gecko/python/mozbuild/mozbuild/artifacts.py", line 1690, in install_from
 3:28.17     return self.install_from_recent(distdir)
 3:28.17   File "/Users/henrik/code/gecko/python/mozbuild/mozbuild/artifacts.py", line 1586, in install_from_recent
 3:28.17     return self._install_from_hg_pushheads(hg_pushheads, distdir)
 3:28.17   File "/Users/henrik/code/gecko/python/mozbuild/mozbuild/artifacts.py", line 1572, in _install_from_hg_pushheads
 3:28.17     if self.install_from_url(url, distdir):
 3:28.17   File "/Users/henrik/code/gecko/python/mozbuild/mozbuild/artifacts.py", line 1546, in install_from_url
 3:28.17     return self.install_from_file(filename, distdir)
 3:28.17   File "/Users/henrik/code/gecko/python/mozbuild/mozbuild/artifacts.py", line 1505, in install_from_file
 3:28.17     raise e
 3:28.17   File "/Users/henrik/code/gecko/python/mozbuild/mozbuild/artifacts.py", line 1498, in install_from_file
 3:28.17     self._artifact_job.process_artifact(filename, processed_filename)
 3:28.17   File "/Users/henrik/code/gecko/python/mozbuild/mozbuild/artifacts.py", line 259, in process_artifact
 3:28.17     return self.process_package_artifact(filename, processed_filename)
 3:28.17   File "/Users/henrik/code/gecko/python/mozbuild/mozbuild/artifacts.py", line 728, in process_package_artifact
 3:28.17     mozinstall.install(filename, tempdir)
 3:28.18   File "/Users/henrik/code/gecko/testing/mozbase/mozinstall/mozinstall/mozinstall.py", line 157, in install
 3:28.18     reraise(InstallError, error, trbk)
 3:28.18   File "/Users/henrik/code/gecko/third_party/python/six/six.py", line 718, in reraise
 3:28.18     raise value.with_traceback(tb)
 3:28.18   File "/Users/henrik/code/gecko/testing/mozbase/mozinstall/mozinstall/mozinstall.py", line 132, in install
 3:28.18     install_dir = _install_dmg(src, dest)
 3:28.18   File "/Users/henrik/code/gecko/testing/mozbase/mozinstall/mozinstall/mozinstall.py", line 317, in _install_dmg
 3:28.18     for appFile in os.listdir(appDir):
 3:28.18 Sentry event ID: 8e9fa27c9f8b43488f0805e5b8f486d9
 3:28.27 Sentry is attempting to send 0 pending error messages
 3:28.27 Waiting up to 2 seconds
 3:28.27 Press Ctrl-C to quit
 3:28.74 make[3]: *** [recurse_artifact] Error 1
 3:28.74 make[2]: *** [artifact] Error 2
 3:28.74 make[1]: *** [default] Error 2
 3:28.74 make: *** [build] Error 2
 3:28.77 W 0 compiler warnings present.

The severity field is not set for this bug.
:ahochheiden, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(ahochheiden)

Yeah, we should probably handle this scenario automatically.

Severity: -- → S3
Flags: needinfo?(ahochheiden)
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.