GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||
GeezerVison is showing github.com — ci: split enforcer into fast PR metadata check and release banDuplicateClasses check by lqiu96 · Pull Request #14142 · googleapis/google-cloud-java Conversation
|
| </extension> | ||
| </extensions> | ||
| <plugins> | ||
| <!-- Temporary enforcer configuration override until a new version of google-cloud-shared-config is released to Maven Central. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This is probably a separate issue. java-shared-config is in the same repo now, other modules should be able to use the SNAPSHOT version of java-shared-config.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
From an older change:
| <!-- Do not depend on the version in this monorepo. It causes the publication order problem. --> |
I think this probably requires a bit larger of an effort the fix
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I see. Auth makes sense because it needs to be published first and its group id com.google.auth is different from shared-config's group id com.google.cloud. But we can probably change grpc-gcp to use snapshot version of shared-config because it has the same group id.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
updated
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
) ## Summary Fixes `No rules are configured` errors encountered in the `ban-duplicate-classes` workflow on POM-only modules. ## Background In #14142, the enforcer was split into: 1. `enforce` (fast metadata rules for PRs) 2. `enforce-banned-duplicate-classes` (runs `banDuplicateClasses` on release branches via `mvn -B -ntp enforcer:enforce@enforce-banned-duplicate-classes -T 1C`) When invoking a specific Maven execution ID across a multi-module reactor (`plugin:goal@executionId`), Maven creates an empty ad-hoc execution for any module that does not define that execution ID. Because `maven-enforcer-plugin` requires at least one rule (or `skip=true`), this caused the `ban-duplicate-classes` job to fail immediately on: ``` [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.6.3:enforce (enforce-banned-duplicate-classes) on project native-image-shared-config: No rules are configured. Use the skip flag if you want to disable execution. ``` ## Changes Added an explicit `<execution>` for `<id>enforce-banned-duplicate-classes</id>` with `<skip>true</skip>` to: - `java-shared-config/native-image-shared-config/pom.xml`: configuration-only parent POM - `java-shared-config/pom.xml`: aggregator parent POM - `java-cloud-bom/tests/dependency-convergence/pom.xml`: standalone BOM test module (preserving its upper-bound deps check in the `enforce` execution) ## Verification - Verified `mvn -B -ntp enforcer:enforce@enforce-banned-duplicate-classes` passes in `java-shared-config`. - Verified `mvn -B -ntp enforcer:enforce@enforce` passes in `java-shared-config`. - Verified `mvn -B -ntp enforcer:enforce@enforce-banned-duplicate-classes` passes in `java-cloud-bom`. - Verified `mvn -B -ntp enforcer:enforce@enforce` passes in `java-cloud-bom`.
…and gax-bom In googleapis#14142 and googleapis#14272, the enforcer was split into a fast PR check (enforce) and a release check (enforce-banned-duplicate-classes). Modules without this execution ID or rules fail with "No rules are configured". - For first-party-dependencies: Update parent to the in-repo google-cloud-shared-config (1.22.0-SNAPSHOT) with relativePath and {x-version-update} tag, matching the configuration in sdk-platform-java-config and grpc-gcp-java. - For gax-bom: Skip enforce-banned-duplicate-classes because it inherits a released version of google-cloud-shared-config (1.17.0) from Central to prevent cross-groupId (com.google.api vs com.google.cloud) publication-ordering issues.
…and gax-bom (#14492) ## Summary Fixes `No rules are configured` errors encountered in the `ban-duplicate-classes` workflow on `first-party-dependencies` and `gax-bom` (e.g. in release PR #14491). ## Background In #14142 and #14272, the enforcer plugin was split into: 1. `enforce` (fast metadata rules for PRs) 2. `enforce-banned-duplicate-classes` (runs `banDuplicateClasses` on release branches via `mvn -B -ntp enforcer:enforce@enforce-banned-duplicate-classes -T 1C`) When invoking a specific Maven execution ID across a multi-module reactor (`plugin:goal@executionId`), Maven creates an empty ad-hoc execution for any module that does not define that execution ID. Because `maven-enforcer-plugin` requires at least one rule (or `skip=true`), this caused the `ban-duplicate-classes` job to fail on: ``` [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.5.0:enforce (enforce-banned-duplicate-classes) on project first-party-dependencies: No rules are configured. Use the skip flag if you want to disable execution. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.5.0:enforce (enforce-banned-duplicate-classes) on project gax-bom: No rules are configured. Use the skip flag if you want to disable execution. ``` ## Changes - **`first-party-dependencies`**: Updates the parent to the in-repo `google-cloud-shared-config` (`1.22.0-SNAPSHOT`) with `relativePath` and the `{x-version-update}` tag. Both share `groupId: com.google.cloud` and are staged/released together, matching the pattern in `sdk-platform-java-config` and `grpc-gcp-java`. - **`gax-bom`**: Adds an explicit skip for `enforce-banned-duplicate-classes`. `gax-bom` has `groupId: com.google.api` (different from `com.google.cloud`) and retains a released `google-cloud-shared-config` parent from Central to avoid cross-groupId publication-ordering cycles in Sonatype staging. ## Verification - Verified `mvn enforcer:enforce@enforce-banned-duplicate-classes -pl :gax-bom,:first-party-dependencies` passes. - Verified `mvn enforcer:enforce@enforce -pl :gax-bom,:first-party-dependencies` passes.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.