Skip to content

apify push: upload monorepo Actors with the repository root and actorPath #1525

Description

@DaveHanns

Problem

Once apify push detects a monorepo Actor (#1524), it can only refuse it. The Actor folder alone lacks the shared files, and nothing tells the platform which folder of a larger upload is the Actor. The platform side adds the actorPath version field for that (apify/apify-core#31473).

What we want

A monorepo Actor is pushed by uploading the Git repository root and setting actorPath to the Actor's folder in it, so both Actors of apify/actor-monorepo-example build from a push as they do from a Git source.

  • The upload holds what a Git clone would, as on disk: tracked files plus untracked files Git does not ignore. Outside Git, it is the Docker context root with the ordinary file list, so .actorignore applies.
  • Below 3 MB the version gets SOURCE_FILES with names relative to the upload root; otherwise the existing zip upload and TARBALL. Every version write of such a push carries actorPath; ordinary pushes send none.
  • A symlink to a file or folder inside the repository goes as its content at the link's path. A dangling link or one pointing outside the repository is left out.
  • The actor.json path check (Validate actor.json paths before push #1500) runs with the upload root, and dockerfile must lie inside the Docker context; otherwise exit code 5 before any platform call.
  • If the API rejects actorPath (a platform without the field), the push prints the refusal from apify push: refuse monorepo Actors before any write #1524 and exits 255, deleting an Actor this push created.
  • The temporary zip goes to the OS temp directory and is always removed.
  • --json keeps its envelope.

Out of scope

How it's tested

  • test/local/commands/push-monorepo.test.ts with a mocked client: the inline and zip uploads with actorPath, symlinks, the rejected-actorPath fallback, and the path check.
  • One token-gated [api] case in test/api/commands/push.test.ts once the platform change is deployed.

Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

t-buildersIssues owned by the Builders team.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions