Skip to content

Conversation

@xuezhou25
Copy link
Contributor

Signed-off-by: Xue Zhou [email protected]

Description

Backport #4669

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

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.

@xuezhou25 xuezhou25 requested review from a team and reta as code owners October 7, 2022 17:30
@github-actions
Copy link
Contributor

github-actions bot commented Oct 7, 2022

Gradle Check (Jenkins) Run Completed with:

CHANGELOG.md Outdated
- Fixed the SnapshotsInProgress error during index deletion ([#4570](https://github.com/opensearch-project/OpenSearch/pull/4570))
- [Bug]: Fixed invalid location of JDK dependency for arm64 architecture([#4613](https://github.com/opensearch-project/OpenSearch/pull/4613))
- [Bug]: Alias filter lost after rollover ([#4499](https://github.com/opensearch-project/OpenSearch/pull/4499))
- Fixed misunderstanding message "No OpenSearchException found" when detailed_error disabled ([#4669](https://github.com/opensearch-project/OpenSearch/pull/4669))
Copy link
Member

@dreamer-89 dreamer-89 Oct 7, 2022

Choose a reason for hiding this comment

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

Thanks @xuezhou25 for the fix.

  1. Please change PR number 4669 -> 4708
  2. We can update the wording to make it more clear.

@tlfeng tlfeng added enhancement Enhancement or improvement to existing feature or request backport PRs or issues specific to backporting features or enhancments v2.4.0 'Issues and PRs related to version v2.4.0' labels Oct 7, 2022
@dreamer-89
Copy link
Member

The PR is failing because of recent version bump in 1.x from 1.3.6 -> 1.3.7 as part of #4701. We need to update the same in 2.x. Once that PR is merged to 2.x, you need to rebase against

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':distribution:bwc:maintenance:buildBwcLinuxTar'.
> Building 1.3.6 didn't generate expected file /var/jenkins/workspace/gradle-check/search/distribution/bwc/maintenance/build/bwc/checkout-1.3/distribution/archives/linux-tar/build/distributions/opensearch-min-1.3.6-SNAPSHOT-linux-x64.tar.gz

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.

@tlfeng tlfeng mentioned this pull request Oct 7, 2022
6 tasks
@dreamer-89
Copy link
Member

@xuezhou25 : Can you please rebase against latest 2.x branch ? It should fix the bwc test failures.

nknize
nknize previously requested changes Oct 7, 2022
t = t.getCause();
}
builder.field(ERROR, message);
builder.field(ERROR, ExceptionsHelper.summaryMessage(t));
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
builder.field(ERROR, ExceptionsHelper.summaryMessage(t));
builder.field(ERROR, ExceptionsHelper.summaryMessage(e));

t is null, which results in a more confusing Internal error exception even when a useful IllegalArgumentException is thrown. e should be passed to summaryMessage so a more useful message is thrown. This already resulted in a reproducible test failure which was fixed in #4702.

Copy link
Contributor

Choose a reason for hiding this comment

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

@nknize I think the logic behind this code is to find the OpenSearchException down the cause chain (which is t). May be in this case we should do:

builder.field(ERROR, ExceptionsHelper.summaryMessage(t != null ? t : e));

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for reviewing. I will do this fix

Copy link
Contributor

@tlfeng tlfeng Nov 4, 2022

Choose a reason for hiding this comment

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

I agree with the suggested change from @reta . The original logic is to find the OpenSearchException down the cause chain, and show its error message.
Looks like if the code is changed to t != null ? t : e here in 2.x branch, then the corresponding change also need to be applied in main branch.

builder.field(ERROR, ExceptionsHelper.summaryMessage(e));

Copy link
Member

Choose a reason for hiding this comment

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

The ExceptionsHelper.summaryMessage(e) version is what exists on main currently. We should probably keep them consistent and then follow up with a change on main to do the ExceptionsHelper.summaryMessage(t != null ? t : e) version (and then backport that PR as well).

Copy link
Contributor

Choose a reason for hiding this comment

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

@andrross Make sense, thank you! 😄

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@andrross
Copy link
Member

andrross commented Nov 2, 2022

@xuezhou25 Can you rebase and fix changelog conflicts?

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2022

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2022

Gradle Check (Jenkins) Run Completed with:

@tlfeng tlfeng added the backport 2.4 Backport to 2.4 branch label Nov 4, 2022
@tlfeng tlfeng dismissed dreamer-89’s stale review November 4, 2022 04:05

The comment of changelog has been resolved.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2022

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2022

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2022

Gradle Check (Jenkins) Run Completed with:

@tlfeng tlfeng dismissed nknize’s stale review November 4, 2022 05:40

The suggested change about ExceptionsHelper.summaryMessage(e) has been applied.

@tlfeng tlfeng added backport 2.4 Backport to 2.4 branch and removed backport 2.4 Backport to 2.4 branch labels Nov 4, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2022

Gradle Check (Jenkins) Run Completed with:

@codecov-commenter
Copy link

Codecov Report

Merging #4708 (626d22c) into 2.x (12d9175) will decrease coverage by 0.12%.
The diff coverage is 62.60%.

@@             Coverage Diff              @@
##                2.x    #4708      +/-   ##
============================================
- Coverage     70.78%   70.65%   -0.13%     
- Complexity    57706    58244     +538     
============================================
  Files          4620     4695      +75     
  Lines        276221   278823    +2602     
  Branches      40422    40726     +304     
============================================
+ Hits         195511   197012    +1501     
- Misses        64391    65336     +945     
- Partials      16319    16475     +156     
Impacted Files Coverage Δ
...a/org/opensearch/gradle/test/DistroTestPlugin.java 0.00% <ø> (ø)
.../java/org/opensearch/painless/ScriptClassInfo.java 83.01% <0.00%> (ø)
.../delete/DeleteDecommissionStateRequestBuilder.java 0.00% <0.00%> (ø)
...reness/get/GetDecommissionStateRequestBuilder.java 0.00% <0.00%> (ø)
...sion/awareness/put/DecommissionRequestBuilder.java 0.00% <0.00%> (ø)
...te/ClusterDeleteWeightedRoutingRequestBuilder.java 0.00% <0.00%> (ø)
...eighted/put/ClusterPutWeightedRoutingResponse.java 0.00% <0.00%> (ø)
...min/cluster/stats/TransportClusterStatsAction.java 70.83% <ø> (ø)
.../org/opensearch/client/support/AbstractClient.java 32.54% <0.00%> (-2.22%) ⬇️
...rg/opensearch/common/settings/ClusterSettings.java 91.89% <ø> (ø)
... and 592 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@xuezhou25 xuezhou25 merged commit 802e693 into opensearch-project:2.x Nov 4, 2022
opensearch-trigger-bot bot pushed a commit that referenced this pull request Nov 4, 2022
…on found' when detailed_error disabled (#4708)

* Fixed misunderstanding message 'No OpenSearchException found' when detailed_error disabled

Signed-off-by: Xue Zhou <[email protected]>
(cherry picked from commit 802e693)
andrross pushed a commit that referenced this pull request Nov 4, 2022
…on found' when detailed_error disabled (#4708) (#5073)

* Fixed misunderstanding message 'No OpenSearchException found' when detailed_error disabled

Signed-off-by: Xue Zhou <[email protected]>
(cherry picked from commit 802e693)

Co-authored-by: Xue Zhou <[email protected]>
@xuezhou25 xuezhou25 deleted the 2.x_fix_detailed_error_message_showing branch November 12, 2022 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport PRs or issues specific to backporting features or enhancments backport 2.4 Backport to 2.4 branch enhancement Enhancement or improvement to existing feature or request v2.4.0 'Issues and PRs related to version v2.4.0'

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants