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

chore(docker_mounts): stop doing misleading logging #2178

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

srabraham
Copy link
Contributor

@srabraham srabraham commented Jan 30, 2024

As things are, the logger statement here always triggers for normal use cases. For example, if I start a container with this mount: testcontainers.VolumeMount("some-vol", "/some/dir")

then I get this weird message in my logs
Mount type %!s(testcontainers.MountType=1) is not supported by Testcontainers for Go

because a GenericVolumeMountSource doesn't have an implementation of GetVolumeOptions() *mount.VolumeOptions

I suggest removing that logging, as in this PR, because it's going to be purely confusing for 99% of users.

What does this PR do?

removes bad logging

Why is it important?

because it was confusing before

@srabraham srabraham requested a review from a team as a code owner January 30, 2024 18:14
Copy link

netlify bot commented Jan 30, 2024

Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit 80d422c
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-go/deploys/65ba83fa38f3e70008c712f7
😎 Deploy Preview https://deploy-preview-2178--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 mdelapenya self-assigned this Jan 30, 2024
@mdelapenya mdelapenya added the chore Changes that do not impact the existing functionality label Jan 30, 2024
@mdelapenya
Copy link
Member

I have to admit that the current implementation for volumes/mounts is so complex that it should be fine to rewrite it in a simpler manner. Because we are working on an eventual v1 branch, and for the sake of simplicity, it would eventually contain breaking changes.

As things are, the logger statement here always triggers for normal use cases.
For example, if I start a container with this mount:
testcontainers.VolumeMount("some-vol", "/some/dir")

then I get this weird message in my logs
Mount type %!s(testcontainers.MountType=1) is not supported by Testcontainers for Go

because a GenericVolumeMountSource doesn't have an implementation of
`GetVolumeOptions() *mount.VolumeOptions`

I suggest removing that logging, as in this PR, because it's going to be purely
confusing for 99% of users.
@srabraham srabraham force-pushed the 2024-01-30-no-bad-log branch from 2ac148e to 80d422c Compare January 31, 2024 17:31
Copy link
Member

@mdelapenya mdelapenya left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@srabraham
Copy link
Contributor Author

LGTM, thanks!

Go ahead and merge when you'd like to do so. I don't have the relevant permissions on the repo

@mdelapenya mdelapenya merged commit 09b87ce into testcontainers:main Feb 1, 2024
80 checks passed
mdelapenya added a commit to mdelapenya/testcontainers-go that referenced this pull request Feb 14, 2024
* main: (33 commits)
  feat (postgres): support for creating and restoring Snapshots (testcontainers#2199)
  fix: apply volume options only to volumes (testcontainers#2201)
  redpanda/test: add admin client call (testcontainers#2200)
  chore(deps): bump cloud.google.com/go/spanner from 1.55.0 to 1.56.0 in /modules/gcloud, cloud.google.com/go/pubsub from 1.35.0 to 1.36.1 in /modules/gcloud, cloud.google.com/go/bigquery from 1.57.1 to 1.58.0 in /modules/gcloud (testcontainers#2197)
  chore(deps): bump github.com/docker/docker from 25.0.1+incompatible to 25.0.2+incompatible (testcontainers#2196)
  fix: go doc reference broken image (testcontainers#2195)
  Add Support for WASM Transforms to Redpanda Module (testcontainers#2170)
  feat(modules.clickhouse): Add zookeeper for clickhouse clusterization (testcontainers#1995)
  redpanda: allow using SASL and TLS together (testcontainers#2140)
  chore: do not panic in testable examples (testcontainers#2193)
  fix: all mounts should contain the testcontainers labels (testcontainers#2191)
  [redpanda] sasl test for wrong mechanism (testcontainers#2048)
  fix: deprecate BindMounts correctly (testcontainers#2190)
  chore(docker_mounts): stop doing misleading logging (testcontainers#2178)
  fix: Add HTTPStrategy WithForcedIPv4LocalHost To Fix Docker Port Map (testcontainers#1775)
  chore(deps): bump github.com/docker/compose/v2 in /modules/compose (testcontainers#2162)
  feat(modules.cockroachdb) Adds cockroachdb module (testcontainers#2131)
  chore(deps): bump golang.org/x/crypto in /modules/minio (testcontainers#2161)
  chore(deps): bump golang.org/x/crypto in /modules/openldap (testcontainers#2165)
  chore(deps): bump github.com/google/uuid from 1.5.0 to 1.6.0 (testcontainers#2169)
  ...
mdelapenya added a commit to mdelapenya/testcontainers-go that referenced this pull request Feb 14, 2024
* main: (33 commits)
  feat (postgres): support for creating and restoring Snapshots (testcontainers#2199)
  fix: apply volume options only to volumes (testcontainers#2201)
  redpanda/test: add admin client call (testcontainers#2200)
  chore(deps): bump cloud.google.com/go/spanner from 1.55.0 to 1.56.0 in /modules/gcloud, cloud.google.com/go/pubsub from 1.35.0 to 1.36.1 in /modules/gcloud, cloud.google.com/go/bigquery from 1.57.1 to 1.58.0 in /modules/gcloud (testcontainers#2197)
  chore(deps): bump github.com/docker/docker from 25.0.1+incompatible to 25.0.2+incompatible (testcontainers#2196)
  fix: go doc reference broken image (testcontainers#2195)
  Add Support for WASM Transforms to Redpanda Module (testcontainers#2170)
  feat(modules.clickhouse): Add zookeeper for clickhouse clusterization (testcontainers#1995)
  redpanda: allow using SASL and TLS together (testcontainers#2140)
  chore: do not panic in testable examples (testcontainers#2193)
  fix: all mounts should contain the testcontainers labels (testcontainers#2191)
  [redpanda] sasl test for wrong mechanism (testcontainers#2048)
  fix: deprecate BindMounts correctly (testcontainers#2190)
  chore(docker_mounts): stop doing misleading logging (testcontainers#2178)
  fix: Add HTTPStrategy WithForcedIPv4LocalHost To Fix Docker Port Map (testcontainers#1775)
  chore(deps): bump github.com/docker/compose/v2 in /modules/compose (testcontainers#2162)
  feat(modules.cockroachdb) Adds cockroachdb module (testcontainers#2131)
  chore(deps): bump golang.org/x/crypto in /modules/minio (testcontainers#2161)
  chore(deps): bump golang.org/x/crypto in /modules/openldap (testcontainers#2165)
  chore(deps): bump github.com/google/uuid from 1.5.0 to 1.6.0 (testcontainers#2169)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Changes that do not impact the existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants