-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refresh cache on unencrypted telemetry request #124253
Conversation
@@ -35,7 +35,7 @@ export function registerTelemetryUsageStatsRoutes( | |||
const statsConfig: StatsGetterConfig = { | |||
request: req, | |||
unencrypted, | |||
refreshCache, | |||
refreshCache: unencrypted || refreshCache, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: Should this be handled down inside the telemetryCollectionManager.getStats
? It may cause different behaviours if called from somewhere else. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to keep the logic at the route level since we might want to set up things differently in different places
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see where you're coming from. However, the cache is implemented in telemetryCollectionManager.getStats
, I don't see why others may want to use it in a different way. Especially bearing in mind that, getStats
is the one deciding how to scope the requests (so any other place using unencrypted: true, refreshCache: false
might expose again values retrieved with different permissions to the caller.
IMO, the scoping and the refresh algos should be together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you @Bamieh 🔥
@@ -0,0 +1,39 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧡
💛 Build succeeded, but was flakyTest Failures
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
💔 All backports failed
How to fixRe-run the backport manually:
Questions ?Please refer to the Backport tool documentation |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
1 similar comment
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Closes #123021
There is an unrelated i18n fix to have CI pass when we
canvas/shareable_runtime
directory is built with webpack