ci(release): Sign and publish takes the agent's files from Forgejo's own address, and Wine installs while they build #57
No reviewers
Labels
No labels
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Beanstalk!57
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Beanstalk:ci/release-faster"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
An agent nightly spends more time waiting than building. In run #162, Sign and publish took 1 min 58 s, and 26 s of that was the download of the agent's artifact (~190 MB; the launcher's same step took 79 s) through Forgejo's public address behind Cloudflare: out over the home uplink and back in. The build job also installs Wine (~20 s) only after
package.shhas finished.What changed
agent/scripts/release.py artifacts <folder> --run <run id> <name>...(as Longshot's, MagicBeanDev/Longshot#1110): it fetches the run's named artifacts fromFORGEJO_UPLOAD_API(Forgejo's own address on the quick runner's network, where artifacts are on its disk) and unpacks them. It refuses a missing or duplicated name and any entry that is not a plain file name, and writes nothing until every artifact is fetched.release-agent.yml, Sign and publish: a new first step uses it. Thedownload-artifactsteps run only if it failed (the fallback, with its retry).release-agent.yml, build job: Wine (installed in the background) starts the same apt commands detached, beforepackage.sh. The Windows program starts waits for its status (10 min cap) and shows the apt log on failure.agent/tests/test_release.py: the unpacking (unpacked) checked offline: plain names taken, a folder, a shared name or a non-zip refused.Measurements
Verdict: expected to save ~45 s per agent release (~25 s in Sign and publish, more when Cloudflare is as slow as on the launcher's runs; ~20 s in the build job). The real number comes from the first nightly after merge, since the internal address can't be reached from my PC.
Testing
Tested:
agent/scripts/release.py artifactsagainst run 30104's real artifact (Linux, public address): the three files unpacked by name. The background-install pattern in a local shell. The workflow parses (PyYAML).Tested (Longshot's copy): the same command against a real run's artifacts (Linux, public address): unpacked by name, and a missing name refused. The background-install pattern in a local shell: the first step returns at once and the status passes through. The workflow parses (PyYAML).
Not tested:
agent/tests/test_release.py(left to CI). Whether the job token may read the artifacts API: if it can't, the fallback runs as today.Must be tested: the first nightly after merge: The agent's files, from Forgejo's own address passes, and the download-artifact steps are skipped.
Risks
If the artifacts API refuses the job token or answers differently, the release goes through the old download-artifact path. Revert the commit to undo. Nothing changes for players.
🤖 Generated with Claude Code
https://claude.ai/code/session_017vw8dzkpXRZ2cBAf7vu5YQ
WIP: ci(release): Sign and publish takes the agent's files from Forgejo's own address, and Wine installs while they buildto ci(release): Sign and publish takes the agent's files from Forgejo's own address, and Wine installs while they build