Repository navigation
test(quickstart): fail when the project cannot be removed without root - #289
Merged
Merged
Conversation
On a Linux host the dev containers run as root over bind mounts, so a file they write into the project leaves it undeletable without sudo. Tear the stack down and remove the project as part of the run, and list the root-owned paths when that fails, rather than hiding them behind the cleanup fallback.
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.
Follows #288.
On a Linux host the api dev container runs as root over the bind-mounted
api/, so the Express starter'sapi/logs/app.log(and FastAPI's__pycache__) end up owned by root, and a user cannotrm -rfthe project without sudo. #288 worked around that in its cleanup with analpinecontainer. This makes it a checked step instead: after the owner signs in, the run tears the stack down and removes the project as the runner user, and fails with the root-owned paths listed if that does not work. The fallback stays incleanuponly for runs that fail earlier.The fix itself is in the templates: fells-code/seamless-templates#126. Because this script runs the CLI as published on npm, it fails until a CLI release pins a templates tag that includes it, so merge this after that pin bump. Its workflow runs on this PR because it touches the script, and that run is expected to fail at "Removing the project" until then.
Verification
scripts/quickstart-clean-run.shrun as a uid 1001 user in a Linux host (docker:29-dind):seamless-cli@latest(0.24.0, templates v0.20.0): fails at "Removing the project" withapi/logs/app.log: Permission denied, listingapi/logsandapi/logs/app.log.seamless-cli@latestwithSEAMLESS_TEMPLATES_DIRset to the templates fix branch:PASS, owner rolesuser,betaUser,admin:write.npm test: 1408 passed, 4 skipped.