Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
efc994a
chore: update go to 1.25
sofisl Mar 5, 2026
434d4b8
chore: pin nock and return kaniko project executor to previous state
sofisl Mar 6, 2026
3dbff4c
update ingress settings
sofisl Mar 6, 2026
d173f6e
chore: fix syncpack and try to fix issue with glcoud deployment
sofisl Mar 6, 2026
5c88e19
specify syncpack
sofisl Mar 6, 2026
abbd5eb
remove syncpack check
sofisl Mar 6, 2026
fb2e32a
Remove 'only' from cloud functions test suite
sofisl Mar 9, 2026
740b8c6
re-add syncpack
sofisl Mar 9, 2026
3eaaae2
revert all the package.json fixes
sofisl Mar 9, 2026
9f01780
chore: revert all the package.jsons
sofisl Mar 9, 2026
06da790
chore: update nock
sofisl Mar 9, 2026
cced820
revert changes to syncpack
sofisl Mar 9, 2026
bdee41e
run lint
sofisl Mar 9, 2026
8bb2e1f
Increase timeout for system tests
sofisl Mar 9, 2026
566da68
chore: only test
sofisl Mar 10, 2026
e96b7e2
update gcx
sofisl Mar 10, 2026
aa3152c
retry
sofisl Mar 10, 2026
09fd126
retry
sofisl Mar 10, 2026
e064662
retry
sofisl Mar 11, 2026
519186c
chore: get url dynamically
sofisl Mar 11, 2026
b77c157
add bucket
sofisl Mar 11, 2026
3f3fc20
retry
sofisl Mar 11, 2026
0680423
rerun tests
sofisl Mar 11, 2026
016e7d0
retry
sofisl Mar 11, 2026
8664bcc
remove bucket name
sofisl Mar 11, 2026
6446ef8
chore: add fixes for gcp metadata
sofisl Mar 11, 2026
a0a91e4
Increase timeout for system tests
sofisl Mar 11, 2026
c694556
test: replace gcx with gcloud CLI in system tests to avoid 403 Forbidden
sofisl Mar 11, 2026
108a59c
chore: remove unused gcx dependency
sofisl Mar 11, 2026
31959d2
ci: fix gcloud path in Dockerfile
sofisl Mar 11, 2026
1331d05
ci: improve gcloud install and add python symlink in Dockerfile
sofisl Mar 11, 2026
4ca24d1
test: add defensive logging for gcloud path in system tests
sofisl Mar 11, 2026
e0a5ca9
ignore tests while in dev
sofisl Mar 11, 2026
678c129
update cloudbuild
sofisl Mar 12, 2026
a1c8d0e
retry
sofisl Mar 12, 2026
35b20a5
retry yaml
sofisl Mar 12, 2026
d176538
retry
sofisl Mar 12, 2026
1f033f5
retry
sofisl Mar 12, 2026
6f926eb
rerun system tests
sofisl Mar 12, 2026
175e34c
chore: cleanup PR
sofisl Mar 12, 2026
0fb4a2f
chore: revert package.json
sofisl Mar 12, 2026
bbe0df5
retry cloudbuild credentials
sofisl Mar 12, 2026
0b0e017
run tests
sofisl Mar 12, 2026
1a0a2a7
run tests
sofisl Mar 12, 2026
828d2e5
chore: retry
sofisl Mar 12, 2026
7fb6caf
chore: fix unit and sytsem tests
sofisl Mar 12, 2026
be22cf6
run tests
sofisl Mar 12, 2026
fd00d90
run tests
sofisl Mar 12, 2026
1c45c49
chore: fix system tests
sofisl Mar 12, 2026
a3140ab
retry issue with cloudbuild yaml
sofisl Mar 12, 2026
ac905cf
retry reverting gapic showcase issues
sofisl Mar 12, 2026
aa8edd4
revert all showcase changes
sofisl Mar 12, 2026
86cc0f9
revert gapic showcase
sofisl Mar 12, 2026
bc0257a
fix system tests
sofisl Mar 12, 2026
bad37dc
chore: fix triggers
sofisl Mar 12, 2026
cf7dc3b
revert changs to showcase server
sofisl Mar 12, 2026
9a7aaf2
update go version
sofisl Mar 12, 2026
fe44188
Update cloudbuild.yaml
sofisl Mar 12, 2026
41247c3
Update cloudbuild.yaml
sofisl Mar 12, 2026
a6e03bf
update cloudbuild.yaml
sofisl Mar 12, 2026
aabb79e
update cloudbuild to build dockerfile
sofisl Mar 12, 2026
ea8b098
run lint
sofisl Mar 12, 2026
b53c57e
revert changes to prepublish
sofisl Mar 12, 2026
bf6804d
explicitly await hook
sofisl Mar 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@
ARG NODE_VERSION=16
ARG FLAKYBOT_VERSION=1.1.0

FROM node:${NODE_VERSION}-alpine as build
FROM node:${NODE_VERSION}-slim as build

RUN apk add --no-cache curl tar python3
RUN apt-get update && apt-get install -y curl tar python3

# Install gcloud
RUN curl https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz > /tmp/google-cloud-sdk.tar.gz

RUN mkdir -p /usr/local/gcloud \
&& tar -C /usr/local/gcloud -xvf /tmp/google-cloud-sdk.tar.gz \
&& /usr/local/gcloud/google-cloud-sdk/install.sh
&& /usr/local/gcloud/google-cloud-sdk/install.sh --quiet --usage-reporting=false

RUN ln -s /usr/bin/python3 /usr/bin/python

# Download flakybot release
RUN curl https://github.com/googleapis/repo-automation-bots/releases/download/flakybot-${FLAKYBOT_VERSION}/flakybot \
Expand All @@ -34,16 +36,14 @@ RUN curl https://github.com/googleapis/repo-automation-bots/releases/download/fl
ENV PNPM_VERSION=7.32.2
RUN curl https://get.pnpm.io/install.sh | ENV="$HOME/.shrc" SHELL="$(which sh)" sh -

FROM node:${NODE_VERSION}-alpine

# Hack for not found error with flakybot
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
FROM node:${NODE_VERSION}-slim

COPY --from=build /usr/local/gcloud /usr/local/gcloud
COPY --from=build /bin/flakybot /bin/flakybot
COPY --from=build /root/.local/share/pnpm /root/.local/share/pnpm

RUN apk add --no-cache git bash python3
RUN apt-get update && apt-get install -y git bash python3 \
&& ln -s /usr/bin/python3 /usr/bin/python

ENV PNPM_HOME=/root/.local/share/pnpm
ENV PATH=$PNPM_HOME:/bin/flakybot:usr/local/gcloud/google-cloud-sdk/bin:$PATH
ENV PATH=$PNPM_HOME:/bin/flakybot:/usr/local/gcloud/google-cloud-sdk/bin:$PATH
18 changes: 6 additions & 12 deletions ci/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

options:
dynamic_substitutions: true
# Increased from default to 8 vCPUs / 8GB RAM to prevent OOM/silent crashes
machineType: 'E2_HIGHCPU_32'
diskSizeGb: '100'

substitutions:
_BUILD_TYPE: "presubmit"
Expand All @@ -26,22 +29,12 @@ logsBucket: 'gs://${_LOGS_BUCKET}/logs/google-cloud-node-core/${_BUILD_TYPE}/${C
timeout: 32400s

steps:
- name: 'gcr.io/kaniko-project/executor:v1.24.0'
args: [
'--log-format=text',
'--context=dir:///workspace/testing',
'--build-arg=NODE_VERSION=${_NODE_VERSION}',
'--dockerfile=ci/Dockerfile',
'--cache=true',
'--destination=gcr.io/${PROJECT_ID}/google-cloud-node-core-${_NODE_VERSION}',
'--push-retry=3',
'--image-fs-extract-retry=3'
]
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: "bash"
args: ["ci/deletecloudbuild.sh"]
env:
- 'REF_NAME=${REF_NAME}'

- name: gcr.io/${PROJECT_ID}/google-cloud-node-core-${_NODE_VERSION}
id: "run-tests"
timeout: 32400s
Expand All @@ -53,4 +46,5 @@ steps:
- 'PROJECT_ID=$PROJECT_ID'
- 'REPO_OWNER=${_REPO_OWNER}'
- 'REPO_NAME=${_REPO_NAME}'
- 'COMMIT_SHA=$COMMIT_SHA'
- 'COMMIT_SHA=$COMMIT_SHA'
- 'PATH=/usr/local/gcloud/google-cloud-sdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
14 changes: 2 additions & 12 deletions ci/cloudbuild_with_credentials.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,6 @@ logsBucket: 'gs://${_LOGS_BUCKET}/logs/google-cloud-node-core/${_BUILD_TYPE}/${C
timeout: 7200s

steps:
- name: 'gcr.io/kaniko-project/executor:v1.9.1'
args: [
'--log-format=text',
'--context=dir:///workspace/testing',
'--build-arg=NODE_VERSION=${_NODE_VERSION}',
'--dockerfile=ci/Dockerfile',
'--cache=true',
'--destination=gcr.io/${PROJECT_ID}/google-cloud-node-core-${_NODE_VERSION}',
'--push-retry=3',
'--image-fs-extract-retry=3'
]
- name: gcr.io/cloud-builders/gcloud
entrypoint: 'bash'
args: [ '-c', "gcloud secrets versions access latest --project=cloud-devrel-kokoro-resources --secret=long-door-651-kokoro-system-test-service-account --format='get(payload.data)' | tr '_-' '/+' | base64 -d > /workspace/google_application_credentials.json" ]
Expand All @@ -50,4 +39,5 @@ steps:
- 'PROJECT_ID=$PROJECT_ID'
- 'REPO_OWNER=${_REPO_OWNER}'
- 'REPO_NAME=${_REPO_NAME}'
- 'COMMIT_SHA=$COMMIT_SHA'
- 'COMMIT_SHA=$COMMIT_SHA'
- 'PATH=/usr/local/gcloud/google-cloud-sdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
41 changes: 30 additions & 11 deletions ci/cloudbuild_with_gapic_showcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

options:
dynamic_substitutions: true
machineType: 'E2_HIGHCPU_32'
diskSizeGb: '100'

substitutions:
_BUILD_TYPE: "presubmit"
Expand All @@ -31,30 +33,44 @@ steps:
args: ['clone', 'https://github.com/googleapis/gapic-showcase.git']

- id: 'Build Showcase'
name: 'golang:1.24'
name: 'golang:1.25'
entrypoint: 'go'
args: ['install', './cmd/gapic-showcase']
dir: 'gapic-showcase'
env:
- 'GOPATH=/workspace'
- 'GOCACHE=/workspace/.cache/go-build'
waitFor: ['Clone Showcase']
- name: 'gcr.io/kaniko-project/executor:v1.24.0'
- name: 'gcr.io/cloud-builders/docker'
id: 'Pull Image for Cache'
entrypoint: 'bash'
args: ['-c', 'docker pull gcr.io/${PROJECT_ID}/google-cloud-node-core-${_NODE_VERSION} || exit 0']
waitFor: ['Build Showcase']

- name: 'gcr.io/cloud-builders/docker'
id: 'Build Test Image'
args: [
'--log-format=text',
'--context=dir:///workspace/testing',
'--build-arg=NODE_VERSION=${_NODE_VERSION}',
'--dockerfile=ci/Dockerfile',
'--cache=true',
'--destination=gcr.io/${PROJECT_ID}/google-cloud-node-core-${_NODE_VERSION}',
'--push-retry=3',
'--image-fs-extract-retry=3'
'build',
'-t', 'gcr.io/${PROJECT_ID}/google-cloud-node-core-${_NODE_VERSION}',
'--cache-from', 'gcr.io/${PROJECT_ID}/google-cloud-node-core-${_NODE_VERSION}',
'-f', 'ci/Dockerfile',
'--build-arg', 'NODE_VERSION=${_NODE_VERSION}',
'.'
]
waitFor: ['Pull Image for Cache']

- name: 'gcr.io/cloud-builders/docker'
id: 'Push Test Image'
args: ['push', 'gcr.io/${PROJECT_ID}/google-cloud-node-core-${_NODE_VERSION}']
waitFor: ['Build Test Image']

- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: "bash"
args: ["ci/deletecloudbuild.sh"]
env:
- 'REF_NAME=${REF_NAME}'
waitFor: ['Push Test Image']

- name: gcr.io/${PROJECT_ID}/google-cloud-node-core-${_NODE_VERSION}
id: "run-tests"
timeout: 32400s
Expand All @@ -80,4 +96,7 @@ steps:
- 'REPO_OWNER=${_REPO_OWNER}'
- 'REPO_NAME=${_REPO_NAME}'
- 'COMMIT_SHA=$COMMIT_SHA'
waitFor: ['Build Showcase']
waitFor: ['Push Test Image']

images:
- 'gcr.io/${PROJECT_ID}/google-cloud-node-core-${_NODE_VERSION}'
2 changes: 1 addition & 1 deletion ci/export/gcnc-system-continuous-node.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
createTime: '2025-09-18T18:59:44.053456230Z'
description: Continuous build with node 18
filename: ci/cloudbuild.yaml
filename: ci/cloudbuild_with_gapic_showcase.yaml
github:
name: google-cloud-node-core
owner: googleapis
Expand Down
2 changes: 1 addition & 1 deletion ci/export/gcnc-system-nightly-node.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
createTime: '2025-09-18T18:59:45.514768458Z'
description: Nightly build with node 18
gitFileSource:
path: ci/cloudbuild.yaml
path: ci/cloudbuild_with_gapic_showcase.yaml
repoType: GITHUB
revision: refs/heads/main
uri: https://github.com/googleapis/google-cloud-node-core
Expand Down
2 changes: 1 addition & 1 deletion ci/export/gcnc-system-presubmit-node.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
createTime: '2025-09-18T18:59:42.228485468Z'
description: Presubmit build with node 18
filename: ci/cloudbuild.yaml
filename: ci/cloudbuild_with_gapic_showcase.yaml
github:
name: google-cloud-node-core
owner: googleapis
Expand Down
2 changes: 1 addition & 1 deletion packages/gaxios/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"multiparty": "^4.2.1",
"mv": "^2.1.1",
"ncp": "^2.0.0",
"nock": "^14.0.5",
"nock": "14.0.5",
"null-loader": "^4.0.1",
"pack-n-play": "^4.0.0",
"puppeteer": "^24.0.0",
Expand Down
1 change: 0 additions & 1 deletion packages/gcp-metadata/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
"chai": "^4.3.10",
"cross-env": "^7.0.3",
"gcbuild": "^1.3.39",
"gcx": "^2.0.27",
"gts": "^6.0.2",
"jsdoc": "^4.0.4",
"jsdoc-fresh": "^5.0.0",
Expand Down
17 changes: 1 addition & 16 deletions packages/gcp-metadata/system-test/fixtures/hook/.gcloudignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,4 @@
# This file specifies files that are *not* uploaded to Google Cloud Platform
# using gcloud. It follows the same syntax as .gitignore, with the addition of
# "#!include" directives (which insert the entries of the given .gitignore-style
# file at that point).
#
# For more information, run:
# $ gcloud topic gcloudignore
#
.gcloudignore
# If you would like to upload your .git directory, .gitignore file or files
# from your .gitignore file, remove the corresponding line
# below:
node_modules
.git
.gitignore

node_modules
#!include:.gitignore

test/
11 changes: 11 additions & 0 deletions packages/gcp-metadata/system-test/fixtures/hook/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,18 @@

const gcpMetadata = require('gcp-metadata');

// Log availability on startup to allow verification via logs
const init = (async () => {
try {
const isAvailable = await gcpMetadata.isAvailable();
console.log(`GCF_METADATA_CHECK: isAvailable=${isAvailable}`);
} catch (e) {
console.error(`GCF_METADATA_CHECK: error=${e.message}`);
}
})();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(optional) Do we want to await this? Will the following code fail if the metadata isn't available? At the very least, it may guarantee the log message appears in a consistent place during execution.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!


exports.getMetadata = async (req, res) => {
await init;
const isAvailable = await gcpMetadata.isAvailable();
const instance = await gcpMetadata.instance();
const svc = await gcpMetadata.instance({
Expand Down
Loading
Loading