Skip to content
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changelog/4843.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`opentelemetry-resource-detector-host`: add detector setting `host.id` from the non-privileged machine id
60 changes: 60 additions & 0 deletions .github/workflows/core_contrib_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,66 @@ jobs:
- name: Run tests
run: tox -e py310-test-resource-detector-containerid -- -ra

py310-test-resource-detector-host-oldest:
name: resource-detector-host-oldest
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout contrib repo @ SHA - ${{ env.CONTRIB_REPO_SHA }}
uses: actions/checkout@v4
with:
repository: open-telemetry/opentelemetry-python-contrib
ref: ${{ env.CONTRIB_REPO_SHA }}

- name: Checkout core repo @ SHA - ${{ env.CORE_REPO_SHA }}
uses: actions/checkout@v4
with:
repository: open-telemetry/opentelemetry-python
ref: ${{ env.CORE_REPO_SHA }}
path: opentelemetry-python

- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
architecture: "x64"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py310-test-resource-detector-host-oldest -- -ra

py310-test-resource-detector-host-latest:
name: resource-detector-host-latest
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout contrib repo @ SHA - ${{ env.CONTRIB_REPO_SHA }}
uses: actions/checkout@v4
with:
repository: open-telemetry/opentelemetry-python-contrib
ref: ${{ env.CONTRIB_REPO_SHA }}

- name: Checkout core repo @ SHA - ${{ env.CORE_REPO_SHA }}
uses: actions/checkout@v4
with:
repository: open-telemetry/opentelemetry-python
ref: ${{ env.CORE_REPO_SHA }}
path: opentelemetry-python

- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
architecture: "x64"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py310-test-resource-detector-host-latest -- -ra

py310-test-resource-detector-azure-0:
name: resource-detector-azure-0
runs-on: ubuntu-latest
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/generate_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@
tox_ini_path = Path(__file__).parent.parent.parent.joinpath("tox.ini")
workflows_directory_path = Path(__file__).parent

generate_test_workflow(tox_ini_path, workflows_directory_path, "ubuntu-latest")
generate_test_workflow(
tox_ini_path,
workflows_directory_path,
"ubuntu-latest",
additional_jobs={
"py312-test-resource-detector-host-latest": ("windows-latest",),
Comment thread
herin049 marked this conversation as resolved.
Outdated
},
)
generate_lint_workflow(tox_ini_path, workflows_directory_path)
generate_misc_workflow(tox_ini_path, workflows_directory_path)
generate_contrib_workflow(workflows_directory_path)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,28 @@ def _generate_workflow(


def generate_test_workflow(
tox_ini_path: Path, workflow_directory_path: Path, *operating_systems
tox_ini_path: Path,
workflow_directory_path: Path,
*operating_systems: str,
additional_jobs: dict[str, tuple[str, ...]] | None = None,
) -> None:
tox_envs = get_tox_envs(tox_ini_path)
job_datas = get_test_job_datas(tox_envs, list(operating_systems))

for tox_env, additional_operating_systems in (
additional_jobs or {}
).items():
if tox_env not in tox_envs:
raise ValueError(f"Unknown tox environment: {tox_env}")
job_datas.extend(
get_test_job_datas(
[tox_env],
list(additional_operating_systems),
)
)

_generate_workflow(
get_test_job_datas(get_tox_envs(tox_ini_path), operating_systems),
job_datas,
"test",
workflow_directory_path,
)
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,25 @@ jobs:
- name: Run tests
run: tox -e lint-resource-detector-containerid

lint-resource-detector-host:
name: resource-detector-host
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.14
uses: actions/setup-python@v5
with:
python-version: "3.14"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e lint-resource-detector-host

lint-resource-detector-azure:
name: resource-detector-azure
runs-on: ubuntu-latest
Expand Down
Loading
Loading