linkerd2-proxy icon indicating copy to clipboard operation
linkerd2-proxy copied to clipboard

fix(outbound): fix clientpolicy not work after remove service profile

Open wgjak47 opened this issue 4 months ago • 3 comments

This is a PR for fixing https://github.com/linkerd/linkerd2/issues/14274. In linkerd/idle-cache/src/lib.rs get_or_insert_with function, seems the sidercar with service profile and sidercar with client policy has the same key, which cause the cache didn't expire after we delete serviceprofile and create the new httproute for the target sevice for pods that keep requesting the target service. this pr will create different keys for service profile httpsidecar and client policy httpsidecar to fix this problem.

wgjak47 avatar Aug 13 '25 07:08 wgjak47

@wgjak47 thanks for submitting this. i should have some bandwidth to review next week.

olix0r avatar Aug 14 '25 23:08 olix0r

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 67.63%. Comparing base (96124bc) to head (a7d9156). :warning: Report is 1213 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4064      +/-   ##
==========================================
- Coverage   67.68%   67.63%   -0.05%     
==========================================
  Files         332      396      +64     
  Lines       15158    18660    +3502     
==========================================
+ Hits        10259    12620    +2361     
- Misses       4899     6040    +1141     
Files with missing lines Coverage Δ
linkerd/app/outbound/src/sidecar.rs 61.33% <100.00%> (-7.19%) :arrow_down:

... and 236 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update bb612d3...a7d9156. Read the comment docs.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Aug 14 '25 23:08 codecov[bot]

@olix0r Hi,Is there any improvement needed for this pr,or there is a better way to solve this problem?

wgjak47 avatar Sep 05 '25 03:09 wgjak47