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

[BUG] Checked in versions of job-scheduler-*-SNAPSHOT.zip #17

Closed
Tracked by #1375 ...
dblock opened this issue Apr 22, 2021 · 7 comments · Fixed by #25 or #505
Closed
Tracked by #1375 ...

[BUG] Checked in versions of job-scheduler-*-SNAPSHOT.zip #17

dblock opened this issue Apr 22, 2021 · 7 comments · Fixed by #25 or #505
Assignees
Labels
enhancement New feature or request v2.0.0

Comments

@dblock
Copy link
Member

dblock commented Apr 22, 2021

Is your feature request related to a problem? Please describe.
We commit the job-scheduler depenency into src/test/resources/job-scheduler/opendistro-job-scheduler-1.15.0.0-SNAPSHOT.zip and similar which is just some random version built on a developer desktop. This is not reliable.

Describe the solution you'd like
Replace with a dynamic maven dependency or build one on demand in CI.

Describe alternatives you've considered
This is what it takes to update this today.

cd job-scheduler
git checkout 1.2
git pull
./gradlew assemble
rm ../anomaly-detection/src/test/resources/job-scheduler/*
rm -rf ../anomaly-detection/src/test/resources/org/opensearch/ad/bwc/job-scheduler/*
cp ./build/distributions/opensearch-job-scheduler-1.2.3.0-SNAPSHOT.zip ../anomaly-detection/src/test/resources/job-scheduler/
mkdir -p ../anomaly-detection/src/test/resources/org/opensearch/ad/bwc/job-scheduler/1.2.3.0-SNAPSHOT
cp ./build/distributions/opensearch-job-scheduler-1.2.3.0-SNAPSHOT.zip ../anomaly-detection/src/test/resources/org/opensearch/ad/bwc/job-scheduler/1.2.3.0-SNAPSHOT

Additional context
Part of #15, right now integTest is failing because of version incompatibility.

| Output for ./bin/opensearch-plugin:-> Installing file:/home/ubuntu/source/opensearch-project/anomaly-detection/dblock/src/test/resources/job-scheduler/opendistro-job-scheduler-1.15.0.0-SNAPSHOT.zip
| -> Downloading file:/home/ubuntu/source/opensearch-project/anomaly-detection/dblock/src/test/resources/job-scheduler/opendistro-job-scheduler-1.15.0.0-SNAPSHOT.zip
| -> Failed installing file:/home/ubuntu/source/opensearch-project/anomaly-detection/dblock/src/test/resources/job-scheduler/opendistro-job-scheduler-1.15.0.0-SNAPSHOT.zip
| -> Rolling back file:/home/ubuntu/source/opensearch-project/anomaly-detection/dblock/src/test/resources/job-scheduler/opendistro-job-scheduler-1.15.0.0-SNAPSHOT.zip
| -> Rolled back file:/home/ubuntu/source/opensearch-project/anomaly-detection/dblock/src/test/resources/job-scheduler/opendistro-job-scheduler-1.15.0.0-SNAPSHOT.zip
| Exception in thread "main" java.lang.IllegalArgumentException: Plugin [opendistro-job-scheduler] was built for OpenSearch version 7.10.3 but version 1.0.0 is running
|       at org.opensearch.plugins.PluginsService.verifyCompatibility(PluginsService.java:365)
|       at org.opensearch.plugins.InstallPluginCommand.loadPluginInfo(InstallPluginCommand.java:801)
|       at org.opensearch.plugins.InstallPluginCommand.installPlugin(InstallPluginCommand.java:856)
|       at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:263)
|       at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:237)
|       at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:99)
|       at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:140)
|       at org.opensearch.cli.MultiCommand.execute(MultiCommand.java:104)
|       at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:140)
|       at org.opensearch.cli.Command.main(Command.java:103)
|       at org.opensearch.plugins.PluginCli.main(PluginCli.java:60)
@dblock dblock added the enhancement New feature or request label Apr 22, 2021
@dblock dblock self-assigned this Apr 24, 2021
@dblock
Copy link
Member Author

dblock commented Dec 17, 2021

Not sure why I closed this, this is a major pain in version increments, e.g. #344, and whatever was done isn't working.

@dblock dblock reopened this Dec 17, 2021
@dblock dblock changed the title Replace src/test/resources/job-scheduler/opendistro-job-scheduler-1.15.0.0-SNAPSHOT.zip by a maven dependency Replace checked in versions of job-scheduler-*-SNAPSHOT.zip by a maven dependency Dec 18, 2021
@dblock dblock changed the title Replace checked in versions of job-scheduler-*-SNAPSHOT.zip by a maven dependency [BUG] Checked in versions of job-scheduler-*-SNAPSHOT.zip Dec 18, 2021
@amitgalitz
Copy link
Member

This seems to be overlapping with #352, do you have a preference to which issue I should close. Currently I opened this issue in opensearch-build (https:/opensearch-project/opensearch-build/issues/1441) in hopes to have job-scheduler snapshots always up to date in maven. In this issue are you suggesting a change to have the zips themselves uploaded to maven?

@dblock
Copy link
Member Author

dblock commented Jan 11, 2022

I closed #352 since it's newer.

@dblock dblock added the v2.0.0 label Mar 14, 2022
@dblock
Copy link
Member Author

dblock commented Mar 14, 2022

Here's a full list of ZIPs.

./anomaly-detection/src/test/resources/org/opensearch/ad/bwc/anomaly-detection/1.13.0.0/opendistro-anomaly-detection-1.13.0.0.zip
./anomaly-detection/src/test/resources/org/opensearch/ad/bwc/anomaly-detection/1.1.0.0-SNAPSHOT/opensearch-anomaly-detection-1.1.0.0-SNAPSHOT.zip
./anomaly-detection/src/test/resources/org/opensearch/ad/bwc/job-scheduler/1.13.0.0/opendistro-job-scheduler-1.13.0.0.zip
./anomaly-detection/src/test/resources/org/opensearch/ad/bwc/job-scheduler/1.2.0.0-SNAPSHOT/opensearch-job-scheduler-1.2.0.0-SNAPSHOT.zip
./anomaly-detection/src/test/resources/org/opensearch/ad/bwc/job-scheduler/1.3.0.0-SNAPSHOT/opensearch-job-scheduler-1.3.0.0-SNAPSHOT.zip
./anomaly-detection/src/test/resources/job-scheduler/opensearch-job-scheduler-1.3.0.0-SNAPSHOT.zip

This is now a child of opensearch-project/opensearch-build#1750

@dblock
Copy link
Member Author

dblock commented Apr 18, 2022

I am still seeing these:

./anomaly-detection/src/test/resources/org/opensearch/ad/bwc/anomaly-detection/1.13.0.0/opendistro-anomaly-detection-1.13.0.0.zip
./anomaly-detection/src/test/resources/org/opensearch/ad/bwc/anomaly-detection/1.1.0.0-SNAPSHOT/opensearch-anomaly-detection-1.1.0.0-SNAPSHOT.zip
./anomaly-detection/src/test/resources/org/opensearch/ad/bwc/job-scheduler/1.13.0.0/opendistro-job-scheduler-1.13.0.0.zip
./anomaly-detection/src/test/resources/org/opensearch/ad/bwc/job-scheduler/1.2.0.0-SNAPSHOT/opensearch-job-scheduler-1.2.0.0-SNAPSHOT.zip
./anomaly-detection/src/test/resources/org/opensearch/ad/bwc/job-scheduler/1.3.0.0-SNAPSHOT/opensearch-job-scheduler-1.3.0.0-SNAPSHOT.zip

@dblock dblock reopened this Apr 18, 2022
@amitgalitz
Copy link
Member

@dblock The left over zips are for BWC. From a different issue I understand backfilling is a problem. I can either Implement code that parses manifests files for older zips or I can get the build numbers from the official docker releases. Is there a preferences between the two?

@dblock
Copy link
Member Author

dblock commented Apr 18, 2022

@amitgalitz I think you should do something like opensearch-project/cross-cluster-replication#366. Right now you're using "some" -SNAPSHOT builds, which is precisely the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v2.0.0
Projects
None yet
3 participants