-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Backport 2.x] ZIP publication groupId value is configurable (#4156) … #4733
[Backport 2.x] ZIP publication groupId value is configurable (#4156) … #4733
Conversation
Hi @prudhvigodithi and @reta |
buildSrc/src/test/java/org/opensearch/gradle/pluginzip/PublishTests.java
Show resolved
Hide resolved
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
@@ Coverage Diff @@
## 2.x #4733 +/- ##
===========================================
Coverage 70.62% 70.62%
- Complexity 57126 57398 +272
===========================================
Files 4585 4615 +30
Lines 274526 275861 +1335
Branches 40233 40365 +132
===========================================
+ Hits 193876 194836 +960
- Misses 64403 64794 +391
+ Partials 16247 16231 -16
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Thanks for the PR @lukas-vlcek should we should even backport this #4696 ? @reta WDYT? |
…rch-project#4156) and Further simplification of the ZIP publication implementation (opensearch-project#4360) * This is a backport of opensearch-project#4156 and opensearch-project#4360 to 2.x * opensearch-project#4156 was cherry-picked from 7fe5830 - Resolving conflicts in CHANGELOG.md * opensearch-project#4360 was cherry-picked from ab6849f - Resolving conflicts in CHANGELOG.md There is one noticeable difference, the `project.group` property can be empty in which case it will fall back to default value: `org.opensearch.plugin`. See <opensearch-project#4156 (comment)> for more details. Signed-off-by: Lukáš Vlček <lukas.vlcek@aiven.io>
d221634
to
bd53fca
Compare
@prudhvigodithi absolutely, right after this one I will create a backport |
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Hey just noticed the default groupID even though its added as |
@prudhvigodithi I see only 3.0.0-SNAPSHOT there, the default is only for 2.x |
Ya If you see https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/plugin/opensearch-ml-plugin/2.4.0.0-SNAPSHOT/, I dont see any new zips after this PR is merged, when I test on my local
|
I could confirm that I see the same, the issue seem to be introduced by 7fe5830, before this commit.
But after this commit (the
The
|
I have raised a bug #4756 |
I see the property
@reta please confirm. |
Correct, |
Yes, the I tried to run ad-hoc test with the following config: plugins {
id 'java-gradle-plugin'
id 'opensearch.pluginzip'
}
version='2.0.0.0'
// A bundlePlugin task mockup
tasks.register('bundlePlugin', Zip.class) {
archiveFileName = "sample-plugin-${version}.zip"
destinationDirectory = layout.buildDirectory.dir('distributions')
from layout.projectDirectory.file('sample-plugin-source.txt')
}
allprojects {
group = 'org.opensearch'
}
publishing {
publications {
pluginZip(MavenPublication) { publication ->
// Notice the missing groupId here...
pom {
name = "sample-plugin"
description = "pluginDescription"
}
}
}
} And the ZIP artifact was deployed into % ls -l
total 80
-rw-r--r-- 1 lukas.vlcek staff 508 Oct 12 22:47 sample-plugin-2.0.0.0.pom
-rw-r--r-- 1 lukas.vlcek staff 32 Oct 12 22:47 sample-plugin-2.0.0.0.pom.md5
-rw-r--r-- 1 lukas.vlcek staff 40 Oct 12 22:47 sample-plugin-2.0.0.0.pom.sha1
-rw-r--r-- 1 lukas.vlcek staff 64 Oct 12 22:47 sample-plugin-2.0.0.0.pom.sha256
-rw-r--r-- 1 lukas.vlcek staff 128 Oct 12 22:47 sample-plugin-2.0.0.0.pom.sha512
-rw-r--r-- 1 lukas.vlcek staff 148 Oct 12 22:47 sample-plugin-2.0.0.0.zip
-rw-r--r-- 1 lukas.vlcek staff 32 Oct 12 22:47 sample-plugin-2.0.0.0.zip.md5
-rw-r--r-- 1 lukas.vlcek staff 40 Oct 12 22:47 sample-plugin-2.0.0.0.zip.sha1
-rw-r--r-- 1 lukas.vlcek staff 64 Oct 12 22:47 sample-plugin-2.0.0.0.zip.sha256
-rw-r--r-- 1 lukas.vlcek staff 128 Oct 12 22:47 sample-plugin-2.0.0.0.zip.sha512
% cat sample-plugin-2.0.0.0.pom
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.opensearch</groupId>
<artifactId>sample-plugin</artifactId>
<version>2.0.0.0</version>
<packaging>zip</packaging>
<name>sample-plugin</name>
<description>pluginDescription</description>
</project>
Which I believe is what we need, correct? |
BTW, I will add this ^^ test into our test package, I think it is useful. |
Thanks @lukas-vlcek, the only thing I see now is |
@prudhvigodithi That is odd, because we have tests for this (in 2.x). See the |
@lukas-vlcek with job-scheduler when I commented the line
I suspect this is because of this line
|
@prudhvigodithi @reta @peterzhuamazon See #4772 |
Reflect the change in [PR#4733](opensearch-project/OpenSearch#4733) in the documentation. Signed-off-by: Lukáš Vlček <lukas.vlcek@aiven.io>
…175) Reflect the change in [PR#4733](opensearch-project/OpenSearch#4733) in the documentation. Signed-off-by: Lukáš Vlček <lukas.vlcek@aiven.io> Signed-off-by: Lukáš Vlček <lukas.vlcek@aiven.io>
…and Further simplification of the ZIP publication implementation (#4360)
Description
There is one noticeable difference, the
project.group
property can be empty in which case it will fall back to default value:org.opensearch.plugin
. See #4156 (comment) for more details.Check List
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: Lukáš Vlček lukas.vlcek@aiven.io