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

docs: add a basic layout for wait strategies in docs #536

Merged
merged 31 commits into from Sep 28, 2022

Conversation

mdelapenya
Copy link
Collaborator

@mdelapenya mdelapenya commented Sep 26, 2022

What does this PR do?

It creates a basic layout for the wait strategies in the docs

For that:

  • it defines a new nav item under features
  • this menu item will be the home for all wait strategies, as a parent
  • will add wait strategies specific docs under the new parent nav item
  • fixes two consistency issues with methods that were not properly implemented:
    • host_port.go: it's possible now to set the poll internal, as in any other wait strategy
    • sql.go: the WithTimeout function now calls a WithStartupTimeout function, which is consistent with the rest of the wait strategies

I wonder if I should remove the commits for the consistency and send a separate PR, which would be better for the release notes 🤔

Regarding the website, it's important to notice that the golang blocks are automatically pygmented by the existing libraries, so no need to add mkdocs plugins for that.

Why is it important?

It serves as the baseline for adding new docs for the wait strategies (will come in follow-up commits)

It documents the wait strategies, which was missing.

How to test this PR?

Start the local documentation site using the instructions in the docs/contributing_docs.md file

pip install -r requirements.txt
mkdocs serve

Screenshot 2022-09-26 at 20 20 25

Related issues

Follow ups

Automate the local deployment of the docs, using Docker, instead of polluting the local system

@mdelapenya mdelapenya added the documentation Docs, docs, docs. label Sep 26, 2022
@mdelapenya mdelapenya self-assigned this Sep 26, 2022
@mdelapenya
Copy link
Collaborator Author

Still in draft to validate the initial layout. Will add more commits documenting all the wait strategies, and once there, will mark it as ready for review

@codecov
Copy link

codecov bot commented Sep 26, 2022

Codecov Report

Merging #536 (fb87139) into main (6ee7f6a) will decrease coverage by 0.23%.
The diff coverage is 25.00%.

@@            Coverage Diff             @@
##             main     #536      +/-   ##
==========================================
- Coverage   68.85%   68.61%   -0.24%     
==========================================
  Files          22       22              
  Lines        2148     2154       +6     
==========================================
- Hits         1479     1478       -1     
- Misses        530      537       +7     
  Partials      139      139              
Impacted Files Coverage Δ
wait/sql.go 22.22% <0.00%> (-0.86%) ⬇️
wait/host_port.go 47.47% <40.00%> (-0.95%) ⬇️
docker.go 70.82% <0.00%> (-0.21%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

wait/sql.go Show resolved Hide resolved
@mdelapenya mdelapenya marked this pull request as ready for review September 27, 2022 09:52
@mdelapenya mdelapenya requested a review from a team as a code owner September 27, 2022 09:52
Copy link
Member

@kiview kiview left a comment

Choose a reason for hiding this comment

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

Apply suggestions as you see fit. Topics that require a deeper discussion can be discussed outside of this PR.

docs/features/wait/exec.md Outdated Show resolved Hide resolved
docs/features/wait/exec.md Outdated Show resolved Hide resolved
docs/features/wait/exec.md Outdated Show resolved Hide resolved
docs/features/wait/exec.md Outdated Show resolved Hide resolved
docs/features/wait/exit.md Outdated Show resolved Hide resolved
docs/features/wait/log.md Outdated Show resolved Hide resolved
docs/features/wait/multi.md Show resolved Hide resolved
docs/features/wait/multi.md Outdated Show resolved Hide resolved
docs/features/wait/sql.md Outdated Show resolved Hide resolved
docs/features/wait/sql.md Outdated Show resolved Hide resolved
Co-authored-by: Kevin Wittek <kiview@users.noreply.github.com>
docs/features/wait/host_port.md Outdated Show resolved Hide resolved
docs/features/wait/host_port.md Outdated Show resolved Hide resolved
@mdelapenya mdelapenya merged commit db5eeb8 into testcontainers:main Sep 28, 2022
@mdelapenya mdelapenya deleted the document-waits branch September 28, 2022 14:19
mdelapenya referenced this pull request in mdelapenya/testcontainers-go Dec 21, 2022
* main:
  Add system requirements parent docs page for podman and colima (#562)
  Support for cap-add/cap-drop (#555)
  fix container NetworkMode usage (#560)
  chore: use hashed versions of test-summary action (#556)
  chore: use container.State() function in tests (#543)
  Log docker server info (#548)
  docs: add docs regarding Colima usage (#547)
  chore: add emoji to breaking changes in release drafter (#542)
  chore: add CONTRIBUTING file (#539)
  issue #537 Rename the wait/multi.go file to wait/all.go (#541)
  docs: add a basic layout for wait strategies in docs (#536)
  docs: improve consistency and fix typos (#534)
  chore: do not skip test (#528)
  chore: include test flakiness in the release drafter (#535)
  chore: retire old versions of Go (#530)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Docs, docs, docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wait strategies: use same WithStartupTimeout methods
2 participants