GoogleContainerTools / jib-extensions

Apache License 2.0
117 stars 35 forks source link

update jib-core version to 0.22.0 and plugins versions to 3.3.0 #134

Closed mpeddada1 closed 2 years ago

mpeddada1 commented 2 years ago

Running into the following issue with 3.3.0:

Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:3.3.0.
Searched in the following locations:
  - https://repo.maven.apache.org/maven2/gradle/plugin/com/google/cloud/tools/jib-gradle-plugin/3.3.0/jib-gradle-plugin-3.3.0.pom
  - https://plugins.gradle.org/m2/gradle/plugin/com/google/cloud/tools/jib-gradle-plugin/3.3.0/jib-gradle-plugin-3.3.0.pom

Have verified locally that this plugin works fine when 3.2.1 of jib-gradle-plugin is used. Will wait a bit and re-run this test.

mpeddada1 commented 2 years ago

Additionally, running ./gradlew clean :jib-quarkus-extension-gradle:compileJava with 3.3.0 also results in the error seem above.

emmileaf commented 2 years ago

Would it usually take a bit of time for the new releases to get updated in the Maven Repository?

mpeddada1 commented 2 years ago

Hm I was also wondering that. It usually takes a couple of hours to upload. I see that 3.3.0 is available at https://plugins.gradle.org/m2/com/google/cloud/tools/jib/com.google.cloud.tools.jib.gradle.plugin/ and https://plugins.gradle.org/plugin/com.google.cloud.tools.jib but not at https://plugins.gradle.org/m2/gradle/plugin/com/google/cloud/tools/jib-gradle-plugin/

chanseokoh commented 2 years ago

Removing gradle.plugin. works, but no idea why.

-    JIB_GRADLE: 'gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:3.3.0',
+    JIB_GRADLE: 'com.google.cloud.tools:jib-gradle-plugin:3.3.0',
mpeddada1 commented 2 years ago

oh good observation, thanks Chanseok! Will try with removing the gradle.plugin. Interesting that it worked fine in the past- I wonder what changed.

elefeint commented 2 years ago

Gradle in core Jib got upgraded from 6.0.1 to 6.6.1 in https://github.com/GoogleContainerTools/jib/pull/3670 . Could this have caused publishing to be done without the prefix?

mpeddada1 commented 2 years ago

That does seem like a likely cause! Which also reminds me, maybe we should upgrade the gradle version here to be consistent with the main Jib repo?

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

elefeint commented 2 years ago

Yeah, it would make sense to have consistent gradle versions. Sorry, I did not realize this would be a breaking change when accepting the gradle version upgrade. Will users have to change the way they configure jib?

mpeddada1 commented 2 years ago

Afaik it may not have a major impact on how jib is configured. Our README instructions specify jib to applied the following way: plugins { id 'com.google.cloud.tools.jib' version '3.3.0'} and our examples also follow the same pattern. Additionally, JIB_GRADLE is a compile-time dependency in jib-extensions and is only used to access certain jib-gradle classes in the extensions where it is applied.

mpeddada1 commented 2 years ago

Oh actually looking at @chanseokoh's comment, there may be a couple of cases: https://github.com/GoogleContainerTools/jib/issues/3719#issuecomment-1234595127. But the good news is that com.google.cloud.tools:jib-gradle-plugin works.

chanseokoh commented 2 years ago

It will be pretty rare, as it mostly for those who want to use the jib-gradle-plugin JAR as a library (for whatever weird reasons) rather than using the Jib plugin in a Gradle build. It's not the use case we really support.

elefeint commented 2 years ago

Sounds good; not breaking the documented usecases then.