Skip to content
New issue

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

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

Already on GitHub? # to your account

feat(labels):Add common testcontainers labels #519

Merged
merged 4 commits into from
Apr 17, 2024

Conversation

bearrito
Copy link
Contributor

@bearrito bearrito commented Apr 1, 2024

Aligns with other test container projects

Example: I also contribute to go project, those labels look like

  "maintainer": "docker@couchbase.com",
  "org.opencontainers.image.ref.name": "ubuntu",
  "org.opencontainers.image.version": "20.04",
  "org.testcontainers": "true",
  "org.testcontainers.lang": "go",
  "org.testcontainers.sessionId": "e01aa90cfb75a53fbd53776b8c2eb84a99e3f1c8a7103512468cf75735421176",
  "org.testcontainers.version": "0.30.0"

Java appears to do similar - https://github.com/testcontainers/testcontainers-java/blob/main/core/src/main/java/org/testcontainers/DockerClientFactory.java#L51

I didn't add in the image info as there wasn't an obvious way to get a handle on that nor obvious value.
Another thing is that the python prefers session-id to sessionId. I'm not sure if there are any cross-language reasons to have those be identical, I left it alone.

Also this adds in tests for the label code.

@bearrito bearrito changed the title Add common testcontainers labels feat(labels):Add common testcontainers labels Apr 1, 2024
core/testcontainers/core/labels.py Outdated Show resolved Hide resolved
core/testcontainers/core/labels.py Outdated Show resolved Hide resolved
@alexanderankin alexanderankin force-pushed the feature/label-containers branch from 138a5a9 to 7a8f85f Compare April 17, 2024 10:07
@alexanderankin
Copy link
Member

had to rebase to get the latest ruff config

@alexanderankin alexanderankin merged commit e04b7ac into testcontainers:main Apr 17, 2024
7 checks passed
alexanderankin pushed a commit that referenced this pull request Apr 17, 2024
🤖 I have created a release *beep* *boop*
---


##
[4.4.0](testcontainers-v4.3.3...testcontainers-v4.4.0)
(2024-04-17)


### Features

* **labels:** Add common testcontainers labels
([#519](#519))
([e04b7ac](e04b7ac))
* **network:** Add network context manager
([#367](#367))
([11964de](11964de))


### Bug Fixes

* **core:**
[#486](#486)
for colima delay for port avail for connect
([#543](#543))
([90bb780](90bb780))
* **core:** add TESTCONTAINERS_HOST_OVERRIDE as alternative to TC_HOST
([#384](#384))
([8073874](8073874))
* **dependencies:** remove usage of `sqlalchemy` in DB extras. Add
default wait timeout for `wait_for_logs`
([#525](#525))
([fefb9d0](fefb9d0))
* tests for Kafka container running on ARM64 CPU
([#536](#536))
([29b5179](29b5179))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Add default labels to containers
3 participants