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

Resolve Prometheus dependency for IT on non-Linux OS. #152

Conversation

Yury-Fridlyand
Copy link

@Yury-Fridlyand Yury-Fridlyand commented Nov 1, 2022

Signed-off-by: Yury-Fridlyand yuryf@bitquilltech.com

Description

Unblock tests from Prometheus dependency - it is available on Linux only:

  • Doctest would start, but would report one failure on another OS
  • Integration tests would start and skip Prometheus related tests on another OS
  • Minor fix - don't re-download Prometheus binaries.

Issues Resolved

Proposed as a temporary solution while opensearch-project#982 isn't fixed.
Introduced by opensearch-project#977.

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

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: Yury-Fridlyand <yuryf@bitquilltech.com>
@Yury-Fridlyand Yury-Fridlyand marked this pull request as draft November 1, 2022 22:32
@codecov

This comment was marked as spam.

Signed-off-by: Yury-Fridlyand <yuryf@bitquilltech.com>
@@ -85,9 +88,11 @@ task stopPrometheus() {
}

stopPrometheus.mustRunAfter startPrometheus
doctest.dependsOn startOpenSearch
if (DefaultNativePlatform.currentOperatingSystem.isLinux()) {

Choose a reason for hiding this comment

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

Thank you!
Can you include a comment saying why we don't run prometheus on non-Linux systems.

Copy link
Author

Choose a reason for hiding this comment

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

I'll be happy to know why...

Copy link
Author

Choose a reason for hiding this comment

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

Fixed in 82942fa.

dependsOn startPrometheus
finalizedBy stopPrometheus

if (DefaultNativePlatform.currentOperatingSystem.isLinux()) {

Choose a reason for hiding this comment

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

Same here. Maybe a comment why we don't run this for non-Linux.
Someone might ask why don't we support promethius for all OSes

Copy link
Author

Choose a reason for hiding this comment

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

Fixed in 82942fa.

@@ -66,6 +66,9 @@ protected RestClient buildClient(Settings settings, HttpHost[] hosts) throws IOE
}

protected static void wipeAllOpenSearchIndices() throws IOException {
if (client() == null) {

Choose a reason for hiding this comment

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

feels like this check should be moved to RestIntegTestCase::cleanUpIndices and SQLIntegTestCase::cleanUpIndices (those classes already check for client() on setup)

Copy link
Author

Choose a reason for hiding this comment

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

Signed-off-by: Yury-Fridlyand <yuryf@bitquilltech.com>
Signed-off-by: Yury-Fridlyand <yuryf@bitquilltech.com>
@Yury-Fridlyand
Copy link
Author

Not relevant since opensearch-project#1069

@Yury-Fridlyand Yury-Fridlyand deleted the dev-unblock-IT-on-non-linux branch November 15, 2022 19:45
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