-
Notifications
You must be signed in to change notification settings - Fork 3k
open-api: Build runtime jar for test fixture #11279
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -944,6 +944,9 @@ project(':iceberg-snowflake') { | |
|
|
||
| project(':iceberg-open-api') { | ||
| apply plugin: 'java-test-fixtures' | ||
| apply plugin: 'com.gradleup.shadow' | ||
|
|
||
| build.dependsOn shadowJar | ||
|
|
||
| dependencies { | ||
| testImplementation project(':iceberg-api') | ||
|
|
@@ -967,11 +970,9 @@ project(':iceberg-open-api') { | |
| testFixturesImplementation project(':iceberg-gcp') | ||
| testFixturesImplementation project(':iceberg-azure') | ||
| testFixturesImplementation(libs.hadoop3.common) { | ||
| exclude group: 'log4j' | ||
| exclude group: 'org.slf4j' | ||
| exclude group: 'ch.qos.reload4j' | ||
| exclude group: 'org.apache.avro', module: 'avro' | ||
| exclude group: 'com.fasterxml.woodstox' | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added these because of the error while brining up the runtime jar that class not found. |
||
| exclude group: 'com.google.guava' | ||
| exclude group: 'com.google.protobuf' | ||
| exclude group: 'org.apache.curator' | ||
|
|
@@ -980,7 +981,6 @@ project(':iceberg-open-api') { | |
| exclude group: 'org.apache.hadoop', module: 'hadoop-auth' | ||
| exclude group: 'org.apache.commons', module: 'commons-configuration2' | ||
| exclude group: 'org.apache.hadoop.thirdparty', module: 'hadoop-shaded-protobuf_3_7' | ||
| exclude group: 'org.codehaus.woodstox' | ||
| exclude group: 'org.eclipse.jetty' | ||
| } | ||
| testFixturesImplementation project(path: ':iceberg-bundled-guava', configuration: 'shadow') | ||
|
|
@@ -1014,6 +1014,28 @@ project(':iceberg-open-api') { | |
| recommend.set(true) | ||
| } | ||
| check.dependsOn('validateRESTCatalogSpec') | ||
|
|
||
| shadowJar { | ||
| archiveBaseName.set("iceberg-open-api-test-fixtures-runtime") | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Double check the naming. LGTM. |
||
| archiveClassifier.set(null) | ||
| configurations = [project.configurations.testFixturesRuntimeClasspath] | ||
| from sourceSets.testFixtures.output | ||
| zip64 true | ||
|
|
||
| // include the LICENSE and NOTICE files for the runtime Jar | ||
| from(projectDir) { | ||
| include 'LICENSE' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We're actually packaging up more in this runtime than what's identified in the top-level LICENSE/NOTICE files, so we need to make sure that everything is captured.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have to do this manually or we use the standard tool for this? I don't think we have a standard guidelines for this in "CONTRIBUTING.md". Can we add this?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Used https://github.com/jk1/Gradle-License-Report to generate License and manually updated the notice for them. Please check again.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cc: @jbonofre
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just spot checking the NOTICE, but it doesn't include the Kite notice from the Iceberg NOTICE file. @bryanck had some way of generating the license/notice files that included transitive dependencies (which is required by ASF).
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bryanck: Could you please help me here? I tried the same plugin that you mentioned in your PR here. I used the configuration as Also, We need to add the standard way in "contributing.md" for new users to follow it.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I used the same plugin, but for both the notices and licenses. Also, I appended to the root license and notice files, the root notice has the Kite notice.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ajantha-bhat I can generate them if you want, I created a custom renderer for the plugin. I'm hoping to contribute that at some point so this is automated.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can also try manually appending the root files contents. It only generates
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It can generate both, but I added some logic to my custom renderer to dedupe the notices. |
||
| include 'NOTICE' | ||
| } | ||
|
|
||
| manifest { | ||
| attributes 'Main-Class': 'org.apache.iceberg.rest.RESTCatalogServer' | ||
| } | ||
| } | ||
|
|
||
| jar { | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was an empty jar since no source code. Hence, disabled it. |
||
| enabled = false | ||
| } | ||
| } | ||
|
|
||
| @Memoized | ||
|
|
||
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.
Added because of the warning while brining up the runtime jar.