Summary
Improve apify push output so agents can clearly distinguish source upload success from final cloud build success.
Problem
apify push currently streams build logs and returns a non-zero exit code when the build fails. This technically gives agents enough information.
However, because the command has multiple phases, agents can still misinterpret the result:
- Actor created/updated
- Source uploaded
- Cloud build started
- Cloud build failed
An agent may summarize the command as “Pushed the Actor to Apify” after seeing the earlier successful phases, even though the final build failed.
Desired human-readable output
At the end of apify push, print a clear final status block:
Apify push result: FAILED
Upload: SUCCEEDED
Build: FAILED
Actor ID: M4wKY3jNvHeoT87xA
Build ID: ...
Build number: 0.0.1
Exit code: 1
Actor URL: ...
Build URL: ...
Reason:
npm error command sh -c node scripts/fail-build.js
ACTOR: ERROR: Container image build failed
For successful builds:
Apify push result: SUCCEEDED
Upload: SUCCEEDED
Build: SUCCEEDED
Actor ID: ...
Build ID: ...
Build number: ...
Actor URL: ...
Build URL: ...
Desired JSON output
apify push --json should return a final result object with an explicit ok field:
{
"ok": false,
"operation": "push",
"actor": {
"id": "M4wKY3jNvHeoT87xA",
"url": "https://console.apify.com/actors/M4wKY3jNvHeoT87xA"
},
"build": {
"id": "...",
"number": "0.0.1",
"status": "FAILED",
"url": "https://console.apify.com/actors/M4wKY3jNvHeoT87xA#/builds/0.0.1"
},
"error": {
"phase": "build",
"message": "Build failed",
"logTail": [
"npm error command sh -c node scripts/fail-build.js",
"ACTOR: ERROR: Container image build failed"
]
},
"exitCode": 1
}
Acceptance criteria
apify push prints a final result summary.
apify push --json includes ok, operation, actor, build, and exitCode.
- Failed, timed-out, and aborted builds return non-zero exit codes.
- Upload success is not presented as overall push success when the build fails.
Summary
Improve
apify pushoutput so agents can clearly distinguish source upload success from final cloud build success.Problem
apify pushcurrently streams build logs and returns a non-zero exit code when the build fails. This technically gives agents enough information.However, because the command has multiple phases, agents can still misinterpret the result:
An agent may summarize the command as “Pushed the Actor to Apify” after seeing the earlier successful phases, even though the final build failed.
Desired human-readable output
At the end of
apify push, print a clear final status block:For successful builds:
Desired JSON output
apify push --jsonshould return a final result object with an explicitokfield:{ "ok": false, "operation": "push", "actor": { "id": "M4wKY3jNvHeoT87xA", "url": "https://console.apify.com/actors/M4wKY3jNvHeoT87xA" }, "build": { "id": "...", "number": "0.0.1", "status": "FAILED", "url": "https://console.apify.com/actors/M4wKY3jNvHeoT87xA#/builds/0.0.1" }, "error": { "phase": "build", "message": "Build failed", "logTail": [ "npm error command sh -c node scripts/fail-build.js", "ACTOR: ERROR: Container image build failed" ] }, "exitCode": 1 }Acceptance criteria
apify pushprints a final result summary.apify push --jsonincludesok,operation,actor,build, andexitCode.