Skip to content

Conversation

@suztomo
Copy link
Member

@suztomo suztomo commented Jun 23, 2025

Our new release job script specifies profiles that might not exist in all Java projects in our release pipeline. The requireProfileIdsExist enforcer rule fails in that case.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.5.0:enforce (enforce-valid-profile) on project google-cloud-bigtable: 
[ERROR] Rule 0: org.apache.maven.enforcer.rules.RequireProfileIdsExist failed with message:
[ERROR] The requested profile doesn't exist: release-staging-repository

Therefore, let's disable the requireProfileIdsExist rule during the release. This change created a profile that does that:

    <profile>
      <id>enable-enforcer-rules</id>
      <activation>
        <property>
          <!-- By default, Maven runs the enforcer rules. The shared release script
            may pass profile name that doesn't exist in this project. Let's ignore
            the enforcer rule (requireProfileIdsExist) in that case, leveraging
            the presence of the performRelease property. -->
          <name>!performRelease</name>
        </property>
...

Our release job specifies profiles that may or may not exist in
all Java projects in our release pipeline. The
requireProfileIdsExist enforcer rule fails in that case.

Therefore, let's remove the requireProfileIdsExist rule.
@suztomo suztomo requested review from a team as code owners June 23, 2025 01:33
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: bigtable Issues related to the googleapis/java-bigtable API. labels Jun 23, 2025
mpeddada1
mpeddada1 previously approved these changes Jun 23, 2025
@suztomo
Copy link
Member Author

suztomo commented Jun 23, 2025

Somehow the bot added a commit 4efc30b that touches Java code. Now it requires api-bigtable team's review.

@mutianf
Copy link
Contributor

mutianf commented Jun 23, 2025

I'm a little concerned about removing this check. This is to prevent false positives when someone mistyped a profile name. Are there alternatives?

@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Jun 23, 2025
@suztomo
Copy link
Member Author

suztomo commented Jun 23, 2025

@mutianf Updated it to use a profile that's activated by default. PTAL.

@mutianf mutianf added the automerge Merge the pull request once unit tests and other checks pass. label Jun 23, 2025
@gcf-merge-on-green gcf-merge-on-green bot merged commit 3424cb5 into main Jun 23, 2025
36 of 37 checks passed
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Jun 23, 2025
@gcf-merge-on-green gcf-merge-on-green bot deleted the profile_flexibility branch June 23, 2025 15:52
nicholsl pushed a commit to nicholsl/java-bigtable that referenced this pull request Jul 16, 2025
Our new release job script specifies profiles that might not exist in all Java projects in our release pipeline. The requireProfileIdsExist enforcer rule fails in that case.

```
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.5.0:enforce (enforce-valid-profile) on project google-cloud-bigtable: 
[ERROR] Rule 0: org.apache.maven.enforcer.rules.RequireProfileIdsExist failed with message:
[ERROR] The requested profile doesn't exist: release-staging-repository
```

Therefore, let's disable the requireProfileIdsExist rule during the release. This change created a profile that does that:

```
    <profile>
      <id>enable-enforcer-rules</id>
      <activation>
        <property>
          <!-- By default, Maven runs the enforcer rules. The shared release script
            may pass profile name that doesn't exist in this project. Let's ignore
            the enforcer rule (requireProfileIdsExist) in that case, leveraging
            the presence of the performRelease property. -->
          <name>!performRelease</name>
        </property>
...
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigtable Issues related to the googleapis/java-bigtable API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants