Skip to content

refactor(order)!: retire deprecated order flow - #830

Draft
jorgeparavicini wants to merge 1 commit into
mainfrom
refactor(order)!/retire-deprecated-order-flow
Draft

refactor(order)!: retire deprecated order flow#830
jorgeparavicini wants to merge 1 commit into
mainfrom
refactor(order)!/retire-deprecated-order-flow

Conversation

@jorgeparavicini

Copy link
Copy Markdown
Contributor

WIP / draft — step 1 of the deprecated-endpoint removal is done; steps 2–3 are gated on a backend field (see below). Do not mark ready yet.

Goal

Remove all SDK references to the deprecated GET /pipeline/{pipelineId} and GET /workflow/{workflowId}/progress endpoints, then drop the generator keep-list so they fall out of the generated client on a clean regen. The backend keeps serving them (other consumers exist), but the SDK stops using them. Follows #829 (job-progress migration).

Step 1 — order-flow retirement (this commit) ✅

RapidataOrder is deprecated (order creation is superseded by Jobs). Removed its use of the deprecated endpoints:

  • display_progress_bar() — used the workflow-progress endpoint. Removed.
  • preview() — resolved the campaign id by unpacking the pipeline. Removed.
  • get_results(preliminary_results=...) — the preliminary path used the pipeline preliminary-download endpoints. Removed the arg; get_results() still returns final results via download-results (unchanged, non-deprecated).
  • the order-creation campaign-preview QR (unpacked the pipeline). Removed.
  • now-dead pipeline/workflow-unpacking helpers + _retry_operation.

BREAKING: display_progress_bar(), preview(), and the preliminary_results arg of get_results() are gone from RapidataOrder.

Step 2 — definition-creation QR (GATED, pending) ⏳

The campaign-preview QR after job-definition creation still resolves the campaign id via GET /pipeline/{pipelineId} (no jobId exists at that point). Waiting on the backend to re-add the definition's preview campaign id to CreateJobDefinitionEndpoint_Output + GET /job/definition/{definitionId}; then the SDK reads it directly and drops the pipeline lookup.

Step 3 — drop keep-list + clean regen (GATED, pending) ⏳

After step 2, remove the keep-list in openapi/generate-schema.sh and regenerate cleanly so the deprecated endpoints (and the rest of the deprecated workflow-results tree) fall out. Before that regen: audit that no high-level wrapper references any endpoint the regen will strip; if one does, stop and escalate rather than re-adding a keep-list.

Verification (step 1)

  • uv run pyright src/rapidata/rapidata_client0 errors
  • uv run pytest136 passed, 4 failed — the 4 are pre-existing on main (audience cost-warning / explicit-content tests), unrelated.
  • get_results() (download-results) unaffected.
  • No docs referenced the removed order features.

🔗 Session: https://poseidon.rapidata.internal/chat/node-f6b42c70

Remove RapidataOrder's use of the deprecated GET /pipeline/{pipelineId} and
GET /workflow/{workflowId}/progress endpoints, plus the preliminary-download
path, since the order flow is deprecated (order creation is already superseded
by Jobs) and these endpoints are being removed from the SDK.

Removed:
- display_progress_bar() — relied on the deprecated workflow-progress endpoint.
- preview() — resolved the campaign id by unpacking the pipeline.
- get_results(preliminary_results=...) — the preliminary path used the
  pipeline preliminary-download endpoints; get_results() now always returns
  the final results via download-results (unchanged, non-deprecated).
- the order-creation campaign-preview QR (unpacked the pipeline).
- the now-dead pipeline/workflow-unpacking helpers and _retry_operation.

BREAKING CHANGE: RapidataOrder.display_progress_bar(), RapidataOrder.preview(),
and the preliminary_results argument of RapidataOrder.get_results() are removed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: jorge <24812622+jorgeparavicini@users.noreply.github.com>
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