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

Publish job-scheduler JAR to maven, not only -spi #114

Closed
amitgalitz opened this issue Jan 10, 2022 · 4 comments · Fixed by #117
Closed

Publish job-scheduler JAR to maven, not only -spi #114

amitgalitz opened this issue Jan 10, 2022 · 4 comments · Fixed by #117
Labels
enhancement New feature or request v1.3.0

Comments

@amitgalitz
Copy link
Member

Is your feature request related to a problem? Please describe

Currently the Anomaly Detection plugin needs the entire job-scheduler plugin and not just the job-scheduler-spi in order to run BWC testing during its build process. Currently in order to successfully pass our build workflow we have to build and place the JAR file for the job scheduler plugin version that is relevant for that build in our repo. For example when we version bumped to 1.2.2.0 as seen in this PR we had to remove our 1.2.1.0 job-scheduler JAR and replace it with 1.2.2.0 job-scheduler JAR. This process means we have to manually be building job-scheduler every-time we want to version bump. We have this open issue stating this problem: opensearch-project/anomaly-detection#352

Describe the solution you'd like

In order to avoid manually building the JAR each time we propose to also have the job-scheduler uploaded to maven each time there is a version bump so we can fetch the snapshot in order to complete our build process. Moving over to this process would mean however that we would be reliant on maven always having the most up to date job-scheduler snapshot as our build process would be relaying on that the same way it now relies on core and job-scheduler-spi for example.

Describe alternatives you've considered

No response

Additional context

No response

@amitgalitz
Copy link
Member Author

@peternied, @mch2

@dblock
Copy link
Member

dblock commented Jan 11, 2022

Moving to job-scheduler repo, https:/opensearch-project/opensearch-build/blob/main/scripts/components/job-scheduler/build.sh#L65 calls

./gradlew publishShadowPublicationToMavenLocal -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT
./gradlew publishShadowPublicationToStagingRepository -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT
mkdir -p $OUTPUT/maven/org/opensearch
cp -r ./build/local-staging-repo/org/opensearch/. $OUTPUT/maven/org/opensearch

this needs to also include job-scheduler JAR.

@amitgalitz Care to make this change?

@dblock dblock transferred this issue from opensearch-project/opensearch-build Jan 11, 2022
@dblock dblock changed the title Adding job-scheduler snapshot to maven Publish job-scheduler JAR to maven Jan 11, 2022
@dblock dblock added v1.3.0 enhancement New feature or request labels Jan 11, 2022
@dblock dblock changed the title Publish job-scheduler JAR to maven Publish job-scheduler JAR to maven, not only -spi Jan 11, 2022
@dblock
Copy link
Member

dblock commented Jan 11, 2022

Looks like we were publishing job-scheduler in 1.2.x, but aren't in 1.3.0 (https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/opensearch-job-scheduler/ contains 1.2.x only), which is probably caused by #82.

@amitgalitz
Copy link
Member Author

Re-opening this issue until build script is changed in all supported branches for job-scheduler and backup is removed from opensearch-build. Currently due to this still being in opensearch-build the actual jar hasn't been uploaded yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v1.3.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants