Commit 9652b99
ci(benchmarks): repair telemetry_dependencies baseline import (#17595)
## Summary
The `telemetry_dependencies` benchmark was failing against the baseline
wheel after #17156 merged, with:
```
ModuleNotFoundError: No module named 'ddtrace.internal.telemetry.dependency'
```
Root cause: `scenario._run_old_api` had a function-scope
`from ddtrace.internal.telemetry.dependency import DependencyEntry as
DE`
that Python evaluates on every call. The baseline wheel predates the
SCA-reachability PR, so that module does not exist and the import
crashes before any phase branching. The `else` branch also populated
`already_imported` with `DependencyEntry` instances, but the baseline's
`update_imported_dependencies(already_imported: Dict[str, str], ...)`
expects version strings — it would break if ever exercised.
## Changes
- Drop the broken top-level import.
- Rewrite the idle/fallback branch to populate `already_imported`
as `{name: version_str}`, matching the baseline contract.
The candidate (new-API) path is unaffected — it runs
`_run_new_api` because `HAS_DEPENDENCY_TRACKER` is True on current
`main`.
## Test plan
- [ ] Re-run the benchmark platform job for `telemetry_dependencies`
and confirm it completes for both baseline and candidate.
- [ ] Spot-check that the `telemetry_add_metric` job (which was
already passing) is still unaffected.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent e7c259a commit 9652b99
1 file changed
Lines changed: 3 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
213 | | - | |
214 | 212 | | |
215 | 213 | | |
216 | 214 | | |
217 | 215 | | |
218 | | - | |
219 | 216 | | |
220 | 217 | | |
221 | 218 | | |
| |||
235 | 232 | | |
236 | 233 | | |
237 | 234 | | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
243 | 238 | | |
244 | 239 | | |
245 | 240 | | |
| |||
0 commit comments