Repository navigation
Labels
t-buildersIssues owned by the Builders team.Issues owned by the Builders team.
Description
Problem
apify push uploads the Actor folder. An Actor whose .actor/actor.json sets dockerContextDir above that folder (a monorepo Actor, as in apify/actor-monorepo-example) needs files the upload does not carry, so the platform build fails with Actor context path "../../.." is outside of Actor root directory!. With --force, the push first replaces a working Git source with that broken upload.
What we want
apify push reads dockerContextDir right after actor.json and, before the Actor lookup, the Git source question, or any write, decides what kind of push this is.
- No
dockerContextDir: an ordinary push, unchanged. - A context at or below the Actor folder, such as
".."or"../src": an ordinary push. Inside or outside is judged by the path as written, because push uploads a symlink's files under the link's own name. - A context beyond the Actor folder, inside the Git repository: refused with exit code 255 (
NotImplemented), naming the Actor, linking the monorepo Epic, and pointing to a Git source with#branch:folder. - A value that is not a string, or a directory that is missing, is not a directory, lies outside the Git repository, or (outside Git) does not contain the Actor folder: exit code 5 (
InvalidActorJson) with the reason. - The Actor folder is resolved from its real path, so a symlinked
--dirbehaves like the folder itself. - Messages go to stderr, so
--jsonkeeps stdout clean.
Out of scope
- Uploading monorepo Actors instead of refusing them:
apify push: upload monorepo Actors with the repository root andactorPath#1525. - Choosing which Actors to push (
apify push: select which Actors to push in a repository with several #1499) and checking theactor.jsonpaths (Validateactor.jsonpaths before push #1500).
How it's tested
test/local/lib/docker-context.test.ts: every outcome, inside and outside Git, including symlinks.test/local/commands/push-monorepo.test.ts: the refusal and both exit codes through the command, with a mocked client and no platform write.
Links
- Epic: apify/apify-core#28685
- Replaces the first stage of Make
apify pushwork for monorepo Actors that setdockerContextDir#595.
Metadata
Metadata
Assignees
Labels
t-buildersIssues owned by the Builders team.Issues owned by the Builders team.
Activity