Skip to content

Commit b5e9aeb

Browse files
authored
Merge branch 'main' into fix-testbench-localhost-hang
2 parents 2e2dc00 + e1e4059 commit b5e9aeb

7 files changed

Lines changed: 39 additions & 29 deletions

File tree

.github/workflows/librarian_generation_check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
name: Librarian generate diff check on pull requests
14+
name: Librarian - Generate diff check on pull requests
1515
on:
1616
pull_request:
1717

.github/workflows/showcase-version-check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: Showcase Version Check
15+
name: Librarian - Showcase Version Check
1616

1717
on:
1818
schedule:

.github/workflows/update_librarian_googleapis.yaml

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: Update librarian googleapis commitish
15+
name: Librarian - Update googleapis commitish and generate all
1616
on:
1717
schedule:
1818
- cron: '0 3 * * *' # Run once a day at 3:00 AM UTC
@@ -85,6 +85,7 @@ jobs:
8585
echo "has_changes=true" >> $GITHUB_OUTPUT
8686
fi
8787
- name: Install protoc
88+
if: steps.detect_librarian.outputs.has_changes == 'true'
8889
run: |
8990
set -e
9091
VERSION="33.2"
@@ -93,42 +94,37 @@ jobs:
9394
sudo unzip -o /tmp/protoc.zip
9495
protoc --version
9596
- uses: actions/setup-java@v4
97+
if: steps.detect_librarian.outputs.has_changes == 'true'
9698
with:
9799
java-version: "17"
98100
distribution: "temurin"
99101
cache: "maven"
100102
- name: Verify Java and Maven installation
103+
if: steps.detect_librarian.outputs.has_changes == 'true'
101104
run: |
102105
java -version
103106
if ! command -v mvn &> /dev/null; then
104107
sudo apt-get update && sudo apt-get install -y maven
105108
fi
106109
mvn -version
107110
- uses: actions/setup-python@v5
111+
if: steps.detect_librarian.outputs.has_changes == 'true'
108112
with:
109113
python-version: "3.12"
110114
cache: 'pip'
111115
- name: Run librarian install
116+
if: steps.detect_librarian.outputs.has_changes == 'true'
112117
run: |
113118
go run github.com/googleapis/librarian/cmd/librarian@latest install
114119
echo "$HOME/java_tools/bin" >> $GITHUB_PATH
115120
env:
116121
PYTHONPATH: ${{ github.workspace }}/sdk-platform-java/hermetic_build/library_generation/owlbot
117122
- name: Generate Libraries
118123
if: steps.detect_librarian.outputs.has_changes == 'true'
119-
id: generate
120124
run: |
121125
go run github.com/googleapis/librarian/cmd/librarian@latest generate --all
122-
git add .
123-
changed_files=$(git diff --cached --name-only)
124-
if [[ "${changed_files}" == "" ]]; then
125-
echo "has_changes=false" >> $GITHUB_OUTPUT
126-
echo "No changes in libraries"
127-
else
128-
echo "has_changes=true" >> $GITHUB_OUTPUT
129-
fi
130126
- name: Commit and Create PR
131-
if: steps.detect_librarian.outputs.has_changes == 'true' || steps.generate.outputs.has_changes == 'true'
127+
if: steps.detect_librarian.outputs.has_changes == 'true'
132128
env:
133129
GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }}
134130
PR_TITLE: "chore: update googleapis commitish to ${{ steps.commit.outputs.short_commit }}"
@@ -139,7 +135,7 @@ jobs:
139135
if [ "${{ github.event_name }}" = "pull_request" ]; then
140136
echo "=== PR Test: DRY RUN MODE ACTIVE ==="
141137
echo "Would have checked out branch: update-librarian-googleapis-main"
142-
echo "Would have committed with title: $PR_TITLE"
138+
echo "Would have committed configs with title: $PR_TITLE"
143139
echo "Would have pushed branch and created PR."
144140
exit 0
145141
fi
@@ -153,8 +149,22 @@ jobs:
153149
# Create and switch to the branch (force checkout -B to discard any local state on this branch name if it existed)
154150
git checkout -B "${current_branch}"
155151
156-
# Commit the changes (they are already staged by the Detect Changes step!)
157-
git commit -m "${PR_TITLE}"
152+
# 1. Commit Config Changes
153+
# Ensure they are staged
154+
git add librarian.yaml generation_config.yaml
155+
if ! git diff --cached --quiet; then
156+
git commit -m "${PR_TITLE}"
157+
else
158+
echo "No config changes to commit"
159+
fi
160+
161+
# 2. Commit Generated Code
162+
git add .
163+
if ! git diff --cached --quiet; then
164+
git commit -m "chore: generate libraries"
165+
else
166+
echo "No generated code changes to commit"
167+
fi
158168
159169
# Push to remote (force push to overwrite any stale branch on remote)
160170
git remote add remote_repo https://cloud-java-bot:"${GH_TOKEN}@github.com/${{ github.repository }}.git" || git remote set-url remote_repo https://cloud-java-bot:"${GH_TOKEN}@github.com/${{ github.repository }}.git"

generation_config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1442,7 +1442,7 @@ libraries:
14421442
GAPICs:
14431443
- proto_path: google/iam/admin/v1
14441444
- api_shortname: iam-policy
1445-
name_pretty: IAM
1445+
name_pretty: Cloud IAM Policy
14461446
product_documentation: n/a
14471447
api_description: n/a
14481448
release_level: stable

java-iam-policy/.repo-metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"api_shortname": "iam-policy",
3-
"name_pretty": "Google Cloud IAM Policy",
3+
"name_pretty": "Cloud IAM Policy",
44
"product_documentation": "n/a",
55
"api_description": "n/a",
66
"client_documentation": "https://cloud.google.com/java/docs/reference/proto-google-iam-v1/latest/history",

java-iam-policy/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Google IAM Client for Java
1+
# Google Cloud IAM Policy Client for Java
22

3-
Java idiomatic client for [IAM][product-docs].
3+
Java idiomatic client for [Cloud IAM Policy][product-docs].
44

55
[![Maven][maven-version-image]][maven-version-link]
66
![Stability][stability-image]
@@ -64,14 +64,14 @@ See the [Authentication][authentication] section in the base directory's README.
6464

6565
## Authorization
6666

67-
The client application making API calls must be granted [authorization scopes][auth-scopes] required for the desired IAM APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the IAM API calls.
67+
The client application making API calls must be granted [authorization scopes][auth-scopes] required for the desired Cloud IAM Policy APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Cloud IAM Policy API calls.
6868

6969
## Getting Started
7070

7171
### Prerequisites
7272

73-
You will need a [Google Cloud Platform Console][developer-console] project with the IAM [API enabled][enable-api].
74-
You will need to [enable billing][enable-billing] to use Google IAM.
73+
You will need a [Google Cloud Platform Console][developer-console] project with the Cloud IAM Policy [API enabled][enable-api].
74+
You will need to [enable billing][enable-billing] to use Google Cloud IAM Policy.
7575
[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by
7676
[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line:
7777
`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`.
@@ -81,13 +81,13 @@ You will need to [enable billing][enable-billing] to use Google IAM.
8181
You'll need to obtain the `google-iam-policy` library. See the [Quickstart](#quickstart) section
8282
to add `google-iam-policy` as a dependency in your code.
8383

84-
## About IAM
84+
## About Cloud IAM Policy
8585

8686

87-
[IAM][product-docs] n/a
87+
[Cloud IAM Policy][product-docs] n/a
8888

89-
See the [IAM client library docs][javadocs] to learn how to
90-
use this IAM Client Library.
89+
See the [Cloud IAM Policy client library docs][javadocs] to learn how to
90+
use this Cloud IAM Policy Client Library.
9191

9292

9393

@@ -100,7 +100,7 @@ To get help, follow the instructions in the [shared Troubleshooting document][tr
100100

101101
## Transport
102102

103-
IAM uses both gRPC and HTTP/JSON for the transport layer.
103+
Cloud IAM Policy uses both gRPC and HTTP/JSON for the transport layer.
104104

105105
## Supported Java Versions
106106

librarian.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2146,7 +2146,7 @@ libraries:
21462146
- google-iam-policy
21472147
- proto-google-iam-v1
21482148
released_version: 1.90.0
2149-
name_pretty_override: IAM
2149+
name_pretty_override: Cloud IAM Policy
21502150
product_documentation_override: n/a
21512151
- name: iamcredentials
21522152
version: 2.93.0

0 commit comments

Comments
 (0)