Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat(gcloud)!: add support to seed data when using RunBigQueryContainer #2523

Merged
merged 21 commits into from
Dec 12, 2024

Conversation

mtellis2
Copy link
Contributor

What does this PR do?

Updates the RunBigQueryContainer to optionally use the emulator's data-from-yaml option, allowing users to seed the container with data.

Why is it important?

This give the user of the RunBigQueryContainer the option to seed test data on the container creation/startup.

Related issues

@mtellis2 mtellis2 requested a review from a team as a code owner April 30, 2024 23:36
Copy link

netlify bot commented Apr 30, 2024

Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit b1adb00
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-go/deploys/675ab7478b73a900084c80c5
😎 Deploy Preview https://deploy-preview-2523--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.

modules/gcloud/gcloud.go Outdated Show resolved Hide resolved
modules/gcloud/bigquery.go Outdated Show resolved Hide resolved
modules/gcloud/bigquery_test.go Outdated Show resolved Hide resolved
modules/gcloud/bigquery_test.go Outdated Show resolved Hide resolved
modules/gcloud/bigquery_test.go Outdated Show resolved Hide resolved
modules/gcloud/bigquery.go Outdated Show resolved Hide resolved
modules/gcloud/go.mod Show resolved Hide resolved
Copy link
Collaborator

@stevenh stevenh left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. I've done an initial pass but looks like this needs a rebase.

modules/gcloud/bigquery_test.go Outdated Show resolved Hide resolved
modules/gcloud/bigquery_test.go Outdated Show resolved Hide resolved
modules/gcloud/bigquery_test.go Outdated Show resolved Hide resolved
modules/gcloud/bigquery_test.go Outdated Show resolved Hide resolved
modules/gcloud/gcloud.go Outdated Show resolved Hide resolved
modules/gcloud/gcloud.go Outdated Show resolved Hide resolved
modules/gcloud/bigquery.go Outdated Show resolved Hide resolved
* main: (234 commits)
  chore(ci): add Github labels based on PR title (testcontainers#2914)
  chore(gha): Use official setup-docker-action (testcontainers#2913)
  chore(ci): enforce conventional commits syntax in PR titles (testcontainers#2911)
  feat(nats): WithConfigFile - pass a configuration file to nats server (testcontainers#2905)
  chore: enable implicit default logger only in testing with -v (testcontainers#2877)
  fix: container binds syntax (testcontainers#2899)
  refactor(cockroachdb): to use request driven options (testcontainers#2883)
  chore(deps): bump actions/setup-go from 5.0.0 to 5.1.0 (testcontainers#2904)
  chore(deps): bump ossf/scorecard-action from 2.3.1 to 2.4.0 (testcontainers#2903)
  chore(deps): bump test-summary/action from 2.3 to 2.4 (testcontainers#2902)
  feat(wait): strategy walk (testcontainers#2895)
  feat(wait): tls strategy (testcontainers#2896)
  docs: better contribution guidelines (testcontainers#2893)
  fix(influxdb): Respect custom waitStrategy (testcontainers#2845)
  fix: only upload to sonar on ubuntu-latest (testcontainers#2891)
  fix: build artifact name properly (testcontainers#2890)
  fix: do not run sonar upload when ryuk is disabled (testcontainers#2889)
  fix: update GH actions for uploading/downloading artifacts (testcontainers#2888)
  feat(ci): Enable master moby with rootless (testcontainers#2880)
  fix(redpanda): temporary file use
  ...
@mdelapenya mdelapenya requested a review from stevenh December 11, 2024 11:43
@mdelapenya mdelapenya self-assigned this Dec 11, 2024
@mdelapenya mdelapenya added the feature New functionality or new behaviors on the existing one label Dec 11, 2024
@mdelapenya mdelapenya changed the title feat: Add support to seed data when using RunBigQueryContainer feat(gcloud): add support to seed data when using RunBigQueryContainer Dec 11, 2024
Copy link
Collaborator

@stevenh stevenh left a comment

Choose a reason for hiding this comment

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

Some comments taking into account recent discussions about other modules.

modules/gcloud/bigquery.go Outdated Show resolved Hide resolved
modules/gcloud/gcloud.go Outdated Show resolved Hide resolved
@mdelapenya mdelapenya requested a review from stevenh December 11, 2024 13:36
Copy link
Collaborator

@stevenh stevenh left a comment

Choose a reason for hiding this comment

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

Few more bits based on the changes.

modules/gcloud/bigquery_test.go Outdated Show resolved Hide resolved
modules/gcloud/bigquery_test.go Outdated Show resolved Hide resolved
modules/gcloud/gcloud.go Outdated Show resolved Hide resolved
modules/gcloud/gcloud.go Outdated Show resolved Hide resolved
modules/gcloud/gcloud.go Outdated Show resolved Hide resolved
@mdelapenya mdelapenya requested a review from stevenh December 12, 2024 06:19
@mdelapenya mdelapenya changed the title feat(gcloud): add support to seed data when using RunBigQueryContainer feat(gcloud)!: add support to seed data when using RunBigQueryContainer Dec 12, 2024
@mdelapenya mdelapenya added the breaking change Causing compatibility issues. label Dec 12, 2024
@mdelapenya
Copy link
Member

Adding the breaking change label because the Options customiser type now returns an error

stevenh
stevenh previously approved these changes Dec 12, 2024
Copy link
Collaborator

@stevenh stevenh left a comment

Choose a reason for hiding this comment

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

Looks good just one question on the change to the example which might be better to leave as it was?

modules/gcloud/bigquery_test.go Outdated Show resolved Hide resolved
* main:
  security(deps): bump golang.org/x/crypto from 0.28.0 to 0.31.0 (testcontainers#2916)
Copy link
Collaborator

@stevenh stevenh left a comment

Choose a reason for hiding this comment

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

LGTM

@mdelapenya mdelapenya merged commit 35bf0cd into testcontainers:main Dec 12, 2024
124 checks passed
@mdelapenya
Copy link
Member

@mtellis2 thanks for your work here. We took it over to not waste your time and make it into the next release.

We really appreciate it 🙇

mdelapenya added a commit to mdelapenya/testcontainers-go that referenced this pull request Dec 13, 2024
* main:
  feat(gcloud)!: add support to seed data when using RunBigQueryContainer (testcontainers#2523)
  security(deps): bump golang.org/x/crypto from 0.28.0 to 0.31.0 (testcontainers#2916)
  chore(ci): add Github labels based on PR title (testcontainers#2914)
  chore(gha): Use official setup-docker-action (testcontainers#2913)
  chore(ci): enforce conventional commits syntax in PR titles (testcontainers#2911)
  feat(nats): WithConfigFile - pass a configuration file to nats server (testcontainers#2905)
  chore: enable implicit default logger only in testing with -v (testcontainers#2877)
  fix: container binds syntax (testcontainers#2899)
  refactor(cockroachdb): to use request driven options (testcontainers#2883)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Causing compatibility issues. feature New functionality or new behaviors on the existing one
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants