Skip to content

feat(cli): add wait commands and enhance agentic output for builds and runs#1168

Open
l2ysho wants to merge 5 commits into
masterfrom
1135-improve-apify-cli-buildrun-output-for-agentic-workflows
Open

feat(cli): add wait commands and enhance agentic output for builds and runs#1168
l2ysho wants to merge 5 commits into
masterfrom
1135-improve-apify-cli-buildrun-output-for-agentic-workflows

Conversation

@l2ysho

@l2ysho l2ysho commented May 29, 2026

Copy link
Copy Markdown
Contributor

Introduces dedicated wait commands and unifies output for several build/run commands for better CI/CD integration.

closes #1140

…d runs

Introduces dedicated `wait` commands and unifies output for several build/run commands for better CI/CD integration.
@l2ysho l2ysho self-assigned this May 29, 2026
@l2ysho l2ysho added the t-dx Issues owned by the DX team. label May 29, 2026
@l2ysho l2ysho linked an issue May 29, 2026 that may be closed by this pull request
@github-actions github-actions Bot added this to the 141st sprint - Tooling team milestone May 29, 2026
@l2ysho

l2ysho commented May 29, 2026

Copy link
Copy Markdown
Contributor Author

lets wait for #1134

The earlier change made `apify push` exit non-zero whenever the build had
not reached SUCCEEDED, including non-terminal RUNNING/READY states. That
broke the E2E lifecycle tests and any CI that treats a successful upload
+ in-progress build as a successful push. Only treat a terminal,
non-SUCCEEDED status as a push failure.
l2ysho and others added 3 commits June 10, 2026 16:07
waitForTerminalStatus overwrote a still-RUNNING job's status with a
synthetic TIMED-OUT when the client-side --timeout elapsed, so an agent
consuming the JSON could not tell "I gave up waiting" from "the platform
job timed out" (both reported TIMED-OUT, exit 2).

It now returns { job, timedOutWaiting } with the real platform status,
and the wait commands map a give-up to a distinct WaitTimedOut (6) exit
code, a timedOutWaiting JSON field, and give-up-specific messaging. The
exit-code mapping lives in a shared exitCodeForWaitResult helper.

Also drop the unused consoleActorUrl/consoleKeyValueStoreUrl exports.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…output-for-agentic-workflows' into 1135-improve-apify-cli-buildrun-output-for-agentic-workflows
@l2ysho l2ysho marked this pull request as ready for review June 15, 2026 12:15
static override flags = {
timeout: Flags.integer({
char: 't',
description: 'Maximum seconds to wait before giving up. Without this flag the command waits indefinitely.',

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.

Suggested change
description: 'Maximum seconds to wait before giving up. Without this flag the command waits indefinitely.',
description: 'In seconds, how long to wait before giving up. If skipped, it waits indefinitely.',

required: false,
}),
'poll-interval': Flags.integer({
description: 'How often to poll the platform, in seconds. Defaults to 2.',

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.

Suggested change
description: 'How often to poll the platform, in seconds. Defaults to 2.',
description: 'In seconds, how often to poll the platform. Defaults to 2.',

Comment thread docs/reference.md

FLAGS
--json Format the command output as
JSON

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.

Suggested change
JSON
JSON.

Can't find it, but just a missing period.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In command framework

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

Labels

t-dx Issues owned by the DX team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add wait commands for Actor builds and runs

4 participants