-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Allow lang-painless maven package to add compile dependencies #11356
Conversation
Signed-off-by: Prudhvi Godithi <[email protected]>
❌ Gradle check result for d82b614: 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? |
Signed-off-by: Prudhvi Godithi <[email protected]>
Compatibility status:Checks if related components are compatible with change b4fa136 Incompatible componentsSkipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/sql.git] |
❌ Gradle check result for e8d4d4a: 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? |
❌ Gradle check result for b4fa136: 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? |
@@ -82,9 +82,16 @@ shadowJar { | |||
} | |||
} | |||
|
|||
tasks.validateNebulaPom.dependsOn tasks.generatePomFileForShadowPublication | |||
// Allowing the task generatePomFileForNebulaPublication to generate the POM file with added compile dependencies. | |||
gradle.taskGraph.whenReady { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prudhvigodithi I don't think we are addressing the root of the problem here, there are multiple publications that conflict (apparently, for no reason):
> Task :modules:lang-painless:publishShadowPublicationToMavenLocal
Multiple publications with coordinates 'org.opensearch.plugin:lang-painless:3.0.0-SNAPSHOT' are published to repository 'mavenLocal'. The publications 'nebula' in project ':modules:lang-painless' and 'shadow' in project ':modules:lang-painless' will overwrite each other!
I am looking why that happens, mind if I push some changes to your pull request?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure @reta please do, I have just focused on the POM generation, which has the problem with the task generatePomFileForShadowPublication
coming from the shadow plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume there is a some issue with shadow plugin with gradle version 8.4, as notice the POM file generated (via generatePomFileForShadowPublication
) also is not in right structure where it has the XML ending value <dependencies/>
, but not the starting.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.opensearch.plugin</groupId>
<artifactId>lang-painless</artifactId>
<version>2.10.0</version>
<name>lang-painless</name>
<description>An easy, safe and fast scripting language for OpenSearch</description>
<inceptionYear>2021</inceptionYear>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<name>OpenSearch</name>
<url>https://github.com/opensearch-project/OpenSearch</url>
</developer>
</developers>
<url>https://github.com/opensearch-project/OpenSearch.git</url>
<scm>
<url>https://github.com/opensearch-project/OpenSearch.git</url>
</scm>
<dependencies/>
</project>
Since generatePomFileForNebulaPublication
already does the POM generation, I have disabled the generatePomFileForShadowPublication
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also @reta I see task publishShadowPublicationToMavenLocal
works on my local.
../../gradlew :modules:lang-painless:publishShadowPublicationToMavenLocal
Picked up JAVA_TOOL_OPTIONS: -Dlog4j2.formatMsgNoLookups=true
> Configure project :
========================= WARNING =========================
Backwards compatibility tests are disabled!
See https://github.com/opensearch-project/OpenSearch/issues/4173
===========================================================
=======================================
OpenSearch Build Hamster says Hello!
Gradle Version : 8.4
OS Info : Mac OS X 13.6 (aarch64)
JDK Version : 11 (Homebrew JDK)
JAVA_HOME : /opt/homebrew/Cellar/openjdk@11/11.0.16.1/libexec/openjdk.jdk/Contents/Home
Random Testing Seed : AD775C78920E6AF4
In FIPS 140 mode : false
=======================================
BUILD SUCCESSFUL in 5s
54 actionable tasks: 6 executed, 3 from cache, 45 up-to-date
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prudhvigodithi the issue is that Shadow
publication does not generate the correct POM file anymore (the dependencies) and Nebula
does not generate the POM we need either (dependencies are but not other elements), I think I found the place where is is happening.
Description
Allow lang-painless maven package to add compile dependencies
Tested with
publishToMavenLocal
../../gradlew :modules:lang-painless:publishToMavenLocal
Related Issues
Resolves #11353
(Part of ~opensearch-project/opensearch-build#4161)
Check List
New functionality includes testing.All tests passNew functionality has been documented.New functionality has javadoc addedCommit changes are listed out in CHANGELOG.md file (See: Changelog)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.