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

Add support for dependencies in plugin descriptor properties with semver range #11441

Merged

Conversation

abseth-amzn
Copy link
Contributor

@abseth-amzn abseth-amzn commented Dec 4, 2023

Description

As a first step towards supporting semVer range of compatible versions for plugins, we are starting with support for specifying 'dependencies' for a plugin in its plugin-descriptor.properties file. The change currently supports specification of only one dependency (opensearch). Following notations are supported for specifying the compatible dependency version:

  • dependencies={ opensearch: x.y.z }
  • dependencies={ opensearch: =x.y.z }
  • dependencies={ opensearch: ~x.y.z }
  • dependencies={ opensearch: ^x.y.z }
    (specification of major, minor and patch version is required in above notations)

Related Issues

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)
  • Public documentation issue/PR created

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.

Copy link
Contributor

github-actions bot commented Dec 4, 2023

❌ Gradle check result for 7e41183: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Dec 4, 2023

Compatibility status:

Checks if related components are compatible with change 18a80e1

Incompatible components

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/flow-framework.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/performance-analyzer.git]

Copy link
Contributor

github-actions bot commented Feb 7, 2024

❌ Gradle check result for f44551f: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Feb 7, 2024

❕ Gradle check result for 18a80e1: UNSTABLE

  • TEST FAILURES:
      2 org.opensearch.remotestore.RemoteIndexPrimaryRelocationIT.testPrimaryRelocationWhileIndexing
      1 org.opensearch.search.SearchWeightedRoutingIT.testShardRoutingWithNetworkDisruption_FailOpenEnabled

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

@reta
Copy link
Collaborator

reta commented Feb 7, 2024

@abseth-amzn we still have DCO failures sadly for some commits, may need rebase + squash

@saratvemulapalli saratvemulapalli merged commit ff232d4 into opensearch-project:main Feb 8, 2024
30 checks passed
@rursprung
Copy link
Contributor

thanks, this should simplify upgrades greatly!
will this be cherry-picked to the 2.12 or at least the 2.x branch?

@abseth-amzn
Copy link
Contributor Author

thanks, this should simplify upgrades greatly! will this be cherry-picked to the 2.12 or at least the 2.x branch?

Yes, working on backporting it to 2.x branch.

abseth-amzn added a commit to abseth-amzn/OpenSearch that referenced this pull request Feb 9, 2024
…ver range (opensearch-project#11441)

* Add support for dependencies in plugin descriptor properties with semver range (opensearch-project#1707)

Signed-off-by: Abhilasha Seth <[email protected]>

* Remove unused gson licenses

Signed-off-by: Abhilasha Seth <[email protected]>

* Maintain bwc in PluginInfo with addition of semver range

Signed-off-by: Abhilasha Seth <[email protected]>

* Added support for list of ranges

Signed-off-by: Abhilasha Seth <[email protected]>

* Add bwc tests and restrict range list size to 1

Signed-off-by: Abhilasha Seth <[email protected]>

* Update SemverRange javadoc

Signed-off-by: Abhilasha Seth <[email protected]>

* Minor change to trigger jenkins re-run

Signed-off-by: Abhilasha Seth <[email protected]>

* Use jackson instead of gson

* Remove jackson databind and annotations dependency from server

Signed-off-by: Abhilasha Seth <[email protected]>

* nit fixes

Signed-off-by: Abhilasha Seth <[email protected]>

* Minor change to re-run jenkins workflow

Signed-off-by: Abhilasha Seth <[email protected]>

---------

Signed-off-by: Abhilasha Seth <[email protected]>
abseth-amzn added a commit to abseth-amzn/OpenSearch that referenced this pull request Feb 9, 2024
…ver range (opensearch-project#11441)

* Add support for dependencies in plugin descriptor properties with semver range (opensearch-project#1707)

Signed-off-by: Abhilasha Seth <[email protected]>

* Remove unused gson licenses

Signed-off-by: Abhilasha Seth <[email protected]>

* Maintain bwc in PluginInfo with addition of semver range

Signed-off-by: Abhilasha Seth <[email protected]>

* Added support for list of ranges

Signed-off-by: Abhilasha Seth <[email protected]>

* Add bwc tests and restrict range list size to 1

Signed-off-by: Abhilasha Seth <[email protected]>

* Update SemverRange javadoc

Signed-off-by: Abhilasha Seth <[email protected]>

* Minor change to trigger jenkins re-run

Signed-off-by: Abhilasha Seth <[email protected]>

* Use jackson instead of gson

* Remove jackson databind and annotations dependency from server

Signed-off-by: Abhilasha Seth <[email protected]>

* nit fixes

Signed-off-by: Abhilasha Seth <[email protected]>

* Minor change to re-run jenkins workflow

Signed-off-by: Abhilasha Seth <[email protected]>

---------

Signed-off-by: Abhilasha Seth <[email protected]>
@abseth-amzn
Copy link
Contributor Author

abseth-amzn commented Feb 9, 2024

Backport PR for 2.x branch - #12271
BwC fix PR - #12273

dblock pushed a commit that referenced this pull request Feb 9, 2024
…ver range (#11441) (#12271)

* Add support for dependencies in plugin descriptor properties with semver range (#1707)



* Remove unused gson licenses



* Maintain bwc in PluginInfo with addition of semver range



* Added support for list of ranges



* Add bwc tests and restrict range list size to 1



* Update SemverRange javadoc



* Minor change to trigger jenkins re-run



* Use jackson instead of gson

* Remove jackson databind and annotations dependency from server



* nit fixes



* Minor change to re-run jenkins workflow



---------

Signed-off-by: Abhilasha Seth <[email protected]>
@github-actions github-actions bot added v2.13.0 Issues and PRs related to version 2.13.0 v3.0.0 Issues and PRs related to version 3.0.0 labels Feb 18, 2024
peteralfonsi pushed a commit to peteralfonsi/OpenSearch that referenced this pull request Mar 1, 2024
…ver range (opensearch-project#11441)

* Add support for dependencies in plugin descriptor properties with semver range (opensearch-project#1707)

Signed-off-by: Abhilasha Seth <[email protected]>

* Remove unused gson licenses

Signed-off-by: Abhilasha Seth <[email protected]>

* Maintain bwc in PluginInfo with addition of semver range

Signed-off-by: Abhilasha Seth <[email protected]>

* Added support for list of ranges

Signed-off-by: Abhilasha Seth <[email protected]>

* Add bwc tests and restrict range list size to 1

Signed-off-by: Abhilasha Seth <[email protected]>

* Update SemverRange javadoc

Signed-off-by: Abhilasha Seth <[email protected]>

* Minor change to trigger jenkins re-run

Signed-off-by: Abhilasha Seth <[email protected]>

* Use jackson instead of gson

* Remove jackson databind and annotations dependency from server

Signed-off-by: Abhilasha Seth <[email protected]>

* nit fixes

Signed-off-by: Abhilasha Seth <[email protected]>

* Minor change to re-run jenkins workflow

Signed-off-by: Abhilasha Seth <[email protected]>

---------

Signed-off-by: Abhilasha Seth <[email protected]>
rayshrey pushed a commit to rayshrey/OpenSearch that referenced this pull request Mar 18, 2024
…ver range (opensearch-project#11441)

* Add support for dependencies in plugin descriptor properties with semver range (opensearch-project#1707)

Signed-off-by: Abhilasha Seth <[email protected]>

* Remove unused gson licenses

Signed-off-by: Abhilasha Seth <[email protected]>

* Maintain bwc in PluginInfo with addition of semver range

Signed-off-by: Abhilasha Seth <[email protected]>

* Added support for list of ranges

Signed-off-by: Abhilasha Seth <[email protected]>

* Add bwc tests and restrict range list size to 1

Signed-off-by: Abhilasha Seth <[email protected]>

* Update SemverRange javadoc

Signed-off-by: Abhilasha Seth <[email protected]>

* Minor change to trigger jenkins re-run

Signed-off-by: Abhilasha Seth <[email protected]>

* Use jackson instead of gson

* Remove jackson databind and annotations dependency from server

Signed-off-by: Abhilasha Seth <[email protected]>

* nit fixes

Signed-off-by: Abhilasha Seth <[email protected]>

* Minor change to re-run jenkins workflow

Signed-off-by: Abhilasha Seth <[email protected]>

---------

Signed-off-by: Abhilasha Seth <[email protected]>
@rursprung
Copy link
Contributor

@saratvemulapalli: is there an example plugin where this is being used (e.g. opensearch-plugin-template-java would be a good place)?
how is this working with the gradle plugin (opensearchplugin, from org.opensearch.gradle:build-tools)?

@dblock
Copy link
Member

dblock commented Apr 12, 2024

@rursprung AFAIK no. If you are looking to a semi-production plugin to contribute an example to, may I volunteer https://github.com/dblock/opensearch-api? :)

@rursprung
Copy link
Contributor

@rursprung AFAIK no. If you are looking to a semi-production plugin to contribute an example to, may I volunteer https://github.com/dblock/opensearch-api? :)

i wanted to contribute it to another plugin but i fail to see how it can be done with the gradle plugin - either i'm missing something or it's not possible yet with that one? 😕

@dblock
Copy link
Member

dblock commented Apr 14, 2024

@rursprung I don't think you're missing anything, probably not implemented

@rursprung
Copy link
Contributor

i've raised #13187 to address this

shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…ver range (opensearch-project#11441)

* Add support for dependencies in plugin descriptor properties with semver range (opensearch-project#1707)

Signed-off-by: Abhilasha Seth <[email protected]>

* Remove unused gson licenses

Signed-off-by: Abhilasha Seth <[email protected]>

* Maintain bwc in PluginInfo with addition of semver range

Signed-off-by: Abhilasha Seth <[email protected]>

* Added support for list of ranges

Signed-off-by: Abhilasha Seth <[email protected]>

* Add bwc tests and restrict range list size to 1

Signed-off-by: Abhilasha Seth <[email protected]>

* Update SemverRange javadoc

Signed-off-by: Abhilasha Seth <[email protected]>

* Minor change to trigger jenkins re-run

Signed-off-by: Abhilasha Seth <[email protected]>

* Use jackson instead of gson

* Remove jackson databind and annotations dependency from server

Signed-off-by: Abhilasha Seth <[email protected]>

* nit fixes

Signed-off-by: Abhilasha Seth <[email protected]>

* Minor change to re-run jenkins workflow

Signed-off-by: Abhilasha Seth <[email protected]>

---------

Signed-off-by: Abhilasha Seth <[email protected]>
Signed-off-by: Shivansh Arora <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Libraries & Interfaces enhancement Enhancement or improvement to existing feature or request extensions Plugins Priority-High v2.13.0 Issues and PRs related to version 2.13.0 v3.0.0 Issues and PRs related to version 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[opensearch-plugin] Cannot install old patch version of plugins on newer opensearch builds
7 participants