Skip to content

refactor: Inject API client into AliasResolver instead of creating its own#985

Draft
vdusek wants to merge 1 commit into
masterfrom
refactor/inject-alias-resolver-client
Draft

refactor: Inject API client into AliasResolver instead of creating its own#985
vdusek wants to merge 1 commit into
masterfrom
refactor/inject-alias-resolver-client

Conversation

@vdusek

@vdusek vdusek commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Splits the behavioral change out of #983, which stays a pure dead-code cleanup, per review feedback.

AliasResolver (and open_by_alias) no longer create their own ApifyClientAsync to read the alias mapping from the default key-value store. The API client already built for the storage operation is injected and reused, so alias resolution shares its HTTP client (connection pool and event-loop affinity) instead of spinning up — and leaking — a separate client on every call. This also removes the need for the process-global client cache that the review flagged.

@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Jun 13, 2026
@vdusek vdusek self-assigned this Jun 13, 2026
@github-actions github-actions Bot added this to the 142nd sprint - Tooling team milestone Jun 13, 2026
@github-actions github-actions Bot added the tested Temporary label used only programatically for some analytics. label Jun 13, 2026
@codecov

codecov Bot commented Jun 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.99%. Comparing base (0daca28) to head (13631bb).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #985      +/-   ##
==========================================
+ Coverage   89.90%   89.99%   +0.08%     
==========================================
  Files          49       49              
  Lines        3091     3088       -3     
==========================================
  Hits         2779     2779              
+ Misses        312      309       -3     
Flag Coverage Δ
e2e 35.84% <14.28%> (-0.07%) ⬇️
integration 56.86% <50.00%> (-0.01%) ⬇️
unit 78.82% <100.00%> (+0.07%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

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

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants