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

Refactor FilterPath parse function (#12067) #12131

Closed

Conversation

robinf95
Copy link
Contributor

@robinf95 robinf95 commented Feb 1, 2024

Signed-off-by: Robin Friedmann robinfriedmann.rf@gmail.com

Description

Refactoring FilterPath.parse by using an iterative approach instead of recursion.

Related Issues

Resolves #12067

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: Robin Friedmann <robinfriedmann.rf@gmail.com>
Copy link
Contributor

github-actions bot commented Feb 1, 2024

Compatibility status:

Checks if related components are compatible with change c154bd7

Incompatible components

Incompatible components: [https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/performance-analyzer-rca.git]

Skipped components

Compatible components

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

Copy link
Contributor

github-actions bot commented Feb 1, 2024

❕ Gradle check result for 43f5867: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.cluster.allocation.ClusterRerouteIT.testDelayWithALargeAmountOfShards

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

@github-actions github-actions bot added bug Something isn't working good first issue Good for newcomers labels Feb 1, 2024
@github-actions github-actions bot added the Search Search query, autocomplete ...etc label Feb 1, 2024
@deshsidd
Copy link
Contributor

deshsidd commented Feb 1, 2024

Do we have tests covering these already?

Signed-off-by: Robin Friedmann <robinfriedmann.rf@gmail.com>
@robinf95
Copy link
Contributor Author

robinf95 commented Feb 5, 2024

Do we have tests covering these already?

There are already a bunch of tests FilterPathTests

I just added two that were missing.

Copy link
Contributor

github-actions bot commented Feb 5, 2024

❌ Gradle check result for 0be57d1: 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 Feb 5, 2024

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

…2067)

Signed-off-by: Robin Friedmann <robinfriedmann.rf@gmail.com>
Copy link
Contributor

github-actions bot commented Feb 5, 2024

❌ Gradle check result for c154bd7: 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 Feb 6, 2024

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

@opensearch-trigger-bot
Copy link
Contributor

This PR is stalled because it has been open for 30 days with no activity.

@opensearch-trigger-bot opensearch-trigger-bot bot added the stalled Issues that have stalled label Mar 8, 2024
@getsaurabh02
Copy link
Member

@deshsidd will you be interested in taking this forward?

@deshsidd
Copy link
Contributor

@deshsidd will you be interested in taking this forward?

Let me take care of this one

@opensearch-trigger-bot opensearch-trigger-bot bot removed the stalled Issues that have stalled label Apr 12, 2024
@sandeshkr419
Copy link
Contributor

@deshsidd Are you still on it?

@@ -369,4 +370,20 @@ public void testMultipleFilterPaths() {
assertThat(filterPath.getSegment(), is(emptyString()));
assertSame(filterPath, FilterPath.EMPTY);
}

public void testCompileWithEmptyString() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Seems this newly added test case is duplicated with the existing test case:

.

assertEquals(0, filterPaths.length);
}

public void testCompileWithNull() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same to above, duplicated.

@sandeshkr419
Copy link
Contributor

Closing in lieu of #14200

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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 FilterPath.parse with iterative approach
6 participants