Skip to content

[Feature/extensions] Renaming tests to be consistent with main branch, changing latches, and removing NamedWriteableRegistry from extensions#5571

Merged
ryanbogan merged 6 commits intoopensearch-project:feature/extensionsfrom
ryanbogan:rename_tests
Dec 19, 2022
Merged

[Feature/extensions] Renaming tests to be consistent with main branch, changing latches, and removing NamedWriteableRegistry from extensions#5571
ryanbogan merged 6 commits intoopensearch-project:feature/extensionsfrom
ryanbogan:rename_tests

Conversation

@ryanbogan
Copy link
Member

Signed-off-by: Ryan Bogan [email protected]

Description

Renaming tests to be consistent with main branch

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.

@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:

@ryanbogan
Copy link
Member Author

The test that is failing is also broken on main - I will rebase once the fix is pushed there.

@dreamer-89
Copy link
Member

Last few gradle check failures happening due to version bump after 2.4.1 release, #5560. Fixed is merged into main branch. @ryanbogan : Can you please rebase your branch against latest main branch ?

* What went wrong:
Execution failed for task ':distribution:bwc:bugfix:buildBwcLinuxTar'.
> Building 2.4.1 didn't generate expected file /var/jenkins/workspace/gradle-check/search/distribution/bwc/bugfix/build/bwc/checkout-2.4/distribution/archives/linux-tar/build/distributions/opensearch-min-2.4.1-SNAPSHOT-linux-x64.tar.gz

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.client.PitIT.testDeleteAllAndListAllPits

@codecov-commenter
Copy link

codecov-commenter commented Dec 14, 2022

Codecov Report

Merging #5571 (a973607) into feature/extensions (c7c908e) will increase coverage by 0.05%.
The diff coverage is 16.66%.

@@                   Coverage Diff                    @@
##             feature/extensions    opensearch-project/OpenSearch#5571      +/-   ##
========================================================
+ Coverage                 70.92%   70.97%   +0.05%     
- Complexity                58504    58547      +43     
========================================================
  Files                      4767     4762       -5     
  Lines                    279189   279038     -151     
  Branches                  40316    40301      -15     
========================================================
+ Hits                     198001   198034      +33     
+ Misses                    65058    64874     -184     
  Partials                  16130    16130              
Impacted Files Coverage Δ
...rch/extensions/rest/RestSendToExtensionAction.java 28.37% <0.00%> (ø)
...a/org/opensearch/extensions/ExtensionsManager.java 58.98% <100.00%> (-2.28%) ⬇️
...port/ResponseHandlerFailureTransportException.java 0.00% <0.00%> (-60.00%) ⬇️
...r/src/main/java/org/opensearch/http/HttpUtils.java 33.33% <0.00%> (-33.34%) ⬇️
...nsearch/index/shard/IndexShardClosedException.java 66.66% <0.00%> (-33.34%) ⬇️
...a/org/opensearch/index/mapper/MapperException.java 75.00% <0.00%> (-25.00%) ⬇️
...ensearch/client/indices/DetailAnalyzeResponse.java 20.54% <0.00%> (-24.66%) ⬇️
...a/org/opensearch/extensions/OpenSearchRequest.java 0.00% <0.00%> (-23.53%) ⬇️
...pensearch/index/mapper/MapperParsingException.java 77.77% <0.00%> (-22.23%) ⬇️
...n/decider/SnapshotInProgressAllocationDecider.java 52.17% <0.00%> (-21.74%) ⬇️
... and 460 more

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

);
try {
inProgressLatch.await(ExtensionsManager.EXTENSION_REQUEST_WAIT_TIMEOUT, TimeUnit.SECONDS);
inProgressFuture.get(ExtensionsManager.EXTENSION_REQUEST_WAIT_TIMEOUT, TimeUnit.SECONDS);
Copy link
Member

Choose a reason for hiding this comment

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

The .get() call blocks so this gives you no improvement on the synchronous nature of the countdown latch.

Recommend you use an .orTimeout() to implement the timeout functionality. That will also change the handling of timeout below from an InterruptedException to an isCompletedExceptionally() test. (Probably include an isCancelled() as well.). Or you could call .join() next which would throw a CompletionException to keep the same logic.

Copy link
Member Author

@ryanbogan ryanbogan Dec 15, 2022

Choose a reason for hiding this comment

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

@dbwiddis I wanted this to still be synchronous for now. I think we should either raise a PR on feature/extensions that changes all the latches and .get() calls now or we should wait and do a similar PR once everything is merged to main. Either way, I think this approach is better than changing them one by one as we merge everything to main. Thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

Fair, raise an issue, add a TODO comment and we can merge this.

Copy link
Member

Choose a reason for hiding this comment

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

@ryanbogan can you link the issue here?

Copy link
Member Author

Choose a reason for hiding this comment

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

@ryanbogan ryanbogan changed the title [Feature/extensions] Renaming tests to be consistent with main branch [Feature/extensions] Renaming tests to be consistent with main branch, changing latches, and removing NamedWriteableRegistry from extensions Dec 15, 2022
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.indices.stats.IndexStatsIT.testFilterCacheStats

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@ryanbogan ryanbogan merged commit ea057bd into opensearch-project:feature/extensions Dec 19, 2022
@ryanbogan ryanbogan deleted the rename_tests branch December 19, 2022 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants