Skip to content
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

Merged
merged 8 commits into from
Mar 15, 2024

Conversation

rileyajones
Copy link
Contributor

@rileyajones rileyajones commented Mar 12, 2024

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

The profiler plugin can read read these!
image

@rileyajones rileyajones requested a review from bmd3k March 13, 2024 19:06
tensorboard/webapp/core/types.ts Outdated Show resolved Hide resolved
tensorboard/webapp/core/types.ts Outdated Show resolved Hide resolved
@@ -148,6 +148,13 @@ export class DashboardDeepLinkProvider extends DeepLinkProvider {
return [{key: RUN_FILTER_KEY, value}];
})
),
store
Copy link
Contributor

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.

Copy link
Contributor Author

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, {
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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', () => {

Copy link
Contributor Author

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

@rileyajones rileyajones merged commit 23073c5 into tensorflow:master Mar 15, 2024
13 checks passed
AnuarTB pushed a commit to AnuarTB/tensorboard that referenced this pull request May 3, 2024
## 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)
bmd3k added a commit that referenced this pull request Jun 5, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants