You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "KyleLin0927 (via GitHub)" <gi...@apache.org> on 2025/06/05 13:48:17 UTC
[PR] fix(catalogs): modify the error message [gravitino]
KyleLin0927 opened a new pull request, #7347:
URL: https://github.com/apache/gravitino/pull/7347
### What changes were proposed in this pull request?
updates the error message in `catalogs/catalog-model/src/main/java/org/apache/gravitino/catalog/model/ModelCatalogOperations.java` to correctly display.
### Why are the changes needed?
Fixes #7346
### Does this PR introduce any user-facing change?
No.
### How was this patch tested?
- Ran `./gradlew clean build`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(catalogs): modify the error message [gravitino]
Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 commented on code in PR #7347:
URL: https://github.com/apache/gravitino/pull/7347#discussion_r2128911925
##########
catalogs/catalog-model/src/main/java/org/apache/gravitino/catalog/model/ModelCatalogOperations.java:
##########
@@ -242,8 +242,7 @@ public void linkModelVersion(
} catch (IOException e) {
throw new RuntimeException("Failed to link model version " + ident, e);
} catch (EntityAlreadyExistsException e) {
- throw new ModelVersionAliasesAlreadyExistException(
- e, "Model version aliases %s already exist", ident);
+ throw new ModelVersionAliasesAlreadyExistException(e, "Model version alias already exists");
Review Comment:
I think you may need to record both the model and its alias at the same time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(catalogs): modify the error message [gravitino]
Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 commented on code in PR #7347:
URL: https://github.com/apache/gravitino/pull/7347#discussion_r2135707892
##########
catalogs/catalog-model/src/main/java/org/apache/gravitino/catalog/model/ModelCatalogOperations.java:
##########
@@ -242,8 +242,7 @@ public void linkModelVersion(
} catch (IOException e) {
throw new RuntimeException("Failed to link model version " + ident, e);
} catch (EntityAlreadyExistsException e) {
- throw new ModelVersionAliasesAlreadyExistException(
- e, "Model version aliases %s already exist", ident);
+ throw new ModelVersionAliasesAlreadyExistException(e, "Model version alias already exists");
Review Comment:
It's also LGTM.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [#7346] fix(catalogs): modify the error message in model catalog [gravitino]
Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 merged PR #7347:
URL: https://github.com/apache/gravitino/pull/7347
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(catalogs): modify the error message [gravitino]
Posted by "KyleLin0927 (via GitHub)" <gi...@apache.org>.
KyleLin0927 commented on code in PR #7347:
URL: https://github.com/apache/gravitino/pull/7347#discussion_r2133675831
##########
catalogs/catalog-model/src/main/java/org/apache/gravitino/catalog/model/ModelCatalogOperations.java:
##########
@@ -242,8 +242,7 @@ public void linkModelVersion(
} catch (IOException e) {
throw new RuntimeException("Failed to link model version " + ident, e);
} catch (EntityAlreadyExistsException e) {
- throw new ModelVersionAliasesAlreadyExistException(
- e, "Model version aliases %s already exist", ident);
+ throw new ModelVersionAliasesAlreadyExistException(e, "Model version alias already exists");
Review Comment:
thanks for suggest. I initially used `modelVersion.aliases()` to show all aliases in the error message, but it listed all added aliases, not just the duplicate one.
I suggest simplifying the message to: `Model version alias already exists in model %s`. This keeps message clear without giving misleading details.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(catalogs): modify the error message [gravitino]
Posted by "KyleLin0927 (via GitHub)" <gi...@apache.org>.
KyleLin0927 commented on code in PR #7347:
URL: https://github.com/apache/gravitino/pull/7347#discussion_r2135991809
##########
catalogs/catalog-model/src/main/java/org/apache/gravitino/catalog/model/ModelCatalogOperations.java:
##########
@@ -242,8 +242,7 @@ public void linkModelVersion(
} catch (IOException e) {
throw new RuntimeException("Failed to link model version " + ident, e);
} catch (EntityAlreadyExistsException e) {
- throw new ModelVersionAliasesAlreadyExistException(
- e, "Model version aliases %s already exist", ident);
+ throw new ModelVersionAliasesAlreadyExistException(e, "Model version alias already exists");
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org