-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Support serializable toolbar #2138
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
bb88c05
Add the Store API and initial documentation.
tim-schilling 19b5695
Remove config from docs as sphinx says it's misspelled.
tim-schilling 97fcda7
Switch to Store.request_ids and remove serialization force_str.
tim-schilling 487dfb3
Log serialization warning when a panel errors. (#1810)
tim-schilling e7cf575
Ignore common venv folder.
tim-schilling c4201fa
Rename store_id variants to request_id
bbbbb34
Support serializable panels. This is a WIP and needs clean-up.
e2f695b
Support serializable sql panel
tim-schilling 14a5e0c
Make Panel.panel_id a classmember.
tim-schilling a31115f
Force everything to a string if it can't be serialized.
tim-schilling 71edcf5
Support serialization of FunctionCall
tim-schilling c03f08f
Update all panels to use data from get_stats on render
tim-schilling 47bdabe
Extend example app to have an async version.
tim-schilling dd53424
Merge branch 'main' into serialize-panels
tim-schilling 16e02f5
Rework the alerts panel to be compatible with serialization.
tim-schilling 3e4c484
Make template panel serializable.
tim-schilling f4ff5f4
Avoid caching the config settings.
d3730a6
Fix tests for serializable changes with selenium.
c660269
Comment out the async button because it breaks the wsgi app.
8402c4d
Hack: Sleep before checking to see if the history panel auto updated.
e1c0755
Improve clarity of record_stats for serialization. (#1965)
tim-schilling 5a21920
Merge branch 'main' into serializable
tim-schilling 89c4786
Added check for pytest as test runner for IS_RUNNING_TESTS.
tim-schilling 73eea66
Fixes #2073 -- Added DatabaseStore for persistent debug data storage.…
dr-rompecabezas 153c22b
Merge branch 'main' into serializable
tim-schilling f8bfb0d
Move serializable changes into the main change log.
tim-schilling bf77c70
Updated replaceToolbarState to use request id.
tim-schilling 0cbf478
Merge branch 'main' into serializable
matthiask 7a638c7
Removed unnecessary SQLPanel.record_stats
tim-schilling 2fafbb4
Merge branch 'main' into serializable
tim-schilling File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Switch to Store.request_ids and remove serialization force_str.
If the serialization logic begins throwing exceptions we can consider subclassing the encoder class and using force_str on the object itself.
- Loading branch information
commit 97fcda7270ab959aba4a6fc2fab0b2a0ca062972
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Using
_request_ids = deque(maxlen=dt_settings.get_config()["RESULTS_CACHE_SIZE"])would keep this bounded without having to manually pop items off. You'd still have to maintain the contents of_request_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.
Removing things from
_request_storeis the problem unfortunately. We need the ids from_request_idsto remove the correct elements from_request_store. If we make_request_idsbounded, we lose the ability to identify which ids are being removed from the collection to remove the correct elements from the 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.
Yeah, after adding to
_request_idsyou'd have to get the set of current ids, find the stale ids in the_request_storeif any got popped off b/c of the bounding, then delete those.... which would be less efficient. What you have is optimized, I agree.