Skip to content

test: Read build logs from a build of the test user's own Actor - #1260

Open
Pijukatel wants to merge 1 commit into
masterfrom
claude/amazing-johnson-t7bea5
Open

Pijukatel wants to merge 1 commit into
masterfrom
claude/amazing-johnson-t7bea5

Conversation

@Pijukatel

@Pijukatel Pijukatel commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor
  • Test-only fix, the client code is unchanged.
  • The API now serves a build log only to users who can write to or build the Actor (apify/apify-core#33530), so test_build_log and test_log_get_from_build got 404 Log was not found for apify/hello-world builds (failed run).
  • Both tests now use the new session-scoped build_id_of_own_actor fixture, which builds an Actor owned by the test user and deletes it afterwards.

The API serves a build log only to a user who can write to or build the
Actor (apify/apify-core#33530), so the build log of the public
`apify/hello-world` Actor now returns 404 "Log was not found" and
`test_build_log` and `test_log_get_from_build` fail.

Both tests now read the log of a build from the new session-scoped
`build_id_of_own_actor` fixture, which creates an Actor owned by the
test user, builds it, and deletes it afterwards.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ocuAK9EJpfkTeEyxmMsQo
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Nov 27, 2026
@codecov

codecov Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.70%. Comparing base (739f097) to head (3e3e682).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1260      +/-   ##
==========================================
+ Coverage   91.39%   95.70%   +4.31%     
==========================================
  Files          65       65              
  Lines        6798     6798              
==========================================
+ Hits         6213     6506     +293     
+ Misses        585      292     -293     
Flag Coverage Δ
integration 90.52% <ø> (?)
unit 91.39% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Pijukatel
Pijukatel requested a review from vdusek November 27, 2026 14:40
@Pijukatel
Pijukatel marked this pull request as ready for review November 27, 2026 14:41


async def test_build_log(client: ApifyClient | ApifyClientAsync) -> None:
async def test_build_log(client: ApifyClient | ApifyClientAsync, build_id_of_own_actor: str) -> None:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: This test now does the same thing as test_log_get_from_build, but asserts only is not None. Could it use the same isinstance(log_content, str) and len(log_content) > 0 checks, or could we drop one of the two tests?

✍️ Drafted by Claude Code

kvs_client.delete()


@pytest.fixture(scope='session')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: With xdist, a session fixture runs once per worker, so the 3.11 job built 4 Actors (gw6, gw11, gw13, gw14). The job is still faster than the last green master run, so it's fine as is. Just noting why the tail of the run is slower.

✍️ Drafted by Claude Code

This branch has not been deployed

No deployments
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