Skip to content

Commit 3f9823a

Browse files
authored
Merge branch 'GoogleCloudPlatform:main' into main
2 parents ab1f694 + e32ffda commit 3f9823a

2,608 files changed

Lines changed: 162416 additions & 19109 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.ci/containers/README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,14 @@ The images are named according to their use. We have a small number of images th
1414
Before you begin, set up Docker (including configuring it to [authenticate with gcloud](https://cloud.google.com/container-registry/docs/advanced-authentication#gcloud-helper)).
1515

1616
1. Make changes to the Dockerfile
17-
2. Build the image with the `testing` tag:
17+
2. Build & push the image with the `testing` tag:
1818
```bash
19-
sudo docker build . --tag gcr.io/graphite-docker-images/bash-plus:testing
19+
gcloud builds submit . \
20+
--tag gcr.io/graphite-docker-images/<target-image>:testing \
21+
--project graphite-docker-images
2022
```
21-
3. Push the image:
22-
```bash
23-
sudo docker push gcr.io/graphite-docker-images/bash-plus:testing
24-
```
25-
4. Update cloudbuild yaml files to reference the image you just pushed by adding the `:testing` suffix
26-
5. Update files that will cause the cloudbuild yaml changes (and therefore your changes) to be exercised
23+
3. Update cloudbuild yaml files to reference the image you just pushed by adding the `:testing` suffix
24+
4. Update files that will cause the cloudbuild yaml changes (and therefore your changes) to be exercised
2725
- Tip: Modifying `mmv1/third_party/terraform/services/compute/metadata.go.tmpl` will trigger builds for TPG, TPGB, and TGC.
28-
6. Create a PR with these changes.
29-
7. Verify that the cloudbuild steps that should use your testing image _are_ using your testing image (in the Execution Details tab for the step.)
26+
5. Create a PR with these changes.
27+
6. Verify that the cloudbuild steps that should use your testing image _are_ using your testing image (in the Execution Details tab for the step.)

.ci/containers/build-environment/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.23-bullseye AS builder
1+
FROM golang:1.25-trixie AS builder
22

33
# Set working directory
44
WORKDIR /app
@@ -17,7 +17,7 @@ RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 1777 "$GOPATH"
1717
WORKDIR $GOPATH
1818

1919
# terraform binary used by tfv/tgc
20-
COPY --from=hashicorp/terraform:1.11.0 /bin/terraform /bin/terraform
20+
COPY --from=hashicorp/terraform:1.14.3 /bin/terraform /bin/terraform
2121

2222
SHELL ["/bin/bash", "-c"]
2323

.ci/containers/go-plus/Dockerfile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Stage 1: Download go module cache for builds
2-
FROM golang:1.23-bullseye AS builder
2+
FROM golang:1.25-trixie AS builder
33
ENV GOCACHE=/go/cache
44

55
RUN apt-get update && apt-get install -y unzip
@@ -12,7 +12,7 @@ WORKDIR /app1/magic-modules-main/.ci/magician
1212
RUN go build -o /dev/null .
1313

1414
# Stage 2: Creating the final image
15-
FROM golang:1.23-bullseye
15+
FROM golang:1.25-trixie
1616
SHELL ["/bin/bash", "-c"]
1717
ENV GOCACHE=/go/cache
1818

@@ -21,15 +21,15 @@ COPY --from=builder /go/pkg/mod /go/pkg/mod
2121
COPY --from=builder /go/cache /go/cache
2222

2323
RUN apt-get update && \
24-
apt-get install -y git jq unzip zip parallel curl && \
25-
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
26-
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && \
24+
apt-get install -y git jq unzip zip parallel apt-transport-https ca-certificates gnupg curl && \
25+
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
26+
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg && \
2727
apt-get update -y && \
28-
apt-get install google-cloud-sdk -y && \
28+
apt-get install google-cloud-cli -y && \
2929
apt-get clean && \
3030
rm -rf /var/lib/apt/lists/*
3131

32-
RUN wget https://releases.hashicorp.com/terraform/1.11.0/terraform_1.11.0_linux_amd64.zip \
33-
&& unzip terraform_1.11.0_linux_amd64.zip \
34-
&& rm terraform_1.11.0_linux_amd64.zip \
35-
&& mv ./terraform /bin/terraform
32+
RUN wget https://releases.hashicorp.com/terraform/1.14.3/terraform_1.14.3_linux_amd64.zip \
33+
&& unzip terraform_1.14.3_linux_amd64.zip \
34+
&& rm terraform_1.14.3_linux_amd64.zip \
35+
&& mv ./terraform /bin/terraform

.ci/gcb-contributor-membership-checker.yml

Lines changed: 0 additions & 78 deletions
This file was deleted.

.ci/gcb-ingest-test-data.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
steps:
3+
- name: 'gcr.io/graphite-docker-images/go-plus'
4+
id: collect-nightly-test-status
5+
entrypoint: '/workspace/.ci/scripts/go-plus/magician/exec.sh'
6+
secretEnv: ["TEAMCITY_TOKEN"]
7+
args:
8+
- 'collect-nightly-test-status'
9+
- $_CUSTOM_DATE
10+
11+
timeout: 3600s
12+
options:
13+
machineType: 'N1_HIGHCPU_32'
14+
15+
logsBucket: 'gs://cloudbuild-ingest-test-data-logs'
16+
availableSecrets:
17+
secretManager:
18+
- versionName: projects/673497134629/secrets/teamcity-token/versions/latest
19+
env: TEAMCITY_TOKEN

.ci/gcb-pr-downstream-generation-and-test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ steps:
265265
- $BUILD_ID
266266
- $PROJECT_ID
267267
- "23" # Build step
268+
- "true"
268269

269270
- name: 'gcr.io/graphite-docker-images/go-plus'
270271
entrypoint: '/workspace/.ci/scripts/go-plus/magician/exec.sh'

.ci/gcb-test-failure-ticket.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
11
---
22
steps:
3-
- name: 'gcr.io/graphite-docker-images/go-plus'
4-
id: collect-nightly-test-status
5-
entrypoint: '/workspace/.ci/scripts/go-plus/magician/exec.sh'
6-
secretEnv: ["TEAMCITY_TOKEN"]
7-
args:
8-
- 'collect-nightly-test-status'
9-
- $_CUSTOM_DATE
103
- name: 'gcr.io/graphite-docker-images/go-plus'
114
id: create-test-failure-ticket
125
entrypoint: '/workspace/.ci/scripts/go-plus/magician/exec.sh'
136
secretEnv: ["GITHUB_TOKEN"]
14-
waitFor: ["collect-nightly-test-status"]
157
args:
168
- 'create-test-failure-ticket'
17-
- name: 'ubuntu'
18-
args: ['sleep', '120']
199
- name: 'gcr.io/graphite-docker-images/go-plus'
2010
id: manage-test-failure-ticket
2111
entrypoint: '/workspace/.ci/scripts/go-plus/magician/exec.sh'
@@ -31,7 +21,5 @@ options:
3121
logsBucket: 'gs://cloudbuild-test-failure-ticket-logs'
3222
availableSecrets:
3323
secretManager:
34-
- versionName: projects/673497134629/secrets/teamcity-token/versions/latest
35-
env: TEAMCITY_TOKEN
3624
- versionName: projects/673497134629/secrets/github-classic--repo-workflow/versions/latest
3725
env: GITHUB_TOKEN

.ci/infra/terraform/README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Prerequisites:
1212
- A BeyondCorp subscription on the organization
1313

1414
After applying this configuration:
15-
- (Internal only) Enable stubbed calls for GKE MultiCloud resources
16-
- (Internal only) Verify ownership of `hashicorptest.com` for new service account
15+
- (Internal setup) Enable stubbed calls for GKE MultiCloud resources
16+
- (Internal setup) Verify ownership of `hashicorptest.com` for new service account
1717
- Enable Media CDN
1818
- Enable Access Boundary permissions
1919
- Enable BigQuery Table IAM conditions
@@ -48,9 +48,10 @@ After applying this configuration:
4848
- Enroll in Cloud Armor Managed Protection Plus tier
4949
- Add Cloud Identity Premium Plan to the Google Workspace domain
5050
- Perform the Privileged Access Manager set-up https://pantheon.corp.google.com/iam-admin/pam/setup
51-
- (Org only) Enroll the org in the Premium tier of Security Control Center
5251
- Upload a model with the name `tf-static-1` to the Vertex AI model registry
5352
- This should only be necessary until uploading new models is supported in the provider.
53+
- (Org only) Enroll the org in the Premium tier of Security Control Center
54+
- (Org only) Enable Compliance Manager https://cloud.google.com/security-command-center/docs/compliance-manager-enable
5455
5556
Quotas that will need to be adjusted to support all tests:
5657
- Project quota for the new service account
@@ -74,3 +75,5 @@ Quotas that will need to be adjusted to support all tests:
7475
- compute.googleapis.com/n2_cpus (us-central1) to 36+
7576
- VMware Engine standard 72 vCPUs nodes per region - southamerica-east1 to 21
7677
- logging.googleapis.com/log_buckets_count to 200
78+
- "Reasoning engine write requests per minute" for us-central1 to 20+
79+
- aiplatform.googleapis.com/in_use_customer_managed_encryption_keys to 5+

.ci/infra/terraform/main.tf

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,18 @@ resource "google_organization_iam_member" "sa_principal_access_boundary_admin" {
171171
member = google_service_account.sa.member
172172
}
173173

174+
resource "google_organization_iam_member" "dlp_admin" {
175+
org_id = data.google_organization.org.org_id
176+
role = "roles/dlp.admin"
177+
member = google_project_service_identity.dlp_sa.member
178+
}
179+
180+
resource "google_organization_iam_member" "dlp_org_driver" {
181+
org_id = data.google_organization.org.org_id
182+
role = "roles/dlp.orgdriver"
183+
member = google_project_service_identity.dlp_sa.member
184+
}
185+
174186
resource "google_billing_account_iam_member" "sa_master_billing_admin" {
175187
billing_account_id = data.google_billing_account.master_acct.id
176188
role = "roles/billing.admin"
@@ -223,6 +235,7 @@ module "project-services" {
223235
"binaryauthorization.googleapis.com",
224236
"blockchainnodeengine.googleapis.com",
225237
"certificatemanager.googleapis.com",
238+
"ces.googleapis.com",
226239
"chronicle.googleapis.com",
227240
"cloudaicompanion.googleapis.com",
228241
"cloudapis.googleapis.com",
@@ -236,6 +249,7 @@ module "project-services" {
236249
"cloudquotas.googleapis.com",
237250
"cloudresourcemanager.googleapis.com",
238251
"cloudscheduler.googleapis.com",
252+
"cloudsecuritycompliance.googleapis.com",
239253
"cloudtasks.googleapis.com",
240254
"cloudtrace.googleapis.com",
241255
"composer.googleapis.com",
@@ -281,6 +295,7 @@ module "project-services" {
281295
"firebaseremoteconfig.googleapis.com",
282296
"firebaserules.googleapis.com",
283297
"firebasestorage.googleapis.com",
298+
"firebasevertexai.googleapis.com",
284299
"firestore.googleapis.com",
285300
"firestorekeyvisualizer.googleapis.com",
286301
"gkebackup.googleapis.com",
@@ -306,6 +321,7 @@ module "project-services" {
306321
"migrationcenter.googleapis.com",
307322
"ml.googleapis.com",
308323
"mobilecrashreporting.googleapis.com",
324+
"modelarmor.googleapis.com",
309325
"monitoring.googleapis.com",
310326
"multiclustermetering.googleapis.com",
311327
"netapp.googleapis.com",
@@ -314,6 +330,7 @@ module "project-services" {
314330
"networksecurity.googleapis.com",
315331
"networkservices.googleapis.com",
316332
"notebooks.googleapis.com",
333+
"observability.googleapis.com",
317334
"orgpolicy.googleapis.com",
318335
"osconfig.googleapis.com",
319336
"oslogin.googleapis.com",
@@ -333,6 +350,7 @@ module "project-services" {
333350
"resourceviews.googleapis.com",
334351
"run.googleapis.com",
335352
"runtimeconfig.googleapis.com",
353+
"saasservicemgmt.googleapis.com",
336354
"secretmanager.googleapis.com",
337355
"securesourcemanager.googleapis.com",
338356
"securetoken.googleapis.com",
@@ -418,6 +436,14 @@ resource "google_project_service_identity" "parametermanager_sa" {
418436
service = "parametermanager.googleapis.com"
419437
}
420438

439+
resource "google_project_service_identity" "dlp_sa" {
440+
provider = google-beta
441+
depends_on = [module.project-services]
442+
443+
project = google_project.proj.project_id
444+
service = "dlp.googleapis.com"
445+
}
446+
421447
# TestAccComposerEnvironment_fixPyPiPackages
422448
# TestAccComposerEnvironmentComposer2_private
423449
# TestAccComposerEnvironment_withEncryptionConfigComposer1

.ci/magician/cloudbuild/community.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ func (cb *Client) ApproveDownstreamGenAndTest(prNumber, commitSha string) error
3030
}
3131

3232
if buildId == "" {
33-
return fmt.Errorf("Failed to find pending build for PR %s", prNumber)
33+
fmt.Printf("WARNING: Failed to find pending build for PR %s\nThis build may have been approved already.\n", prNumber)
34+
return nil
3435
}
3536

3637
err = approveBuild(PROJECT_ID, buildId)

0 commit comments

Comments
 (0)