-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix get index settings API doesn't show number_of_routing_shards when it was explicitly set on index creation #16294
Conversation
… it was explicitly set on index creation Signed-off-by: Gao Binlong <[email protected]>
@r1walz @Bukhtawar could you help to review this PR? Thanks! |
❌ Gradle check result for 7eaef9c: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
...c/src/main/resources/rest-api-spec/test/indices.get_settings/40_number_of_routing_shards.yml
Show resolved
Hide resolved
Signed-off-by: Gao Binlong <[email protected]>
❌ Gradle check result for 0f6f4e5: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Gao Binlong <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #16294 +/- ##
============================================
- Coverage 72.03% 71.98% -0.05%
- Complexity 64782 64810 +28
============================================
Files 5307 5307
Lines 302545 302542 -3
Branches 43703 43703
============================================
- Hits 217925 217778 -147
- Misses 66712 66914 +202
+ Partials 17908 17850 -58 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Gao Binlong <[email protected]>
@reta, could you help to take a second look at this PR? Thanks! This change doesn't target for 2.18.0. |
… it was explicitly set on index creation (#16294) * Fix get index settings API doesn't show number_of_routing_shards when it was explicitly set on index creation Signed-off-by: Gao Binlong <[email protected]> * Update skip version in rest yaml test file Signed-off-by: Gao Binlong <[email protected]> * Fix test failure Signed-off-by: Gao Binlong <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]> (cherry picked from commit 5941a7e) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…ing_shards when it was explicitly set on index creation (#16453) * Fix get index settings API doesn't show number_of_routing_shards when it was explicitly set on index creation (#16294) * Fix get index settings API doesn't show number_of_routing_shards when it was explicitly set on index creation Signed-off-by: Gao Binlong <[email protected]> * Update skip version in rest yaml test file Signed-off-by: Gao Binlong <[email protected]> * Fix test failure Signed-off-by: Gao Binlong <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]> (cherry picked from commit 5941a7e) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Update 40_number_of_routing_shards.yml Signed-off-by: Andriy Redko <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Signed-off-by: Andriy Redko <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Andriy Redko <[email protected]>
I think this caused a YAML REST test in the python client to begin failing. I don't quite understand what those tests do, but what I know is that they fetch the YAML REST test list from |
Sure, I'll take a look, how do I check the test failure? Is there any logs? @dblock |
There's a failed job in https://github.com/opensearch-project/opensearch-py/actions/runs/11502167192/job/32016500189
|
@dblock The failure is caused by this line which assert that the key exists in the map, but the failed test case just tests that the key doesn't exists(if Line 39 in 08dc3bb
, so how about remove the assertion here and set value to None if the key doesn't exist?
|
Description
If the index level setting
index.number_of_routing_shards
is set explicitly at the index creation time, we don't show the setting in the response of get settings API, and we can only get the value byGET _cluster/state
, this PR makes that setting shown in the response of the get settings API when it's explicitly set.Related Issues
#14199
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.