Sitelet https://github.com/testcontainers/testcontainers-node/pull/1464
Skip to content

Drop the gcloud emulator test against an unavailable image - #1464

Merged
cristianrgreco merged 1 commit into
mainfrom
gcloud-drop-unavailable-image
Sep 21, 2026
Merged

cristianrgreco merged 1 commit into
mainfrom
gcloud-drop-unavailable-image

Conversation

@cristianrgreco

Copy link
Copy Markdown
Collaborator

Problem

The Datastore and Firestore emulator tests each ran twice through it.each, once against the pinned image and once against a hardcoded google-cloud-cli:468.0.0-emulators, to check the module still worked on an older CLI release.

Google has since pruned every 468.x tag from gcr.io, so that case fails:

(HTTP code 404) unexpected - manifest for
gcr.io/google.com/cloudsdktool/google-cloud-cli:468.0.0-emulators not found

Four of the eight Tests (gcloud, ...) jobs fail on this today, on every open PR.

Fix

Drop the second case and keep the default-image one.

Pinning a different old tag would only defer the problem. The oldest -emulators tag still published is 539.0.0, and that floor rises as Google keeps pruning, so the test would break again on its own schedule.

The removed case also covered nothing the remaining one does not. These containers are thin wrappers that run gcloud beta emulators firestore start with a couple of flags and wait on a log line. An image nobody can pull is not a compatibility guarantee.

The 468.0.0 tag appears nowhere in the docs, so no documented example changes. The surviving test keeps the datastoreExample and firestoreExample doc blocks intact, and is renamed to should work using default version to match the sibling PubSub and BigQuery tests.

Verification

Both tests pass locally, and the module typechecks and lints clean.

The Datastore and Firestore emulator tests each ran twice, once against
the pinned image and once against google-cloud-cli:468.0.0-emulators, to
check the module still worked on an older CLI release.

Google has since pruned every 468.x tag from gcr.io, so that case fails
on a 404 and takes both jobs with it. The oldest -emulators tag still
published is 539.0.0, and that floor keeps rising as older tags are
pruned, so pinning another old tag only defers the same breakage.

The extra case also covered nothing the default one does not: these
containers only run "gcloud beta emulators firestore start" with a
couple of flags and wait on a log line.
@netlify

netlify Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for testcontainers-node ready!

Name Link
🔨 Latest commit 5df7d8d
🔍 Latest deploy log https://app.netlify.com/projects/testcontainers-node/deploys/6ab151ee5c8c93000906e4be
😎 Deploy Preview https://deploy-preview-1464--testcontainers-node.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

Understand this PR’s impact

Explore downstream dependencies and potential security impact with Blast Radius.

View blast radius →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 8d555fdb-6d55-4bb1-8ec0-099715dc7770

📥 Commits

Reviewing files that changed from the base of the PR and between 99ff0a2 and 5df7d8d.

📒 Files selected for processing (2)
  • packages/modules/gcloud/src/datastore-emulator-container.test.ts
  • packages/modules/gcloud/src/firestore-emulator-container.test.ts

Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review.


Summary by CodeRabbit

  • Tests
    • Updated Datastore and Firestore emulator tests to run against the default container image only.
    • Removed coverage for the separately pinned emulator image.

Walkthrough

The Datastore and Firestore emulator tests now run only against the default IMAGE. Their save/get and write/read assertions remain unchanged. The pinned emulator image is no longer tested.

Changes

Emulator test coverage

Layer / File(s) Summary
Default image emulator coverage
packages/modules/gcloud/src/*-emulator-container.test.ts
The parameterized default and pinned image cases were replaced with one test case using IMAGE. The emulator round-trip test bodies remain unchanged.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the removal of tests that use the unavailable gcloud emulator image.
Description check ✅ Passed The description explains the unavailable image failure, the test changes, and the verification performed. It is directly related to the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Warning

Some tools did not complete. Review the errors below.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

packages/modules/gcloud/src/datastore-emulator-container.test.ts

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

packages/modules/gcloud/src/firestore-emulator-container.test.ts

ESLint skipped: the matched ESLint configuration already failed (missing-dependency).


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the default image bright
Datastore hops through save and read
Firestore follows the same path
The pinned image rests tonight
Round trips land with data intact

Comment @coderabbitai help to get the list of available commands.

@cristianrgreco cristianrgreco added the maintenance Improvements that do not change functionality label Sep 21, 2026
@cristianrgreco
cristianrgreco merged commit 8f16011 into main Sep 21, 2026
17 checks passed
@cristianrgreco
cristianrgreco deleted the gcloud-drop-unavailable-image branch September 21, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Improvements that do not change functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant