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

removing job-scheduler zip and replacing with distribution build #487

Merged
merged 2 commits into from
Apr 4, 2022

Conversation

amitgalitz
Copy link
Member

Signed-off-by: Amit Galitzky [email protected]

Description

Remove job-scheduler zip and instead download distribution from ci.opensearch.org and using that for running integCluster. This will later be replaced with a maven download when zips are uploaded to maven.

Issues Resolved

#17

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.

@amitgalitz amitgalitz requested a review from a team April 4, 2022 19:50
@opensearch-trigger-bot opensearch-trigger-bot bot added backport 1.x infra Changes to infrastructure, testing, CI/CD, pipelines, etc. labels Apr 4, 2022
build.gradle Outdated
project.mkdir js_resource_folder
ant.get(src: 'https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/'
+ opensearch_no_snapshot
+ '/latest/linux/x64/builds/opensearch/plugins/opensearch-job-scheduler-'
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see we use hard code x64 here, not sure if it will impact CI/IT workflow for other platform, @peterzhuamazon any suggestion?

Copy link
Member

Choose a reason for hiding this comment

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

Since github actions offer default runner are x64 I see no problem running on hardcoded x64.
Jenkins are testing both x64 and arm64 tho after each build.
If you really want arm64 to be on github action you need to manage self-hosted runners yourself tho.

Copy link
Member

Choose a reason for hiding this comment

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

This will eventually become a problem, but not just because of x64. For example, windows. For now this is fine.

build.gradle Outdated
}
if (isSnapshot) {
opensearch_build += "-SNAPSHOT"
}
opensearch_no_snapshot = opensearch_version.substring(0, opensearch_version.indexOf("-", opensearch_version.indexOf("-") + 1))
Copy link
Member

Choose a reason for hiding this comment

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

If this is just to remove the -SNAPSHOT, can't we just persist the opensearch_build var as a separate var before the optional -SNAPSHOT is added on lines 30-32?

Copy link
Member

Choose a reason for hiding this comment

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

In fact, what's the difference between job_scheduler_no_snapshot and opensearch_no_snapshot?

Copy link
Member

Choose a reason for hiding this comment

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

Just replace -SNAPSHOT with should be enough.

Copy link
Member Author

Choose a reason for hiding this comment

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

job_scheduler_no_snapshot = 2.0.0.0-alpha1
opensearch_no_snapshot = 2.0.0-alpha1
The optional -SNAPSHOT is added after adding the .0
@peterzhuamazon good call, I'll change to opensearch_version.replace("-SNAPSHOT, "")

Copy link
Member Author

Choose a reason for hiding this comment

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

@ohltyler since one has the .0 and one doesn't, I changed it to .replace from the opensearch_version. Might have misunderstood what you meant

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, missed that. Your change looks good to me!

build.gradle Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Apr 4, 2022

Codecov Report

Merging #487 (e61d1f4) into main (0c191c0) will increase coverage by 0.27%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #487      +/-   ##
============================================
+ Coverage     77.96%   78.24%   +0.27%     
- Complexity     4145     4167      +22     
============================================
  Files           296      296              
  Lines         17652    17652              
  Branches       1877     1877              
============================================
+ Hits          13762    13811      +49     
+ Misses         2995     2950      -45     
+ Partials        895      891       -4     
Flag Coverage Δ
plugin 78.24% <ø> (+0.27%) ⬆️

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

Impacted Files Coverage Δ
...ain/java/org/opensearch/ad/task/ADTaskManager.java 76.07% <0.00%> (-0.61%) ⬇️
...rch/ad/transport/AnomalyResultTransportAction.java 80.13% <0.00%> (ø)
...opensearch/ad/indices/AnomalyDetectionIndices.java 72.12% <0.00%> (+0.18%) ⬆️
.../main/java/org/opensearch/ad/ml/CheckpointDao.java 70.19% <0.00%> (+0.64%) ⬆️
...ava/org/opensearch/ad/task/ADHCBatchTaskCache.java 91.35% <0.00%> (+1.23%) ⬆️
...ain/java/org/opensearch/ad/model/ModelProfile.java 72.72% <0.00%> (+1.81%) ⬆️
...ansport/handler/AnomalyResultBulkIndexHandler.java 70.96% <0.00%> (+3.22%) ⬆️
...va/org/opensearch/ad/feature/SearchFeatureDao.java 86.64% <0.00%> (+3.85%) ⬆️
...c/main/java/org/opensearch/ad/util/ParseUtils.java 77.77% <0.00%> (+3.94%) ⬆️
...java/org/opensearch/ad/task/ADBatchTaskRunner.java 85.71% <0.00%> (+3.95%) ⬆️

@peterzhuamazon peterzhuamazon changed the title removing job-scheduler zip and replacign with distribution build removing job-scheduler zip and replacing with distribution build Apr 4, 2022
Signed-off-by: Amit Galitzky <[email protected]>
Copy link
Member

@ohltyler ohltyler 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
infra Changes to infrastructure, testing, CI/CD, pipelines, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants