Skip to content

Azure and GCP metadata decoration: integration tests#1334

Merged
mariomac merged 6 commits into
open-telemetry:mainfrom
mariomac:azure-metadata
Feb 23, 2026
Merged

Azure and GCP metadata decoration: integration tests#1334
mariomac merged 6 commits into
open-telemetry:mainfrom
mariomac:azure-metadata

Conversation

@mariomac
Copy link
Copy Markdown
Contributor

@mariomac mariomac commented Feb 19, 2026

It also improves the AWS EC2 tests by removing the need of mocking the AWS_EC2_METADATA_SERVICE_ENDPOINT variable. Now the fake IMDS is reachable at the standard 169.254.169.254 IP.

It also uses the low-level docker client to improve some aspects of docker_util_test:

  • Enables container log reports after integration tests
  • We need to assign the obi network alias to OBI so the Prometheus scraping work. The dockerutil high-level API required that the network was created shortly after the OBI container was created. This caused that sometimes it retrieved for metadata before the network was ready, causing the tests to fail.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 19, 2026

Codecov Report

❌ Patch coverage is 53.33333% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.62%. Comparing base (7f9ab62) to head (469ebd1).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
pkg/appolly/meta/meta_node_cloud.go 53.33% 5 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1334      +/-   ##
==========================================
+ Coverage   43.56%   43.62%   +0.05%     
==========================================
  Files         307      307              
  Lines       32888    32967      +79     
==========================================
+ Hits        14329    14381      +52     
- Misses      17641    17663      +22     
- Partials      918      923       +5     
Flag Coverage Δ
integration-test 21.78% <66.66%> (+<0.01%) ⬆️
integration-test-arm 0.00% <0.00%> (ø)
integration-test-vm-x86_64-5.15.152 0.00% <0.00%> (ø)
integration-test-vm-x86_64-6.10.6 0.00% <0.00%> (ø)
k8s-integration-test 2.34% <0.00%> (-0.02%) ⬇️
oats-test 0.00% <0.00%> (ø)
unittests 44.42% <66.66%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mariomac mariomac marked this pull request as ready for review February 19, 2026 16:16
@mariomac mariomac requested a review from a team as a code owner February 19, 2026 16:16
@mariomac mariomac changed the title Azure metadata decoration: integration tests Azure and GCP metadata decoration: integration tests Feb 20, 2026
@mariomac
Copy link
Copy Markdown
Contributor Author

Oh! Fun fact. Integration tests started to fail because OBI is taking the real Azure metadata from the GitHub runners instead of the mocked metadata providers.

@grcevski
Copy link
Copy Markdown
Contributor

Looks like the new integration test is failing ...

@mariomac
Copy link
Copy Markdown
Contributor Author

@grcevski concretely the Azure test, which works locally but in the GitHub runner, which works in Azure, it contacts to the real Azure metadata endpoint instead of the mocked endpoint. Unlike the other OTEL resource detectors, the Azure detector doesn't seem to allow overriding the Azure endpoint.

I need to have a look at the logs and see if I can configure better the Docker network. I have had to implement logging report in the new Go-based dockertest code.

@mariomac
Copy link
Copy Markdown
Contributor Author

It seems that with the latest fixes to the dockerPool utility, all tests now passed. Re-running them again to discard any "lucky shot"

Copy link
Copy Markdown
Contributor

@grcevski grcevski left a comment

Choose a reason for hiding this comment

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

Awesome! LGTM!

@mariomac mariomac merged commit 8860073 into open-telemetry:main Feb 23, 2026
114 of 118 checks passed
@MrAlias MrAlias added this to the v0.6.0 milestone Feb 23, 2026
@MrAlias MrAlias mentioned this pull request Mar 5, 2026
@mariomac mariomac deleted the azure-metadata branch March 19, 2026 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants