Skip to content

rust(fix): fail sift-cli export when the server returns no job ID - #868

Closed
omar-sift wants to merge 1 commit into
mainfrom
dev/ENG-16360-sift-cli-export-no-jobid
Closed

omar-sift wants to merge 1 commit into
mainfrom
dev/ENG-16360-sift-cli-export-no-jobid

Conversation

@omar-sift

Copy link
Copy Markdown
Contributor

Description

When an organization has the async-exports feature flag off, ExportData does not return a job_id. sift-cli export assumed a job ID was always present:

  • export --no-wait printed Started export job with a blank ID, linked to /manage/jobs?jobId=, and exited 0.
  • export without --no-wait tried to fetch the job and failed with failed to retrieve job by ID.

export now checks for an empty job_id before it polls or prints a job link. It prints an error, links to the Sift jobs page, and exits 1:

error: The server did not return a job ID

Tip: Check the jobs page in Sift: https://<app-uri>/manage/jobs

Without a configured app_uri, the tip points to sift-cli config update --app-uri, as the other export messages do.

  • Add build_jobs_page_url for the jobs page link. build_jobs_url now builds on it.
  • Add an Unreleased changelog entry for sift-cli. Scripts that relied on exit status 0 from export --no-wait now fail.

Verification

  • cargo test -p sift_cli passes. New explore_url tests cover the jobs page link, jobId encoding, and a missing, empty, or slash-only app_uri.
  • cargo fmt --check passes.
  • Ran sift-cli export asset ... --no-wait and sift-cli export asset ... against a local server with async-exports=off. Both print the error above and exit 1.

@omar-sift
omar-sift force-pushed the dev/ENG-16360-sift-cli-export-no-jobid branch from 4b1617e to ec2e7a3 Compare November 4, 2026 22:38
@omar-sift
omar-sift marked this pull request as ready for review November 4, 2026 22:55
@omar-sift omar-sift closed this Nov 5, 2026
@omar-sift
omar-sift deleted the dev/ENG-16360-sift-cli-export-no-jobid branch November 5, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants