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

Update script supports java.lang.String.sha1() and java.lang.String.sha256() methods #16923

Merged
merged 3 commits into from
Jan 2, 2025

Conversation

gaobinlong
Copy link
Collaborator

@gaobinlong gaobinlong commented Dec 31, 2024

Description

For now we have augmentation methods sha1 and sha256 for strings in painless script:


, but it can only be used in ingest context for use in ingest pipeline, we can expand the scope to the update context so that these methods can be used in operations like update document, reindex and update_by_query.

Related Issues

#16423

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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.

Copy link
Contributor

✅ Gradle check result for 1b0dd95: SUCCESS

Copy link

codecov bot commented Dec 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.21%. Comparing base (7ae66d0) to head (c016747).
Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #16923      +/-   ##
============================================
- Coverage     72.28%   72.21%   -0.07%     
+ Complexity    65238    65224      -14     
============================================
  Files          5297     5299       +2     
  Lines        303351   303475     +124     
  Branches      43918    43925       +7     
============================================
- Hits         219279   219159     -120     
- Misses        66120    66351     +231     
- Partials      17952    17965      +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

CHANGELOG.md Outdated Show resolved Hide resolved
@reta reta added v3.0.0 Issues and PRs related to version 3.0.0 v2.19.0 Issues and PRs related to version 2.19.0 labels Dec 31, 2024
Signed-off-by: Gao Binlong <[email protected]>
Signed-off-by: Gao Binlong <[email protected]>
Copy link
Contributor

github-actions bot commented Jan 2, 2025

❌ Gradle check result for c016747: 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?

Copy link
Contributor

github-actions bot commented Jan 2, 2025

❌ Gradle check result for c016747: 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?

Copy link
Contributor

github-actions bot commented Jan 2, 2025

❌ Gradle check result for c016747: 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?

Copy link
Contributor

github-actions bot commented Jan 2, 2025

✅ Gradle check result for c016747: SUCCESS

@reta reta merged commit ab546ae into opensearch-project:main Jan 2, 2025
37 of 39 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 2, 2025
…ha256() methods (#16923)

* Update script supports java.lang.String.sha1() and java.lang.String.sha256() methods

Signed-off-by: Gao Binlong <[email protected]>

* Modify change log

Signed-off-by: Gao Binlong <[email protected]>

---------

Signed-off-by: Gao Binlong <[email protected]>
(cherry picked from commit ab546ae)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
reta added a commit that referenced this pull request Jan 2, 2025
…a.lang.String.sha256() methods (#16931)

* Update script supports java.lang.String.sha1() and java.lang.String.sha256() methods (#16923)

* Update script supports java.lang.String.sha1() and java.lang.String.sha256() methods

Signed-off-by: Gao Binlong <[email protected]>

* Modify change log

Signed-off-by: Gao Binlong <[email protected]>

---------

Signed-off-by: Gao Binlong <[email protected]>
(cherry picked from commit ab546ae)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Update PainlessPlugin.java (use Whitelist instead of AllowList)

Signed-off-by: Andriy Redko <[email protected]>

* Update PainlessPlugin.java

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]>
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 v2.19.0 Issues and PRs related to version 2.19.0 v3.0.0 Issues and PRs related to version 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants