Repository navigation
One plan builds the compose project and its image; the deploy record is a dataclass - #54
Merged
Merged
Conversation
…is a dataclass Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Intent
Write each rule of a deploy once: the image of a plan, the Dockerfile path, the compose files, and the status of an exit code. Source: the user, in the Yard audit. It replaces #49, which GitHub closed when the base branch of #49 was deleted. #48 is merged.
Found
apps._ready_repo,apps._ready_source, andcompose.saved_projecteach built the image and the Dockerfile path with their own copy of the rules:split('@')[0]@<digest>two times,compose:<rev[7:19]>two times, and theyard:Dockerfile rule two times.compose.projecttook eight arguments, and the callers worked out the checkout themselves.apps._applyandstatus.deploy_recordeach turned an exit code into a status and an error text: 0 ok, 3 reverted, any other code failed.status.deploy_recordreturned a plain dict. The API andapps._joinread it by string keys.test_check_repo_debouncesfailed at random onmain. Since The deploy container is the only deploy record and the deploy lock #47, each check runspodman ps. That call can take longer than the 50 ms window of the test.Changed
compose.project(config, app, plan)takes the plan (Deployed). It picks the checkout (the clone for a repo app, the app folder otherwise), the image (compose.plan_image), the Dockerfile, and the files.Projectcarriesimage.saved_projectonly checks that the files are still there, then callsproject.status.deploy_status(code)andstatus.deploy_error(code, previous)hold the exit-code rule._applyanddeploy_recorduse them.status.Recordis the deploy record.Row.deployandPage.deployhold aRecord. The JSON shapes do not change:asdictwrites the same keys, and the deploy route still addsportonok.I did not add a separate
Sourcetype. Whencompose.projectowns the rules, the string checks that remain are each in one place.Not done
Nothing
Proof
tests/server/test_compose.pychecks the image and the Dockerfile of each kind through the newproject.test_check_repo_debouncespassed 5 runs in a row.Questions
None
🤖 Generated with Claude Code