You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mzbuild: hoist debuginfo upload out of pre-image steps
We've had several bugs where building Materialize locally using mzbuild
has failed because mzbuild erroneously tried to upload debuginfo to S3
and Polar Signals outside of CI [0][1][2].
The core of the issue is that we used a pre-image step to execute a
*side effects*, i.e., uploading debuginfo to S3 or Polar Signals.
mzbuild was designed to be an input-addressable build system: a
(relatively) pure function from a set of input files to a packaged
image. Uploading files to another system is not part of this core
transformation from input files to built Docker image.
So, this commit refactors mzbuild to treat uploading debuginfo to S3 or
Polar Signals as the side effect that it is. The core mzbuild system no
longer has any special pre-image actions for uploading debuginfo.
Instead, mzbuild exposes a simple "post build" callback, which allows
the caller to executing an arbitrary function whenever an image build is
complete.
CI, then, uses this new post build callback to upload debuginfo to S3 or
PolarSignals as appropriate. Local builds (e.g., via `mzcompose`) do not
install a post build callback, and so are guaranteed not to upload
debuginfo when they shouldn't.
[0]: #20031
[1]: #22523
[2]: #23261
0 commit comments