namest504 opened a new pull request, #8737:
URL: https://github.com/apache/gravitino/pull/8737
<!--
1. Title: [#<issue>] <type>(<scope>): <subject>
Examples:
- "[#123] feat(operator): support xxx"
- "[#233] fix: check null before access result in xxx"
- "[MINOR] refactor: fix typo in variable name"
- "[MINOR] docs: fix typo in README"
- "[#255] test: fix flaky test NameOfTheTest"
Reference: https://www.conventionalcommits.org/en/v1.0.0/
2. If the PR is unfinished, please mark this PR as draft.
-->
### What changes were proposed in this pull request?
- Added validation for alias and version presence in
UpdateModelVersionComment, UpdateModelVersionUri, and UpdateModelVersionAliases
classes.
- Implemented comprehensive unit tests for validate() and handle() methods,
mocking GravitinoClient, Catalog, and ModelCatalog dependencies.
- Tests cover error scenarios when both alias and version are set or both
missing, and normal execution paths.
- verify internal method calls and printInformation output messages.
### Why are the changes needed?
The changes address issue #8727 to improve validation and increase test
coverage for core model version command classes. This enhances robustness and
reliability in command execution by preventing invalid input parameters and
ensuring internal client interactions behave as expected.
Fix: #8727
### Does this PR introduce _any_ user-facing change?
No direct API changes but improves command input validation behavior and
error reporting.
### How was this patch tested?
Added unit tests for all affected classes; all tests pass locally in the CI
environment.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]