Resolves T5836. This automatically releases artifacts when Harbormaster builds finish (either passing or failing). This allows Harbormaster to release the Drydock leases it has for hosts.
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Maniphest Tasks
- Restricted Maniphest Task
- Commits
- Restricted Diffusion Commit
rPaab0ed1c50df: Implement artifact release for Harbormaster
Tested it with a build plan that passes and fails; tested it with lots of builds running in parallel.
Diff Detail
- Repository
- rP Phabricator
- Branch
- arcpatch-D10208
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 2158 Build 2162: [Placeholder Plan] Wait for 30 Seconds
Event Timeline
I think we don't need a lock for this, and we can do this outside of the lock (and a little more simply, see inlines). Does that make sense? Is the a reason the lock is important?
This basically looks fine to me.
It might also be nice to have a bin/harbormaster release-artifact <id> or something to make debugging easier.
At some point maybe the artifacts should track their acquisition state, too. That can happen in the future, though.
src/applications/harbormaster/engine/HarbormasterBuildEngine.php | ||
---|---|---|
65 | I think we should do this after releasing the lock..? | |
76 | Can we cover the pass/fail/deadlocked cases here (also after lock release) instead of inside updateBuildSteps()? | |
src/applications/harbormaster/storage/build/HarbormasterBuildArtifact.php | ||
128–144 | Fine, but also yuck -- I think we need ArtifactType kinda-soon-ish. |