Skip to content
This repository was archived by the owner on May 8, 2026. It is now read-only.

ci: allow nonexistent profile in google-cloud-bigtable - #2611

Merged
gcf-merge-on-green[bot] merged 3 commits into
mainfrom
profile_flexibility
Jun 23, 2025
Merged

ci: allow nonexistent profile in google-cloud-bigtable#2611
gcf-merge-on-green[bot] merged 3 commits into
mainfrom
profile_flexibility

Conversation

@suztomo

@suztomo suztomo commented Jun 23, 2025

Copy link
Copy Markdown
Member

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 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

suztomo commented Jun 23, 2025

Copy link
Copy Markdown
Member Author

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

@mutianf

mutianf commented Jun 23, 2025

Copy link
Copy Markdown
Contributor

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

suztomo commented Jun 23, 2025

Copy link
Copy Markdown
Member Author

@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 subscribe to this conversation on GitHub. Already have an account? Sign in.

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