Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(gcloud): add option to run firestore in datastore mode #3009

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Zarux
Copy link

@Zarux Zarux commented Mar 7, 2025

What does this PR do?

This PR adds an option to the gcloud module applicable only to RunFirestore that runs the emulator in Firestore in Datastore mode.

It also changes the base example to point to the non-depracated function in order to create a new example with datastore mode

Why is it important?

Datastore in GCP is now Firestore in Datastore mode, which means the datastore emulator behaves slightly different to what one would expect as it emulates the legacy datastore product.

In the gcloud cloud-sdk version 465.0.0 a parameter was added to run the firestore emulator in datastore mode which should behave more like the product in GCP.

How to test this PR

The simplest way to test this would be to run the firestore emulator with the gcloud.WithDatastoreMode() and connect using the datastore package.
There is an example test case added in this PR as well that does this.

@Zarux Zarux requested a review from a team as a code owner March 7, 2025 19:43
Copy link

netlify bot commented Mar 7, 2025

Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit 8887581
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-go/deploys/67cb4c5a21ae9100088f597e
😎 Deploy Preview https://deploy-preview-3009--testcontainers-go.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 site configuration.

@mdelapenya
Copy link
Member

Thanks for submitting this improving. I took a quick look and initially it LGTM.

I want to share that after #3008, I'm considering following the same pattern of one submodule per package, deprecating all the existing GCP containers. As contributor of this GCP module, does it reasonable to you?

@Zarux
Copy link
Author

Zarux commented Mar 12, 2025

Thanks for submitting this improving. I took a quick look and initially it LGTM.

I want to share that after #3008, I'm considering following the same pattern of one submodule per package, deprecating all the existing GCP containers. As contributor of this GCP module, does it reasonable to you?

My view is quite limited as this is my first contribution to this module 😄 But at first glance it looks reasonable, yes 👍

@mdelapenya mdelapenya self-assigned this Mar 12, 2025
@mdelapenya mdelapenya added the enhancement New feature or request label Mar 12, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants