Skip to content

[CMPT-7182] feat(pipeline): add --python-version to image create/update; deprecate --base-image - #744

Open
sunny2get wants to merge 4 commits into
datarobot-oss:mainfrom
sunny2get:CMPT-7182-pipeline-image-python-version
Open

[CMPT-7182] feat(pipeline): add --python-version to image create/update; deprecate --base-image#744
sunny2get wants to merge 4 commits into
datarobot-oss:mainfrom
sunny2get:CMPT-7182-pipeline-image-python-version

Conversation

@sunny2get

@sunny2get sunny2get commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Mirrors the pipelines-api change (datarobot/pipelines-api#246): pythonVersion is now the canonical way to select a pipeline image's Python interpreter, and pythonBaseImage is deprecated.

Changes

  • dr pipeline image create / update: new --python-version flag (e.g. 3.11; allowed 3.103.13), threaded into CreateImage/UpdateImage and the request bodies as pythonVersion.
  • --base-image marked DEPRECATED in help text. Server-side a bare major.minor value folds into pythonVersion; a full image reference is accepted but ignored at build time (it would bypass the FIPS base). The flag still works for back-compat; examples no longer advertise python:3.12.
  • internal/pipeline/image.go: PythonVersion added to ImageDefinition + create/update request structs.
  • Output: python_version in --output-format json; a PYTHON column in the human table.

Testing

go build ./... and go test ./internal/pipeline/... ./cmd/pipeline/image/... pass.

Draft pending the pipelines-api PR (#246) merging + the version endpoint being available in the target environment.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XpPjzRu2VLgbbKd9WJ9sML


Note

Medium Risk
Changes the image create/update API payload and CLI flags users rely on for execution environments; backward-compat aliases limit breakage but behavior depends on the paired pipelines-api release.

Overview
Aligns dr pipeline image create and update with pipelines-api: --python-version is the canonical way to pick the Python interpreter (sent as pythonVersion); --base-image is deprecated in help (bare major.minor still forwarded; full image refs are API-defined as ignored at build time).

GPU naming: requests use gpu on the wire instead of nvidia. The CLI adds --gpu and keeps --nvidia as a deprecated alias (gpu || nvidia). JSON output exposes python_version and gpu; the human version table gains a PYTHON column.

CreateImage / UpdateImage signatures and structs in internal/pipeline/image.go were extended accordingly; tests and docs were updated to match.

Reviewed by Cursor Bugbot for commit 47a59b9. Configure here.

…te; deprecate --base-image

Mirror the pipelines-api change (PR datarobot-oss#246): pythonVersion is now the canonical
way to pick a pipeline image's interpreter, and pythonBaseImage is deprecated.

- create/update: new --python-version flag (e.g. 3.11; allowed 3.10-3.13),
  threaded into CreateImage/UpdateImage and the request bodies (pythonVersion).
- --base-image is marked DEPRECATED in help: a bare version folds into
  pythonVersion server-side; a full image ref is ignored at build time. Flag
  still accepted for back-compat; examples no longer advertise python:3.12.
- image.go: PythonVersion added to ImageDefinition + create/update request
  structs. Output: python_version in JSON, a PYTHON column in the human table.

go build + go test ./internal/pipeline/... ./cmd/pipeline/image/... pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XpPjzRu2VLgbbKd9WJ9sML
@datarobot-pr-review-router

Copy link
Copy Markdown

🎫 Jira: CMPT-7182 — Add CLI/SDK support for new backend API changes

sunny2get and others added 3 commits August 6, 2026 10:20
…/update

Mirrors the pipelines-api rename of the image-definition ``nvidia`` field to
the vendor-neutral ``gpu``. Adds a canonical ``--gpu`` flag and keeps
``--nvidia`` as a deprecated hidden alias (cobra MarkDeprecated) so existing
scripts keep working. Request/response structs and JSON output now use the
``gpu`` wire key; the API canonicalises on ``gpu`` and still accepts the
``nvidia`` alias.

Note: ``gpu: true`` is rejected with 422 by environments without GPU capacity
(the new ``gpu_enabled`` server flag).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XpPjzRu2VLgbbKd9WJ9sML
…ommands

Doc-sync for the --nvidia → --gpu rename: the pipeline image command reference
now shows the canonical --gpu flag with --nvidia noted as a deprecated alias,
and "NVIDIA GPU support" prose reads "GPU support".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XpPjzRu2VLgbbKd9WJ9sML
…clop

printImageVersionsHuman was at cyclomatic complexity 12 (max 10) after the
PYTHON column was added. Extract the per-version cell formatting into
imageVersionRow, dropping the function well under budget. Behaviour-preserving;
GPU stays JSON-only (it never had a human-table column, same as nvidia before).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XpPjzRu2VLgbbKd9WJ9sML
@sunny2get
sunny2get marked this pull request as ready for review August 6, 2026 18:57
@sunny2get
sunny2get requested a review from a team as a code owner August 6, 2026 18:57
@sunny2get

Copy link
Copy Markdown
Contributor Author

/approve-smoke-tests

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.

1 participant