DOM-75929 add job auth to the model register endpoint#60
Merged
Conversation
…auth, fix tests, refactor other calls to getjobor404 to not add username arg, which was not used
niole
commented
Apr 10, 2026
| job = await crud.get_job(db, request.job_id) | ||
| if not job: | ||
| raise HTTPException(status_code=404, detail=f"Job not found: {request.job_id}") | ||
| job = await get_job_or_404(db, request.job_id) |
Collaborator
Author
There was a problem hiding this comment.
This was the missing piece to make sure all entities are retrieved only if authorized
niole
commented
Apr 10, 2026
| """Create a Domino Model API from a job's registered model.""" | ||
| async with get_db_session() as db: | ||
| job = await crud.get_job(db, job_id) | ||
| job = await get_job_or_404(db, job_id) |
Collaborator
Author
There was a problem hiding this comment.
This was also the only thing that needed to be updated to make sure everything is authorized in the deploy model from job endpoint
niole
commented
Apr 10, 2026
| tracking_uri = str(tmp_path / "mlruns") | ||
|
|
||
| # Use an isolated local MLflow file store instead of any ambient tracking config. | ||
| mlflow.set_tracking_uri(tracking_uri) |
Collaborator
Author
There was a problem hiding this comment.
I set this here to point to a local directory, because an API request sent in my local environment by this test was being sent to a remote Domino and making the test fail
ddl-ryan-connor
approved these changes
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JIRA https://dominodatalab.atlassian.net/browse/DOM-75929
This finishes the auth implementation for the register model and deploy model api actions in the Deployments tab in the Job Results view