fix(influxdb): Respect custom waitStrategy#2845
Merged
mdelapenya merged 11 commits intotestcontainers:mainfrom Nov 20, 2024
Merged
fix(influxdb): Respect custom waitStrategy#2845mdelapenya merged 11 commits intotestcontainers:mainfrom
mdelapenya merged 11 commits intotestcontainers:mainfrom
Conversation
fix(influxdb): Respect passed waitStrategy
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
stevenh
requested changes
Oct 22, 2024
Contributor
stevenh
left a comment
There was a problem hiding this comment.
Thanks for PR, tried reproducing but must be missing something
Co-authored-by: Steven Hartland <[email protected]>
mdelapenya
reviewed
Oct 23, 2024
mdelapenya
reviewed
Oct 29, 2024
stevenh
requested changes
Oct 29, 2024
Contributor
stevenh
left a comment
There was a problem hiding this comment.
Looking cleaner, did some testing locally which triggered some additional suggestions.
stevenh
reviewed
Oct 30, 2024
Move Shutdown check to WithInitDb
stevenh
requested changes
Oct 31, 2024
Contributor
stevenh
left a comment
There was a problem hiding this comment.
Almost there, just two suggestions
Co-authored-by: Steven Hartland <[email protected]>
Co-authored-by: Steven Hartland <[email protected]>
mdelapenya
previously approved these changes
Oct 31, 2024
Member
mdelapenya
left a comment
There was a problem hiding this comment.
Added a final nit about a comment.
Other than that, LGTM, great job @marcinmilewski93 during the review 🙇
stevenh
approved these changes
Nov 5, 2024
Member
|
Thanks everybody here for the thorough review. Great job! |
mdelapenya
added a commit
to mdelapenya/testcontainers-go
that referenced
this pull request
Nov 21, 2024
* main: (76 commits) 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 chore(deps): bump actions/download-artifact from 3.0.2 to 4.1.8 (testcontainers#2676) chore(deps): bump actions/upload-artifact from 3.1.3 to 4.4.3 (testcontainers#2885) fix!: port forwarding clean up and make private (testcontainers#2881) chore: resolve AWS deprecations for localstack (testcontainers#2879) docs: fix new lifecycle hooks section (testcontainers#2875) fix: host access port instability (testcontainers#2867) feat: add build to life cycle hooks (testcontainers#2653) fix: typo in containerd integration (testcontainers#2873) chore(deps): bump mkdocs-include-markdown-plugin from 6.0.4 to 6.2.2 (testcontainers#2806) chore: use testify instead of t.Error (testcontainers#2871) ci: enable perfsprint linter (testcontainers#2872) chore(deps): bump mkdocs-markdownextradata-plugin from 0.2.5 to 0.2.6 (testcontainers#2807) chore: use testcontainers.RequireContainerExec (testcontainers#2870) ...
mdelapenya
added a commit
to mdelapenya/testcontainers-go
that referenced
this pull request
Nov 25, 2024
* main: docs: better contribution guidelines (testcontainers#2893) fix(influxdb): Respect custom waitStrategy (testcontainers#2845)
mdelapenya
added a commit
to mtellis2/testcontainers-go
that referenced
this pull request
Dec 11, 2024
* 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 ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
The purpose of this PR is to respect the provided
waitStrategyfor the InfluxDB container, rather than overriding it by default. This change allows the use of a customwaitStrategywhen specified; if none is provided, the defaultwaitStrategywill be applied, maintaining the same configuration as before this modification.Why is it important?
In the current implementation, it's not possible to use a custom
waitStrategyand in my case the default strategy marks the container as ready too early. The container is still not ready to receive writes as you can see below. Customizing thewaitStrategyfor example to check the/healthstatus solved this issue. Example log output when container is not ready yet:After this modification different strategy could be employed, for example, to verify if InfluxDB is
ready for queries and writesas you can see on below health check response:{ "name": "influxdb", "message": "ready for queries and writes", "status": "pass", "checks": [], "version": "2.0.7", "commit": "2a45f0c037" }Related issues
How to test this PR
I have added a test that uses a custom
waitStrategyto verify this behavior.