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

Adding support to run integration tests in Jenkins #423

Merged
merged 13 commits into from
Sep 15, 2021
Merged

Adding support to run integration tests in Jenkins #423

merged 13 commits into from
Sep 15, 2021

Conversation

saratvemulapalli
Copy link
Member

@saratvemulapalli saratvemulapalli commented Sep 9, 2021

Description

Adding support to run integration tests in Jenkins.

Parameters Integration Tests need:

  1. Artifacts S3 Bucket - To pull build/bundle manifests, maven dependencies.
  2. OpenSearch version - To pull build/bundle manifest.
  3. Build ID - To map Build ID to a test run (Test Run ID) and to pull the right manifests.
  4. CPU Architecture - To identify which agent node to run on.
  5. Test Run ID - To publish results for a unique job ID

Issues Resolved

Closes #263

Check List

  • 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: Sarat Vemulapalli <vemulapallisarat@gmail.com>
Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Sep 9, 2021

Codecov Report

Merging #423 (da720a2) into main (1e66ff2) will increase coverage by 0.71%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #423      +/-   ##
==========================================
+ Coverage   64.82%   65.54%   +0.71%     
==========================================
  Files          48       47       -1     
  Lines        1288     1274      -14     
==========================================
  Hits          835      835              
+ Misses        453      439      -14     
Impacted Files Coverage Δ
bundle-workflow/src/run_integ_test.py 0.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1e66ff2...da720a2. Read the comment docs.

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

  1. It might not be possible, but a bundle defines the architecture for which it's built. This job lets me try and run a bundle for x86 on arm, which is not desirable. Can this be loaded from the bundle?
  2. I'm worried that we're introducing test_integration.sh, which we have agreed to really be test.sh --suite integration or something like that. Can we do this, even if it's super hacky inside test.sh, in this PR so we don't have to go change it all over the place?

Copy link
Member

@peternied peternied left a comment

Choose a reason for hiding this comment

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

I was expecting to see all the legs of the integration tests executed, integration, bwc, perf is that coming in a future PR?

bundle-workflow/jenkins_workflow/integtest/Jenkinsfile Outdated Show resolved Hide resolved
bundle-workflow/jenkins_workflow/integtest/Jenkinsfile Outdated Show resolved Hide resolved
bundle-workflow/jenkins_workflow/integtest/Jenkinsfile Outdated Show resolved Hide resolved
bundle-workflow/jenkins_workflow/integtest/Jenkinsfile Outdated Show resolved Hide resolved
@saratvemulapalli
Copy link
Member Author

I was expecting to see all the legs of the integration tests executed, integration, bwc, perf is that coming in a future PR?

Sure. This is a middle piece i.e bundle workflow -> test orchestrator -> individual test job.
This helps in keeping the jobs independent while the orchestrator combines all of them into one place and executes integ tests, bwc tests and perf tests.
This PR lays down the framework of how an individual test job can run.

@saratvemulapalli
Copy link
Member Author

  1. It might not be possible, but a bundle defines the architecture for which it's built. This job lets me try and run a bundle for x86 on arm, which is not desirable. Can this be loaded from the bundle?
  2. I'm worried that we're introducing test_integration.sh, which we have agreed to really be test.sh --suite integration or something like that. Can we do this, even if it's super hacky inside test.sh, in this PR so we don't have to go change it all over the place?
  1. It should be able to. Just didnt want to complicate the logic in Jenkins. But I agree and see the value that we are giving room to have mis-matched states while the truth already exists. I'll take care of this.
  2. Absolutely, we went back and forth on this. I wanted to clear this up as part of Unify invoking the test workflows #393 while not holding this one up. I'll put something really simple for this PR and we could double down on the structure with Unify invoking the test workflows #393.

@peternied
Copy link
Member

@saratvemulapalli During our discussion yesterday reading the manifest for architecture and reducing number of input parameters were mentioned - I'm waiting on those change

… integtest

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
```bash
./bundle-workflow/test.sh manifests/opensearch-1.1.0.yml
./bundle-workflow/test.sh integ-test
Copy link
Member

Choose a reason for hiding this comment

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

Which manifest?

Copy link
Member Author

@saratvemulapalli saratvemulapalli Sep 14, 2021

Choose a reason for hiding this comment

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

Not sure if the question was what manifest do we use for integ tests. If it is, it uses build and bundle manifest and it fetches it by itself.
I would like to have #456 update this readme to add the rest of the new parameters to this readme.

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
bundle-workflow/test.sh Outdated Show resolved Hide resolved
Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
setiah
setiah previously approved these changes Sep 15, 2021
Copy link
Contributor

@setiah setiah left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @saratvemulapalli

@@ -9,4 +9,4 @@
set -e

DIR="$(dirname "$0")"
"$DIR/run.sh" "$DIR/src/test.py" $@
"$DIR/run.sh" "$DIR/src/test.py" $@
Copy link
Member

Choose a reason for hiding this comment

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

Did you delete src/test.py?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, @setiah will add the test.sh in #456 as part of his PR.
Ref: #423 (comment)

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
@saratvemulapalli saratvemulapalli merged commit def90f5 into opensearch-project:main Sep 15, 2021
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.

Make all test jobs parameterized
5 participants