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

Integ tests fix for arm64.[Failure in starting up prometheus server] #1069

Merged
merged 1 commit into from
Nov 14, 2022

Conversation

vmmusings
Copy link
Member

@vmmusings vmmusings commented Nov 14, 2022

Signed-off-by: vamsi-amazon [email protected]

Description

This is to fix integration test errors for arm64 archetype.
RCA: using wrong binary to start prometheus server for integ tests.
https://build.ci.opensearch.org/blue/organizations/jenkins/integ-test/detail/integ-test/3242/pipeline/131

Issues Resolved

[List any issues this PR will resolve]

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.

@codecov-commenter
Copy link

codecov-commenter commented Nov 14, 2022

Codecov Report

Merging #1069 (f099136) into 2.x (03f30e3) will decrease coverage by 2.56%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##                2.x    #1069      +/-   ##
============================================
- Coverage     98.27%   95.71%   -2.57%     
  Complexity     3351     3351              
============================================
  Files           327      337      +10     
  Lines          8457     9115     +658     
  Branches        553      672     +119     
============================================
+ Hits           8311     8724     +413     
- Misses          142      334     +192     
- Partials          4       57      +53     
Flag Coverage Δ
query-workbench 62.76% <ø> (?)
sql-engine 98.27% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
workbench/public/components/app.tsx 0.00% <0.00%> (ø)
workbench/public/utils/PanelWrapper.tsx 100.00% <0.00%> (ø)
workbench/public/components/Header/Header.tsx 100.00% <0.00%> (ø)
...ch/public/components/QueryResults/QueryResults.tsx 61.60% <0.00%> (ø)
workbench/public/components/SQLPage/SQLPage.tsx 100.00% <0.00%> (ø)
...ublic/components/QueryResults/QueryResultsBody.tsx 68.32% <0.00%> (ø)
...h/public/components/QueryLanguageSwitch/Switch.tsx 85.71% <0.00%> (ø)
workbench/public/application.tsx 0.00% <0.00%> (ø)
workbench/public/components/Main/main.tsx 53.00% <0.00%> (ø)
workbench/public/components/PPLPage/PPLPage.tsx 56.52% <0.00%> (ø)

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

@vmmusings vmmusings force-pushed the integ-test-archtype-fix branch from aa2ad60 to 141296c Compare November 14, 2022 07:57
@vmmusings vmmusings added backport 2.4 bug Something isn't working labels Nov 14, 2022
@vmmusings vmmusings marked this pull request as ready for review November 14, 2022 08:23
@vmmusings vmmusings requested a review from a team as a code owner November 14, 2022 08:23
build.gradle Outdated
@@ -21,6 +21,29 @@ buildscript {
// 2.0.0-rc1-SNAPSHOT -> 2.0.0.0-rc1-SNAPSHOT (opensearch_build)
opensearch_build += "-SNAPSHOT"
}
getPrometheusBinaryLocation = { ->
def os = org.gradle.internal.os.OperatingSystem.current()
println "*** Building on ${os.familyName} / ${os.name} / ${os.version} / ${System.getProperty("os.arch")}."
Copy link
Collaborator

@penghuo penghuo Nov 14, 2022

Choose a reason for hiding this comment

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

remove it?

Comment on lines 145 to 148
doLast {
println "Deleting prometheus folder"
println file("$projectDir/bin/prometheus").deleteDir()
println file("$projectDir/bin/prometheus.tar.gz").delete()
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

for debug?

Copy link
Member Author

Choose a reason for hiding this comment

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

I am deleting the downloaded artifacts after the integ tests.

Copy link
Member Author

Choose a reason for hiding this comment

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

Will remove println statements.

build.gradle Outdated
if (os.isMacOsX()) {
//x64, x86-64, amd64
if (System.getProperty("os.arch").startsWith("x") || System.getProperty("os.arch").startsWith("amd")) {
return "https://github.com/prometheus/prometheus/releases/download/v2.37.2/prometheus-2.37.2.darwin-amd64.tar.gz"
Copy link
Collaborator

@penghuo penghuo Nov 14, 2022

Choose a reason for hiding this comment

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

how about compose downlink using version, platform and arch. prometheus-{version}.{platform}-{arch}

Copy link
Member Author

Choose a reason for hiding this comment

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

I have done that...I couldn't push the latest commit last night.
There are too many names for the same arch type and OS family. So slightly simplified the logic.

@vmmusings vmmusings force-pushed the integ-test-archtype-fix branch from 141296c to 985e2f2 Compare November 14, 2022 18:46
Signed-off-by: vamsi-amazon <[email protected]>
@vmmusings vmmusings force-pushed the integ-test-archtype-fix branch from 985e2f2 to f099136 Compare November 14, 2022 18:50
Copy link
Collaborator

@penghuo penghuo left a comment

Choose a reason for hiding this comment

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

LGTM

@vmmusings vmmusings changed the title arch type fix Integ tests fix for arm64.[Failure in starting up prometheus server] Nov 14, 2022
Copy link
Member

@joshuali925 joshuali925 left a comment

Choose a reason for hiding this comment

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

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.4 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants