Skip to content

Conversation

@Mesh-ach
Copy link
Collaborator

@Mesh-ach Mesh-ach commented Oct 23, 2025

changes

  • Add POST /{inst_id}/models/{model_name}/backfill-model-runs to fetch latest UC model version and update jobs with missing fields.

context

  • Endpoint backfills from latest registered model to restore auditability.

questions

No questions at this time.

@Mesh-ach Mesh-ach marked this pull request as ready for review October 23, 2025 21:32
Copy link
Contributor

@vishpillai123 vishpillai123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work!

from datetime import datetime
from typing import Annotated, Any, cast
import jsonpickle
from fastapi import APIRouter, Depends, HTTPException, status
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow this Depends logic is cool

current_user: Annotated[BaseUser, Depends(get_current_active_user)],
sql_session: Annotated[Session, Depends(get_session)],
databricks_control: Annotated[DatabricksControl, Depends(DatabricksControl)],
) -> Any:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we just add some quick documentation here saying that this will backfill the LATEST model run ID, and to use this endpoint carefully in the future? Maybe we should delete this later.. we'll figure it out.

mv_version = str(latest_mv.version)
mv_run_id = str(latest_mv.run_id)

# UPDATE existing jobs for this model (only those missing values)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah so this only updates if it's missing? I like that... it'll prevent someone from messing up the table in the future.

@Mesh-ach Mesh-ach merged commit 03f0275 into develop Oct 23, 2025
5 checks passed
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