9
2
Fork
You've already forked platform
2

api: atomically guard concurrent deploys for one app (#309) #350

Manually merged
ryansquared merged 2 commits from fix/many-git-push-deploy into main 2026年07月07日 16:31:26 +02:00
https://codeberg.org/caution/platform/issues/309
@ -0,0 +179,4 @@
# ── Step 4: Race the state CAS on the destroyed-app branch ───────────
#
# Mirrors api/src/main.rs deploy_logic (was_destroyed branch). Two concurrent

Not sure we should be touching the DB directly. This pulls the logic out of main.rs, and places it into here. If we change main.rs, it might not show up here. Is there a way we can start a git push, terminate it partway through, then start another git push, and see if that errors?

Not sure we should be touching the DB directly. This pulls the logic out of `main.rs`, and places it into here. If we change `main.rs`, it might not show up here. Is there a way we can start a `git push`, terminate it partway through, then start another `git push`, and see if that errors?
Author
Owner
Copy link

I think we can't aim for the right window from outside.

We could extract the guard SQL into a shared constant that both main.rs and the test reference, so any change to it breaks the test, but a bandaid.

or we do both? add a kill and retry test + keep this?

I think we can't aim for the right window from outside. We could extract the guard SQL into a shared constant that both `main.rs` and the test reference, so any change to it breaks the test, but a bandaid. or we do both? add a kill and retry test + keep this?

I think this introduces too much test-specific logic for me to be happy with. I think the SQL logic looks good, but I don't think this test is sufficient enough at being a test. I would rather we remove it and manually test the endpoint instead.

I think this introduces too much test-specific logic for me to be happy with. I think the SQL logic looks good, but I don't think this test is sufficient enough at being a test. I would rather we remove it and manually test the endpoint instead.
vkobel force-pushed fix/many-git-push-deploy from 57a8da53a7 to 03ab2a24e1 2026年07月07日 09:38:29 +02:00 Compare
ryansquared manually merged commit 3374e7d3f5 into main 2026年07月07日 16:31:26 +02:00
Sign in to join this conversation.
No reviewers
Labels
Clear labels
Compat/Breaking
Breaking change that won't be backward compatible
Component/Enclave-Builder
This issue affects Enclave Builder (git-push and CLI)
Component/Infrastructure
This issue affects generic Caution hosted infra components
Deploy/BYOC
Relates to Caution Bring-your-own-compute
Deploy/Full-managed
Relates to Caution fully managed cloud
Deploy/Self-hosted
Relates to Caution deployed on self-hosted infra
Interface/API
This issue affects the API
Interface/CLI
This issue affects the command line interface
Interface/Git
This issue affects the Git `push` interface
Interface/Web
This issue affects the web dashboard
Kind/Bug
Something is not working
Kind/Documentation
Documentation changes
Kind/Enhancement
Improve existing functionality
Kind/Feature
New functionality
Kind/Security
This is security issue
Kind/Testing
Issue or pull request related to testing
Priority
Critical
The priority is critical
Priority
High
The priority is high
Priority
Low
The priority is low
Priority
Medium
The priority is medium
Reviewed
Confirmed
Issue has been confirmed
Reviewed
Duplicate
This issue or pull request already exists
Reviewed
Invalid
Invalid issue
Reviewed
Won't Fix
This issue won't be fixed
Status
Abandoned
Somebody has started to work on this but abandoned work
Status
Blocked
Something is blocking this issue or pull request
Status
Need More Info
Feedback is required to reproduce issue or to continue work
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
caution/platform!350
Reference in a new issue
caution/platform
No description provided.
Delete branch "fix/many-git-push-deploy"

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?