Repository navigation
fix(ui): look up at most 64 SQL Library dependencies per render - #2953
Open
angela-helios wants to merge 1 commit into
Open
angela-helios wants to merge 1 commit into
angela-helios wants to merge 1 commit into
Conversation
The SQL Query / SQL View page resolved every distinct depends-on reference on each render, one FHIR read or search (and possibly a terminology call) each, with no cap. It now looks up the first 64, the number $sql-run accepts per Library by default, and lists the rest as not looked up. Closes #2952
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #2952
Summary
The SQL Query / SQL View page resolved every distinct
depends-onreference on each render. Each one cost a FHIR read or a ViewDefinition search, and possibly a call to the terminology server, with no cap. A Library declaring thousands of dependencies therefore cost thousands of sequential calls whenever its page or Tables card rendered.resolve_table_rowsnow looks up at mostMAX_RESOLVED_DEPENDENCIES(64) distinct references per render. That is the number$sql-runaccepts per Library by default (4 ×HFS_SOF_SQLQUERY_MAX_VDSof 16).The references past the cap get the new
TableTarget::Unresolvedrow. It shows "Not looked up", with the detail "Only the first 64 distinct dependencies are looked up.", in en, es and de. It does not claim Not found for something that was never checked. A reference repeated under several labels still counts once.Tests
router_http::a_library_with_too_many_dependencies_looks_up_only_the_first_64: asql-viewLibrary with 70 distinct dependencies renders 64 Not found rows (nothing stores them) and 6 Not looked up rows, plus the detail text.With the cap lifted, every dependency is looked up and the test fails:
left: 0, right: 6.cargo test -p helios-ui: 1002 passed, the catalog tests for every locale included. Clippy onhelios-ui --all-targetsis clean.