Skip to content

Conversation

fivedragon5
Copy link
Contributor

What changes were proposed in this pull request?

Update the error message in Preconditions.checkState to match the validation logic.
This change ensures that the error message accurately reflects the status being checked by the code.

Why are the changes needed?

Previously, the validation logic allowed values greater than or equal to -1, but the error message stated that only values greater than -1 were acceptable. This could mislead users or developers.

Fix: #7521

Does this PR introduce any user-facing change?

No

How was this patch tested?

Local verification.

@fivedragon5
Copy link
Contributor Author

Hi, @justinmclean
PR is ready for review. Please take a look when you have time.
Thanks!

@yuqi1129 yuqi1129 added the branch-0.9 Automatically cherry-pick commit to branch-0.9 label Jul 1, 2025
@yuqi1129 yuqi1129 merged commit ac7fa6c into apache:main Jul 1, 2025
30 checks passed
github-actions bot pushed a commit that referenced this pull request Jul 1, 2025
<!--
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?

Update the error message in Preconditions.checkState to match the
validation logic.
This change ensures that the error message accurately reflects the
status being checked by the code.

### Why are the changes needed?

Previously, the validation logic allowed values greater than or equal to
-1, but the error message stated that only values greater than -1 were
acceptable. This could mislead users or developers.

Fix: #7521 

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

Local verification.
@fivedragon5 fivedragon5 removed their assignment Jul 1, 2025
@fivedragon5 fivedragon5 deleted the fix-precondition-message-mismatch branch July 1, 2025 16:32
sdj3261 pushed a commit to sdj3261/gravitino that referenced this pull request Jul 7, 2025
…7525)

<!--
1. Title: [#<issue>] <type>(<scope>): <subject>
   Examples:
     - "[apache#123] feat(operator): support xxx"
     - "[apache#233] fix: check null before access result in xxx"
     - "[MINOR] refactor: fix typo in variable name"
     - "[MINOR] docs: fix typo in README"
     - "[apache#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?

Update the error message in Preconditions.checkState to match the
validation logic.
This change ensures that the error message accurately reflects the
status being checked by the code.

### Why are the changes needed?

Previously, the validation logic allowed values greater than or equal to
-1, but the error message stated that only values greater than -1 were
acceptable. This could mislead users or developers.

Fix: apache#7521 

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

Local verification.
jerryshao pushed a commit to jerryshao/gravitino that referenced this pull request Jul 8, 2025
…7525)

<!--
1. Title: [#<issue>] <type>(<scope>): <subject>
   Examples:
     - "[apache#123] feat(operator): support xxx"
     - "[apache#233] fix: check null before access result in xxx"
     - "[MINOR] refactor: fix typo in variable name"
     - "[MINOR] docs: fix typo in README"
     - "[apache#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?

Update the error message in Preconditions.checkState to match the
validation logic.
This change ensures that the error message accurately reflects the
status being checked by the code.

### Why are the changes needed?

Previously, the validation logic allowed values greater than or equal to
-1, but the error message stated that only values greater than -1 were
acceptable. This could mislead users or developers.

Fix: apache#7521 

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

Local verification.
vishnu-chalil pushed a commit to vishnu-chalil/gravitino that referenced this pull request Jul 14, 2025
…7525)

<!--
1. Title: [#<issue>] <type>(<scope>): <subject>
   Examples:
     - "[apache#123] feat(operator): support xxx"
     - "[apache#233] fix: check null before access result in xxx"
     - "[MINOR] refactor: fix typo in variable name"
     - "[MINOR] docs: fix typo in README"
     - "[apache#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?

Update the error message in Preconditions.checkState to match the
validation logic.
This change ensures that the error message accurately reflects the
status being checked by the code.

### Why are the changes needed?

Previously, the validation logic allowed values greater than or equal to
-1, but the error message stated that only values greater than -1 were
acceptable. This could mislead users or developers.

Fix: apache#7521 

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

Local verification.
hdygxsj pushed a commit to hdygxsj/gravitino that referenced this pull request Jul 15, 2025
…7525)

<!--
1. Title: [#<issue>] <type>(<scope>): <subject>
   Examples:
     - "[apache#123] feat(operator): support xxx"
     - "[apache#233] fix: check null before access result in xxx"
     - "[MINOR] refactor: fix typo in variable name"
     - "[MINOR] docs: fix typo in README"
     - "[apache#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?

Update the error message in Preconditions.checkState to match the
validation logic.
This change ensures that the error message accurately reflects the
status being checked by the code.

### Why are the changes needed?

Previously, the validation logic allowed values greater than or equal to
-1, but the error message stated that only values greater than -1 were
acceptable. This could mislead users or developers.

Fix: apache#7521 

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

Local verification.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch-0.9 Automatically cherry-pick commit to branch-0.9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Improvement] confusion with bucket numbers in DistributionDTO.java
2 participants