Skip to content

fix: Fix the Python entrypoint detection - #14

Merged
Pijukatel merged 2 commits into
masterfrom
claude/python-actors-debug-hyt8ip
Sep 8, 2026
Merged

Pijukatel merged 2 commits into
masterfrom
claude/python-actors-debug-hyt8ip

Conversation

@Pijukatel

Copy link
Copy Markdown
Collaborator

No description provided.

The apify/actor-python base image ships a placeholder src/ package (its
default CMD is `python -m src`) that prints "replace this file with your
actual application code" - it exists in every derived image, so an Actor
whose code lives elsewhere made auto-detection pick and debug the dummy.
Detection now recognizes the placeholder by its marker text and skips it
(falling through to main.py etc., or failing with guidance to pass the
entry explicitly), and the CLI always logs which entrypoint it resolved
so a wrong pick is visible in the run log. Version bumped to 0.1.1.

Verified: unit scenarios for placeholder-only, placeholder-plus-real-code
and real-src layouts, plus the full DAP bridge suite.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0194oFPjsTxztgsPhyB4Wq7G
Auto-detection now scans for runnable packages by shape (any top-level
directory with __main__.py) instead of assuming src/. This covers the
current Apify templates (my_actor/, CMD python -m my_actor - including
python-uv), the older src/ layout, and Crawlee-generated projects, whose
package is named after the project (their Dockerfiles always end with
CMD python -m <package>). The base-image placeholder src/ is still
recognized by content and skipped; with several real candidates, src and
my_actor are preferred, otherwise the log lists them and asks for an
explicit -m. Ten layout scenarios covered by tests; bridge suite
re-passes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0194oFPjsTxztgsPhyB4Wq7G
@github-actions github-actions Bot added this to the 149th sprint - Tooling team milestone Sep 8, 2026
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Sep 8, 2026
@Pijukatel
Pijukatel merged commit 19d88a9 into master Sep 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants