Skip to content

feat(push): add final status block and structured JSON output#1199

Merged
l2ysho merged 13 commits into
masterfrom
1136-improve-apify-push-final-status-and-json-output-for-agents2
Jun 25, 2026
Merged

feat(push): add final status block and structured JSON output#1199
l2ysho merged 13 commits into
masterfrom
1136-improve-apify-push-final-status-and-json-output-for-agents2

Conversation

@l2ysho

@l2ysho l2ysho commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Covers the status-mapping contract introduced by the new push status block / JSON output

  • Add test/local/commands/push.test.ts — 10 cases over every branch: SUCCEEDED, READY/RUNNING (fire-and-forget → exit 0), ABORTED/ABORTING, TIMED_OUT/TIMING_OUT,
    FAILED, and the unknown-status fallthrough. Plus an assertion that errorMessage is present on failures and absent on success/running.

Closes #1136

Rework the end of `apify push` so agents can distinguish source-upload
success from final cloud-build success (#1136).

- `apify push` prints a final result block (result, upload, build,
  IDs, URLs, exit code, and a failure reason log tail).
- `apify push --json` returns a structured result object with
  `ok`, `operation`, `actor`, `build`, optional `error`, and `exitCode`.
- Failed, timed-out, and aborted builds return non-zero exit codes;
  `ok` mirrors command success.

Closes #1136

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@l2ysho l2ysho self-assigned this Jun 15, 2026
@github-actions github-actions Bot added this to the 143rd sprint - Tooling team milestone Jun 15, 2026
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Jun 15, 2026
@l2ysho l2ysho added t-dx Issues owned by the DX team. and removed t-tooling Issues with this label are in the ownership of the tooling team. labels Jun 15, 2026
@l2ysho l2ysho requested a review from DaveHanns June 15, 2026 22:13
@github-actions github-actions Bot added the tested Temporary label used only programatically for some analytics. label Jun 15, 2026
@l2ysho l2ysho marked this pull request as ready for review June 15, 2026 22:17
@l2ysho l2ysho requested a review from vladfrangu as a code owner June 15, 2026 22:17
Comment thread src/commands/actors/push.ts
Comment thread src/commands/actors/push.ts
Comment thread src/commands/actors/push.ts Outdated
Comment thread src/commands/actors/push.ts Outdated
Comment thread src/commands/actors/push.ts
Comment thread src/commands/actors/push.ts Outdated
Comment thread src/commands/actors/push.ts
Comment thread src/commands/actors/push.ts
} else {
error({ message: 'Build failed!' });
process.exitCode = CommandExitCodes.BuildFailed;
const lines = [

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.

Q: do we already implement same style logging in case the upload itself fails?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

not now, It is not so big change but I would like to merge this PR and do it in followup, upload fails should not be common if platform is not in some serious problems (or user is in some isolated env).

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.

Makes sense 👍 You can either use the same issue (in that case don't close it with this PR) or create a new one for that once you tackle it.

@DaveHanns DaveHanns left a comment

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.

Few nits and suggestions. Otherwise looks good.

l2ysho and others added 3 commits June 23, 2026 09:59
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…atus-and-json-output-for-agents2' into 1136-improve-apify-push-final-status-and-json-output-for-agents2
improves type clarity and maintainability. addresses #1211.

@l2ysho l2ysho left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated

Comment thread src/commands/actors/push.ts Outdated
Comment thread src/commands/actors/push.ts Outdated
Comment thread src/commands/actors/push.ts
Comment thread src/commands/actors/push.ts
} else {
error({ message: 'Build failed!' });
process.exitCode = CommandExitCodes.BuildFailed;
const lines = [

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

not now, It is not so big change but I would like to merge this PR and do it in followup, upload fails should not be common if platform is not in some serious problems (or user is in some isolated env).

@l2ysho l2ysho requested a review from DaveHanns June 24, 2026 12:02

@DaveHanns DaveHanns left a comment

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.

LGTM, thanks 🚀

@l2ysho l2ysho merged commit 71560dd into master Jun 25, 2026
24 checks passed
@l2ysho l2ysho deleted the 1136-improve-apify-push-final-status-and-json-output-for-agents2 branch June 25, 2026 08:11
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. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve apify push final status and JSON output for agents

3 participants