Skip to content

fix(tool): refresh matched rules after dependency graph changes#495

Open
amazingakai wants to merge 6 commits into
open-telemetry:mainfrom
amazingakai:make-setup-multiphased
Open

fix(tool): refresh matched rules after dependency graph changes#495
amazingakai wants to merge 6 commits into
open-telemetry:mainfrom
amazingakai:make-setup-multiphased

Conversation

@amazingakai
Copy link
Copy Markdown
Contributor

Description

Matches rules in multiple setup passes to ensure matched rules are refreshed after dependency graph of a project changes

Motivation

Fixes build failures caused by instrumentation dependencies updating the user's dependency graph (via go mod tidy), which could make previously matched rules stale

Fixes #494


Checklist

  • PR title follows conventional commits format
  • Code formatted: make format
  • Linters pass: make lint
  • Tests pass: make test
  • Tests added for new functionality
  • Tests follow testing guidelines
  • Documentation updated (if applicable)

@github-actions github-actions Bot added the scope:fix A bug that is being fixed label May 12, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

❌ Patch coverage is 15.06849% with 62 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.51%. Comparing base (08d86e9) to head (e967495).

Files with missing lines Patch % Lines
tool/internal/setup/setup.go 0.00% 54 Missing ⚠️
tool/internal/setup/sync.go 50.00% 4 Missing ⚠️
tool/internal/setup/find.go 0.00% 2 Missing ⚠️
tool/internal/setup/match.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #495      +/-   ##
==========================================
- Coverage   62.83%   62.51%   -0.33%     
==========================================
  Files          62       62              
  Lines        4765     4791      +26     
==========================================
+ Hits         2994     2995       +1     
- Misses       1527     1552      +25     
  Partials      244      244              
Flag Coverage Δ
tool 62.51% <15.06%> (-0.33%) ⬇️

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.

@amazingakai amazingakai marked this pull request as ready for review May 13, 2026 17:42
@amazingakai amazingakai requested a review from a team as a code owner May 13, 2026 17:42
@amazingakai
Copy link
Copy Markdown
Contributor Author

amazingakai commented May 13, 2026

This slows down the setup time a bit because it it has run the setup in 2-3 passes now. I will try to investigate this a bit more to see if I missed something that could be optimized but I think this is reasonable. Integration tests on windows are failing due to timeout, we might need to increase the timeout for integration tests

@amazingakai
Copy link
Copy Markdown
Contributor Author

Done. Since first pass always added otel as a dependency, it was trying to instrument that as well which slowed down the build time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope:fix A bug that is being fixed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Building projects with older grpc versions than instrumentation dependencies causes build failures

1 participant