testcontainers / testcontainers/testcontainers-go
Use a lookup key based on the container request to find containers to be reused
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5k
- Forks
- 637
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 26
Description
> The fix makes sense from a technical perspective. However, regarding the `reuse` behavior itself, we decided in `testcontainers-java` that relying on the container name is not a stable indicator of equality(with the name itself potentially leading to conflicts) and we, therefore, use the hash of the container create command as the lookup key.
@kiview what do you think if we proceed with the merge, and create a discussion/issue to refactor how the reuse container feature works: if I understood correctly, a container should be reused if and only if the container request (Go abstraction) is exactly the same, identified by a unique hash of the struct representing the request.
Originally posted by @mdelapenya in https://github.com/testcontainers/testcontainers-go/issues/558#issuecomment-1278768453
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin by locating the existing container-reuse lookup and the Go container-request abstraction; no file or test is named in the issue. Done means reuse occurs only when the complete container request matches via a stable unique hash, rather than the container name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- devops, testing
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100