Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR finalizes the deployment and packaging workflow improvements introduced in #546.
#546 was required to add the new workflow files onto
main
, without which the workflows cannot be exercised at all. This does mean the files get added in a buggy state as they're effectively untested. This PR fixes a bunch of the issues found.This PR is targeting
next
and notmain
so you can review the combination of both, however final merge will be intomain
. This means there are some sundry changes from the v0.6.0 release not present onnext
yet.Final result
We have two new deployment related workflows, replacing the existing release/deploy hybrid flows.
Release packaging
builds and uploads thearm64
andamd64
debian packages for each release. This is triggered automatically per release, but can also be manually triggered. Manual triggering is desirable if we cancelled the workflow, or need to make fixes in the workflow. Without the manual trigger we would have to re-release to trigger.Deploy
can be manually triggered and deploys a target version, branch or commit onto either testnet or devnet.Prior implementation
Previous implementation triggered on release/push-into-next, built packages, and deployed onto testnet/devnet. The new workflows separate release from deploy giving us more control. Automatically deploying devnet only makes sense if we have monitoring in place otherwise we just end with broken deployments constantly. Or maybe we can make it easier to trigger by adding a label to the PR for example.
The previous workflows have been deleted.
Broader fixes
The deployment workflows were also broken in a variety of ways. Notably its difficult to diagnose because communication with the instance is done via
ssm
which only reports the exit code of the final command in a set. Meaning often important commands will fail silently, and the workflow still succeeds.miden-node
andmiden-faucet
now have completely separate packaging whereas before they shared a commonmiden/
directory. This makes cleanup simpler. They also have completely separate install scripts now, and separate users.miden-faucet
also now requires copying the genesis faucet accountmac
as a prerequisite.ssm
command action failed to actuallyexit 1
on error, meaning things always failed silently 🤦I re-organized things by adding some actions as well which I hope made things easier to understand.
Remaining issues
ssm-command
still only reports the final command's exit code which is very brittle.ssm-command
truncates output logs.DEVNET_INSTANCE_TF
points at the wrong instanceThe
ssm-command
issues are "fixable" by using S3 as a middle man:-E
set.ssm-command
to download script from S3ssm-command
to run the script, piping output to a filessm-command
to upload output file to S3But that can be left for a future PR.