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

Refactoring globMatch using simpleMatchWithNormalizedStrings from Regex #13104

Merged
merged 4 commits into from
Apr 12, 2024

Conversation

niyatiagg
Copy link
Contributor

@niyatiagg niyatiagg commented Apr 5, 2024

Description

Changed globMatch from recursive to iterative implementation using the existing code in simpleMatchWithNormalizedStrings by @cwperks as part of #11060.

Related Issues

Resolves #12065

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)
    - [ ] Public documentation issue/PR created

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.

Signed-off-by: Niyati Aggarwal <niyatiagg4641@gmail.com>
Signed-off-by: Niyati Aggarwal <niyatiagg4641@gmail.com>
Copy link
Contributor

github-actions bot commented Apr 5, 2024

Compatibility status:

Checks if related components are compatible with change e9fd701

Incompatible components

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/flow-framework.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/performance-analyzer.git]

Copy link
Contributor

github-actions bot commented Apr 5, 2024

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

@cwperks
Copy link
Member

cwperks commented Apr 5, 2024

@niyatiagg There don't appear to be any tests for globMatch. wdyt about adding a test suite and adding some tests similar to how RegexTests tests the functionality for Regex.java

Copy link
Contributor

github-actions bot commented Apr 5, 2024

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

@niyatiagg
Copy link
Contributor Author

@niyatiagg There don't appear to be any tests for globMatch. wdyt about adding a test suite and adding some tests similar to how RegexTests tests the functionality for Regex.java

Okay, let me add some tests!

@niyatiagg
Copy link
Contributor Author

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

The failure is due to flaky test #12788

Signed-off-by: Niyati Aggarwal <niyatiagg4641@gmail.com>
Copy link
Contributor

github-actions bot commented Apr 5, 2024

❕ Gradle check result for ab6c653: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.indices.replication.SegmentReplicationIT.testReplicaAlreadyAtCheckpoint

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Copy link

codecov bot commented Apr 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.46%. Comparing base (b15cb0c) to head (e9fd701).
Report is 153 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #13104      +/-   ##
============================================
+ Coverage     71.42%   71.46%   +0.04%     
- Complexity    59978    60475     +497     
============================================
  Files          4985     5026      +41     
  Lines        282275   284509    +2234     
  Branches      40946    41205     +259     
============================================
+ Hits         201603   203323    +1720     
- Misses        63999    64404     +405     
- Partials      16673    16782     +109     

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

cwperks
cwperks previously approved these changes Apr 9, 2024
@cwperks cwperks dismissed their stale review April 9, 2024 01:53

Dismissing my review as I'm not a maintainer (yet), but its showing the green check mark for my review. This change looks good to me.

CHANGELOG.md Outdated Show resolved Hide resolved
Signed-off-by: Niyati Aggarwal <niyatiagg4641@gmail.com>
Copy link
Contributor

❕ Gradle check result for e9fd701: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.index.IndexServiceTests.testAsyncTranslogTrimTaskOnClosedIndex

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

@owaiskazi19
Copy link
Member

@cwperks good to merge?

Copy link
Collaborator

@jainankitk jainankitk left a comment

Choose a reason for hiding this comment

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

LGTM!

@owaiskazi19 owaiskazi19 added the backport 2.x Backport to 2.x branch label Apr 12, 2024
@owaiskazi19 owaiskazi19 merged commit f2e2a85 into opensearch-project:main Apr 12, 2024
36 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 12, 2024
…ex (#13104)

* Refactoring globMatch using simpleMatchWithNormalizedStrings from Regex

Signed-off-by: Niyati Aggarwal <niyatiagg4641@gmail.com>

* Adding entry to CHANGELOG.md

Signed-off-by: Niyati Aggarwal <niyatiagg4641@gmail.com>

* Adding tests for GlobMatch

Signed-off-by: Niyati Aggarwal <niyatiagg4641@gmail.com>

* Moving entry to Changed section in CHANGELOG.md

Signed-off-by: Niyati Aggarwal <niyatiagg4641@gmail.com>

---------

Signed-off-by: Niyati Aggarwal <niyatiagg4641@gmail.com>
(cherry picked from commit f2e2a85)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@cwperks
Copy link
Member

cwperks commented Apr 12, 2024

good to merge?

Yes, I dismissed my own review since I'm not a maintainer of this repo but it was showing a green check mark instead of a grey check mark.

owaiskazi19 pushed a commit that referenced this pull request Apr 12, 2024
…ex (#13104) (#13176)

* Refactoring globMatch using simpleMatchWithNormalizedStrings from Regex



* Adding entry to CHANGELOG.md



* Adding tests for GlobMatch



* Moving entry to Changed section in CHANGELOG.md



---------


(cherry picked from commit f2e2a85)

Signed-off-by: Niyati Aggarwal <niyatiagg4641@gmail.com>
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>
@kkhatua kkhatua mentioned this pull request Jul 30, 2024
8 tasks
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 bug Something isn't working good first issue Good for newcomers Search Search query, autocomplete ...etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Refactor] Replace recursive Glob.globMatch with iterative approach
4 participants