Skip to content

Accept ALREADY_EXISTS error code alongside RESOURCE_ALREADY_EXISTS#242

Open
daniellok-db wants to merge 1 commit into
mlflow:masterfrom
daniellok-db:fix-error-code
Open

Accept ALREADY_EXISTS error code alongside RESOURCE_ALREADY_EXISTS#242
daniellok-db wants to merge 1 commit into
mlflow:masterfrom
daniellok-db:fix-error-code

Conversation

@daniellok-db

Copy link
Copy Markdown

Summary

  • Some MLflow / Databricks backends raise ALREADY_EXISTS where the existing code expected only RESOURCE_ALREADY_EXISTS, causing benign "resource already exists" branches to bubble up as errors.
  • Updated four strict error_code checks (common/model_utils.py, common/mlflow_utils.py, two in copy/copy_utils.py) to accept either code.
  • Updated two substring-based checks (prompt/import_prompt.py, evaluation_dataset/import_evaluation_dataset.py) to match "ALREADY_EXISTS", which subsumes the longer literal.

Test plan

  • Run existing copy / import tests against a backend that returns RESOURCE_ALREADY_EXISTS to confirm no regression.
  • Run against a backend that returns ALREADY_EXISTS to confirm the "already exists" branch is taken instead of raising.

This pull request and its description were written by Isaac.

Some MLflow / Databricks backends raise ALREADY_EXISTS where the code
previously expected only RESOURCE_ALREADY_EXISTS, causing benign
"resource exists" branches to bubble up as errors.

Co-authored-by: Isaac

@B-Step62 B-Step62 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

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