Skip to content
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

Remove error path for ancient compression detection #7932

Merged

Conversation

andrross
Copy link
Member

@andrross andrross commented Jun 6, 2023

The error message generated by this code path refers to Elasticsearch version 2.0.0.beta1, which is likely to cause confusion with the OpenSearch 2.x line if it were ever to be encountered. The ES2 version is so old that I don't think we need any special handling here and can just fall back to the default "not xcontent" error message.

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.

The error message generated by this code path refers to Elasticsearch
version 2.0.0.beta1, which is likely to cause confusion with the
OpenSearch 2.x line if it were ever to be encountered. The ES2 version
is so old that I don't think we need any special handling here and can
just fall back to the default "not xcontent" error message.

Signed-off-by: Andrew Ross <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2023

Gradle Check (Jenkins) Run Completed with:

@codecov
Copy link

codecov bot commented Jun 6, 2023

Codecov Report

Merging #7932 (d75ba0e) into main (d55813e) will decrease coverage by 0.09%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##               main    #7932      +/-   ##
============================================
- Coverage     70.87%   70.79%   -0.09%     
+ Complexity    56326    56270      -56     
============================================
  Files          4691     4691              
  Lines        266388   266384       -4     
  Branches      39090    39089       -1     
============================================
- Hits         188813   188586     -227     
- Misses        61566    61873     +307     
+ Partials      16009    15925      -84     
Impacted Files Coverage Δ
.../opensearch/common/compress/CompressorFactory.java 66.66% <100.00%> (+14.66%) ⬆️

... and 495 files with indirect coverage changes

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

Is this code path tested at all? :)

@dblock dblock merged commit 4592d7c into opensearch-project:main Jun 6, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 6, 2023
The error message generated by this code path refers to Elasticsearch
version 2.0.0.beta1, which is likely to cause confusion with the
OpenSearch 2.x line if it were ever to be encountered. The ES2 version
is so old that I don't think we need any special handling here and can
just fall back to the default "not xcontent" error message.

Signed-off-by: Andrew Ross <[email protected]>
(cherry picked from commit 4592d7c)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@andrross andrross deleted the compressor-factory-cleanup branch June 6, 2023 19:55
andrross pushed a commit that referenced this pull request Jun 6, 2023
The error message generated by this code path refers to Elasticsearch
version 2.0.0.beta1, which is likely to cause confusion with the
OpenSearch 2.x line if it were ever to be encountered. The ES2 version
is so old that I don't think we need any special handling here and can
just fall back to the default "not xcontent" error message.

Signed-off-by: Andrew Ross <[email protected]>
(cherry picked from commit 4592d7c)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@andrross
Copy link
Member Author

andrross commented Jun 7, 2023

Is this code path tested at all? :)

@dblock It appears not! I didn't find any unit tests and was actually curious whether anything in gradle check would fail. Interestingly, codecov claims that this change "decreases coverage by 0.09%" which is odd given that it just removes untested code. I'm still trying to figure out how that is possible...

andrross pushed a commit that referenced this pull request Jun 7, 2023
The error message generated by this code path refers to Elasticsearch
version 2.0.0.beta1, which is likely to cause confusion with the
OpenSearch 2.x line if it were ever to be encountered. The ES2 version
is so old that I don't think we need any special handling here and can
just fall back to the default "not xcontent" error message.


(cherry picked from commit 4592d7c)

Signed-off-by: Andrew Ross <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@dblock
Copy link
Member

dblock commented Jun 7, 2023

@andrross it's written in JavaScript? ;)

sandeshkr419 pushed a commit to sandeshkr419/OpenSearch that referenced this pull request Jun 8, 2023
…ct#7932)

The error message generated by this code path refers to Elasticsearch
version 2.0.0.beta1, which is likely to cause confusion with the
OpenSearch 2.x line if it were ever to be encountered. The ES2 version
is so old that I don't think we need any special handling here and can
just fall back to the default "not xcontent" error message.

Signed-off-by: Andrew Ross <[email protected]>
gaiksaya pushed a commit to gaiksaya/OpenSearch that referenced this pull request Jun 26, 2023
…ct#7932) (opensearch-project#7939)

The error message generated by this code path refers to Elasticsearch
version 2.0.0.beta1, which is likely to cause confusion with the
OpenSearch 2.x line if it were ever to be encountered. The ES2 version
is so old that I don't think we need any special handling here and can
just fall back to the default "not xcontent" error message.


(cherry picked from commit 4592d7c)

Signed-off-by: Andrew Ross <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…ct#7932)

The error message generated by this code path refers to Elasticsearch
version 2.0.0.beta1, which is likely to cause confusion with the
OpenSearch 2.x line if it were ever to be encountered. The ES2 version
is so old that I don't think we need any special handling here and can
just fall back to the default "not xcontent" error message.

Signed-off-by: Andrew Ross <[email protected]>
Signed-off-by: Shivansh Arora <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants