-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Stop clearing unrecognized query params #6784
Stop clearing unrecognized query params #6784
Conversation
@@ -148,6 +148,13 @@ export class DashboardDeepLinkProvider extends DeepLinkProvider { | |||
return [{key: RUN_FILTER_KEY, value}]; | |||
}) | |||
), | |||
store |
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.
It would be nice (but not necessary) to also have this handled in the internal CorpExperimentListDeepLinkProvider (the CorpDashboardDeepLinkProvider, on the other hand, would get this for free already with the way you've coded this).
Not necessary to do but if you don't do it, I want to ensure it's a conscious choice rather than an oversight.
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 did remember CorpDashboardDeepLinkProvider
and . I did not remember CorpExperimentListDeepLinkProvider
but it should be simple enough to update once this makes it's way to google3
@@ -358,10 +367,14 @@ describe('core deeplink provider', () => { | |||
store.overrideSelector(selectors.getOverriddenFeatureFlags, { | |||
enabledExperimentalPlugins: ['foo', 'bar', 'baz'], | |||
}); | |||
store.overrideSelector(selectors.getPluginQueryParams, { |
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.
Does it make sense for this to live in 'serializes feature flags'? Should it be its own test?
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 think it makes sense here because these are (were?) query parameters and they are being serialized.
If you feel strongly about it I'm happy to make another test.
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 don't understand what the additions to this test have to do with 'feature flags'. They don't seem necessary.
The comment for the test:
/**
* One test to verify that feature flags are correctly serialized using
* featureFlagsToSerializableQueryParams.
*/
The name for the test:
it('serializes feature flags', () => {
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 fully read "feature flags" as "query params". I guess working on TB has created an alias for me
## Motivation for features / changes The profiler plugin team wants to use query params for deeplinking within their application. Unfortunately we clear them when we re-serialize the application state. To support this I am adding a new area to the core state which will store unrecognized query parameters and re-serialize them. Googlers see cl/615196457 ## Screenshots of UI changes (or N/A) Time series still works! ![image](https://github.com/tensorflow/tensorboard/assets/78179109/378de493-2a44-49f9-8ac9-111a23c14ac0) The profiler plugin can read read these! ![image](https://github.com/tensorflow/tensorboard/assets/78179109/a870f8a2-06bb-4c96-91ac-7bbda0202ed4)
Since #6784 we have seen the unusual behavior where query params for feature flags will be duplicated on the command line. For example, if we load `localhost:6006/?showFlags=` it will be rewritten as `localhost:6006/?showFlags=&showFlags=`. This change fixes this by deduplicating "unknown" flags with known feature flag query params.
Motivation for features / changes
The profiler plugin team wants to use query params for deeplinking within their application. Unfortunately we clear them when we re-serialize the application state. To support this I am adding a new area to the core state which will store unrecognized query parameters and re-serialize them.
Googlers see cl/615196457
Screenshots of UI changes (or N/A)
Time series still works!
![image](https://private-user-images.githubusercontent.com/78179109/312256194-378de493-2a44-49f9-8ac9-111a23c14ac0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA3OTg4MzQsIm5iZiI6MTcyMDc5ODUzNCwicGF0aCI6Ii83ODE3OTEwOS8zMTIyNTYxOTQtMzc4ZGU0OTMtMmE0NC00OWY5LThhYzktMTExYTIzYzE0YWMwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzEyVDE1MzUzNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJmZWY5ZmIyNGM0ZGVkNmQ4YzYxOGU3MmZmMmE0NjdjODIzYmU0NWUwZDM5MzYzYjhmZjY3NjZiNTk5YWM3MDcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ADgZRjeyE2sGAhe1xHdeOZC4IDg_Mgb__ytJVytxX8E)
The profiler plugin can read read these!
![image](https://private-user-images.githubusercontent.com/78179109/312255961-a870f8a2-06bb-4c96-91ac-7bbda0202ed4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA3OTg4MzQsIm5iZiI6MTcyMDc5ODUzNCwicGF0aCI6Ii83ODE3OTEwOS8zMTIyNTU5NjEtYTg3MGY4YTItMDZiYi00Yzk2LTkxYWMtN2JiZGEwMjAyZWQ0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzEyVDE1MzUzNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNiOTE5YzYyZTc5ZmY0OGFlMTVkYTg3ZGU1ZjlkMjA0M2JjM2M4ZDYyM2E0NzFiN2VkZjczYzhlYzhiZjdhOTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.4IWWfVJwtywhL25cSlf-BVMRwhWiQDCwc0lp8kNiyu0)