Repository navigation
feat: allow up to 10,000 filter keys per column in team settings #3657
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| '@hyperdx/app': patch | ||
| '@hyperdx/common-utils': patch | ||
| --- | ||
|
|
||
| feat: allow up to 10,000 in the team "Filter Keys Fetch Limit" setting | ||
|
|
||
| The setting's input in Team settings stopped at 1,000 keys per column; it now | ||
| accepts up to 10,000. Map key discovery returns up to the setting's value per | ||
| Map column, and never fewer than 1,000. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ import { | |
| JSDataType, | ||
| } from '@hyperdx/common-utils/dist/clickhouse'; | ||
| import { | ||
| DEFAULT_MAX_KEYS, | ||
| Field, | ||
| FieldsCondition, | ||
| MetricNames, | ||
|
|
@@ -279,6 +280,9 @@ export function useMultipleAllFields( | |
| const metadata = useMetadataWithSettings(); | ||
| const { data: me, isFetched } = api.useMe(); | ||
| const isFieldMetadataDisabled = !!me?.team?.fieldMetadataDisabled; | ||
| // The team setting only raises Map key discovery, so a low limit doesn't | ||
| // shrink the keys offered to autocomplete and the other field pickers. | ||
| const maxKeys = Math.max(useFilterKeysFetchLimit(), DEFAULT_MAX_KEYS); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 P2 — Team limit now reaches getMapKeys unchecked, so a non-integer value from the API blanks every field for the table Tighten Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond |
||
| const allPopulated = tableConnections.every( | ||
| tc => !!tc.databaseName && !!tc.tableName && !!tc.connectionId, | ||
| ); | ||
|
|
@@ -291,6 +295,7 @@ export function useMultipleAllFields( | |
| timestampValueExpression, | ||
| isFieldMetadataDisabled, | ||
| conditions, | ||
| maxKeys, | ||
| ], | ||
| queryFn: () => | ||
| Promise.all( | ||
|
|
@@ -310,6 +315,7 @@ export function useMultipleAllFields( | |
| timestampValueExpression: | ||
| timestampValueExpression ?? tc.timestampValueExpression, | ||
| condition: conditions?.[i], | ||
| maxKeys, | ||
| }); | ||
| return { fields, columns }; | ||
| } catch (error) { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.