Skip to content

DOM-79862: Clarify commit_id vs main_repo_git_ref for git-based projects - #280

Merged
ddl-rodrigo-fernandez merged 3 commits into
masterfrom
DOM-79862-clarify-main-repo-git-ref-commit-id
Aug 19, 2026
Merged

ddl-rodrigo-fernandez merged 3 commits into
masterfrom
DOM-79862-clarify-main-repo-git-ref-commit-id

Conversation

@ddl-rodrigo-fernandez

Copy link
Copy Markdown
Contributor

Link to JIRA

DOM-79862

What issue does this pull request solve?

job_start(commit_id=<sha>) fails 100% of the time on git-based projects (GBP), because commit_id only ever pins the project's internal DFS commit history — never a commit on the main git repository. The backend already has a companion PR (domino#48228) that rejects this combination up front with a clear error instead of failing deep inside the job pod. On the python-domino side, the actual correct mechanism — main_repo_git_ref={"type": "commitId", "value": <sha>} — already exists and already works (it's just an existing job_start parameter), but this wasn't documented: the docstring only listed "branches"/"tags" as supported main_repo_git_ref types, and nothing on commit_id warned it doesn't apply to GBP main repos. So there was no way for a user to discover the correct way to pin a GBP commit from the SDK docs alone.

What is the solution?

Docs-only change, no behavior change:

  • commit_id docstring now states it targets the internal DFS commit only, and won't work for pinning a GBP main-repo commit.
  • main_repo_git_ref docstring now documents "commitId" as a supported type alongside "branches"/"tags", since the API already accepts it.
  • Added a CHANGELOG entry under [Unreleased] > Changed.

Testing

Added test_job_start_main_repo_git_ref_supports_commit_id_type to tests/test_jobs.py, confirming a main_repo_git_ref={"type": "commitId", ...} payload is passed through as-is and that commitId stays None in the request body (i.e. the two fields are independent). Ran the full test_jobs.py suite locally (27 passed, 6 skipped — the skips require a live Domino deployment) to confirm no regressions.

  • Unit test(s)

Pull Request Reminders

  • Has the changelog been updated
  • Has relevant documentation been updated?
  • Does the code follow Python Style Guide
  • Are the existing unit tests still passing?
  • Have new unit tests been added to cover any changes to the code?
  • Has the JIRA ticket(s) been linked above?

References (optional)

ddl-rodrigo-fernandez and others added 2 commits August 19, 2026 14:13
commit_id only pins the project's internal DFS commit and cannot pin a
commit on a git-based project's main repository; main_repo_git_ref
already supports type "commitId" for that, it just wasn't documented.
No behavior change. See DOM-79862.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Same clarification as the job_start docstring update, applied to
README.md and README.adoc so Mintlify's public docs stay in sync.
DOM-79862.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Comment thread domino/domino.py Outdated
from latest commit.
NOTE: for git-based projects, this pins the project's internal
DFS commit, NOT a commit on the main git repository. Passing a
commit SHA from the main repository here will fail. To pin a

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.

nit-ish correction: commit_id does not always "fail" on GBP, a valid DFS SHAs should still work on GBP

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.

Good catch, fixed — reworded to make clear commit_id always targets the DFS commit regardless of project type, and that a valid DFS SHA still works on a GBP project. Only a main-repo SHA (which isn't a DFS commit) fails.

commit_id doesn't unconditionally fail on git-based projects -- a
valid DFS commit SHA still works there too. It only fails when the
SHA isn't a valid DFS commit (e.g. a main-repo SHA). DOM-79862.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ddl-rodrigo-fernandez
ddl-rodrigo-fernandez merged commit c36d3ca into master Aug 19, 2026
5 checks passed
@mintlify

mintlify Bot commented Aug 19, 2026

Copy link
Copy Markdown

Docs PR opened: https://github.com/cerebrotech/documentation/pull/4678

Updated the python-domino SDK README snippet to clarify that commit_id pins the internal DFS commit only and main_repo_git_ref supports commitId.

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.

3 participants