Repository navigation
Conversation
This branch has not been deployed
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.
Summary
apify pushof a monorepo Actor (one whosedockerContextDirlies above its folder) now uploads the Git repository root and tells the platform where the Actor lies in it through theactorPathversion field, instead of refusing with exit code 255. Both Actors of apify/actor-monorepo-example can then build from a push, as they do from a Git source.Closes #595 (stage 2). Part of apify/apify-core#28685; needs apify/apify-core#31473 on the platform.
Stacked on the path validation PR (#1503), which sits on the preflight PR (#1502).
Changes
sourceRootand the file list comes fromgetContextFilePaths(Git clone semantics,/separators); outside Git it is the Docker context root with the ordinary list, so.actorignoreapplies there.actor.jsonpath check runs with that upload root and the Docker context, so adockerfileoutside the context exits 5 before any platform call.MAX_MULTIFILE_BYTESthe version getsSOURCE_FILESwith names relative to the upload root; otherwise the existing zip upload to theactor-<id>-sourcestore andTARBALLwith the (signed)tarballUrl. Every version create or update payload of such a push, including the inline version of a new Actor, carriesactorPath; ordinary pushes send no such key.os.tmpdir()for every push that zips, nottemp_file.zipin the working directory, and is removed in afinally.EISDIRorENOENTerror.actorPathprints the stage 1 refusal and exits 255; an Actor this push created is deleted first, and a failing delete is reported as a warning without masking the refusal.Tests
test/local/commands/push-monorepo.test.ts(mocked client, no network): source files upload with repository-relative names andactorPath,--jsonenvelope, the zip path (store record withapplication/zip,TARBALLwith a signedtarballUrl, notemp_file.zipleft in the working directory), the uncommitted-changes warning, the 400 skew case (refusal, exit 255, clean stdout with--json, deletion of a just-created Actor, a failing delete, a rejected Actor create, other 400s passed through), the no-Git fallback with.actorignore, a directory symlink and a dangling link, adockerfileoutside the Docker context, and the two cases kept from stage 1.pnpm run lint,pnpm run format,pnpm run build, andpnpm run test:localpass, except the two[python]suites (python_support.test.ts,works-with-spaces-in-path-to-actor.test.ts), which fail the same way on the unchanged base branch because of the local Python toolchain.test:api, which needs a platform token, and the[api]case the issue asks for (see below). Run with Node.js 24.18.0;.nvmrcpins 24.21.0, which is not installed on this machine.Notes for reviewers
actorPathis not allowed by the schema"), with the same duck-typedApifyApiErrorcast the other commands use.docs/is untouched (pnpm run update-docsproduces no diff).getContextFilePathskeeps them as a Git clone does, which the runtime's tar upload can carry butSOURCE_FILESand the zip cannot, so the push resolves them as described under Changes. A link whose target lies outside the repository is left out too, as a clone could not resolve it.[api]case intest/api/commands/push.test.tspushing a two-Actor fixture, once the platform change is deployed.🤖 Generated with Claude Code