Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Apr 18, 2025
    • Romeo Van Snick's avatar
      Merge resolver into compiler (#56647) · 344b722f
      Romeo Van Snick authored
      * Resolve dimensions while compiling
      
      * Use resolver in pratt compiler instead of resolver pass
      
      * Remove legacy resolver
      
      * Add missing imports
      
      * Add startRule to compiler in test
      
      * Use helper to calculate argtype
      
      * Provide a default implementation of argType
      
      * Return expressionParts from compiler
      
      * Convert resolver tests to use compiler
      
      * Remove superflouous comment
      
      * Convert MAP_TYPE to a function
      
      * Rename field-resolver to resolver
      
      * Simplify resolver check
      
      * Move resolver-related code into resolver module
      344b722f
    • Nick Fitzpatrick's avatar
      Pinned items moderation status (#56668) · db1aaa49
      Nick Fitzpatrick authored
      * pinned questions show moderated status, handle their own caption title
      
      * unit tests, description
      
      * fixing grid spacing
      
      * e2e test adjustments
      
      * fix for verified skeletons
      
      * update quetion embed test, dashboard embed test
      db1aaa49
  2. Apr 17, 2025
    • Alexander Polyankin's avatar
      Fix pivot metadata (#56786) · fbe7122d
      Alexander Polyankin authored
      fbe7122d
    • Ryan Laurie's avatar
      Refactor Upload Settings to use RTK + Mantine (#55780) · 1e303ea3
      Ryan Laurie authored
      * Refactor Upload Settings to use RTK + Mantine
      1e303ea3
    • Oleksandr Yakushev's avatar
      [test] Speed up metabase.pulse.send-test tests (#56336) · 7a0bd60c
      Oleksandr Yakushev authored
      * perf: Optimize duplicate-model-ids and search/ingestion functions
      
      * [test] Mock javascript-visualization in m.pulse.send-test to speed up tests
      7a0bd60c
    • Braden Shepherdson's avatar
      [refs] Return `:ident`s in QP `annotate`; save in `:result_metadata` (#56244) · 0a4d7039
      Braden Shepherdson authored
      Fixes [QUE-701](https://linear.app/metabase/issue/QUE-701), [QUE-778](https://linear.app/metabase/issue/QUE-778),  [QUE-777](https://linear.app/metabase/issue/QUE-777),  [QUE-776](https://linear.app/metabase/issue/QUE-776),  [QUE-703](https://linear.app/metabase/issue/QUE-703),  [QUE-704](https://linear.app/metabase/issue/QUE-704).
      
      ### Description
      
      Directly implements `:ident` calculation for legacy MBQL in the QP!
      
      Also changes the spelling of compound idents to eg. `join[JoinClauseIdent]__InnerColumnIdent`, `native[CardEntityId]__COLUMN_NAME`, etc. The advantage of this is that NanoIDs cannot contain `[]`, whereas they do contain `_`s. Then we can make sure there's no missing `entity_id`s (a common issue) by looking for `native[]`. `native____` might have happened by accident is the NanoID started with two underscores.
      
      This is an unfortunately large PR, but I don't think much can be done to help that.
      The output of `annotate` becomes `Card.result_metadata`, which is a key **input** to
      `annotate`. So we have to tackle legacy metadata end to end to produce a healthy PR.
      
      (A prior attempt to use the lib and match up the results turned into a cluster of hacks,
      and required half of these changes anyway, so this direct approach seems more sound.)
      
      Most of this logic lives in the `annotate` post-processing middleware, with
      some support from `add-source-metadata` pre-processing.
      
      
      #### Idents
      
      This generates correct idents for proper fields, expressions,
      aggregations, breakouts, explicit and implicit joins, native queries and
      models (native and MBQL).
      
      #### Safety checks and Guarantees
      
      Also adds and strengthens several safety checks in the library and
      elsewhere. The guarantees I hope we can count on at this point are:
      - Cards are saved with correct `:ident`s in their `:result_metadata`.
      - Cards with old `:result_metadata` get (correct) `:ident`s added on read.
      - Lib can now rely on getting correct idents for all input cards!
      - Therefore the lib (BE + FE) can compute the ident for **every column**.
      
      #### Placeholder idents
      
      For native queries, we can only get `result_metadata` from executing them.
      The usual flow is:
      - Write the query
      - Send it as an ad-hoc `/api/dataset` request
      - Get back `result_metadata`
      - Save it, passing the `result_metadata` back to the BE.
      
      We need a card `entity_id` to create idents for a native query, but an ad-hoc
      query doesn't have a card yet! The BE now generates a placeholder `entity_id`,
      which gets replaced on save with the new card's actual `entity_id`. These
      placeholders contain (1) illegal NanoID characters, and (2) a NanoID, which
      means they cannot be mistaken for non-placeholder NanoID, and that they are
      still globally unique, so there's no caching concerns.
      0a4d7039
    • Romeo Van Snick's avatar
      Convert diagnostics to lib (#56646) · 66ba50cf
      Romeo Van Snick authored
      * Move diagnostics to separate dir
      
      * Use correct type for startRule arg
      
      * Split up diagnostics into sepearate files per check
      
      * Use throw for checks that don't yet
      
      * Pull out syntax checks into separate function
      
      * Split up lib.diagnoseExpression into helper
      
      * Return expressionParts from compiler
      
      * Add vist helper that walks Lib.ExpressionParts
      
      * Convert check-known-functions to use Lib.ExpressionParts
      
      * Convert check-supported-functions to use Lib.ExpressionParts
      
      * Convert check-comparison-operator-args to use Lib.ExpressionParts
      
      * Convert check-arg-count to use Lib.ExpressionParts
      
      * Convert check-case-or-if-arg-count to use Lib.ExpressionParts
      
      * Convert check-arg-validators to use Lib.ExpressionParts
      
      * Remove legacy visitor
      
      * Also pass expression clause to diagnostics
      
      * Use pMBQL in diagnose-expression
      
      * Stop passing expression to diagnostic checkers
      
      * Rename visit to visitor
      66ba50cf
    • Timofey Kachalov's avatar
      3764616d
    • Timofey Kachalov's avatar
    • Phoomparin Mano's avatar
      Improve PDF and results download button UI in static embedding (#56541) · ebcdfddf
      Phoomparin Mano authored
      * replace the export button in dashboard header
      
      * use the same download button style for both
      
      * add styles for compact download button
      
      * change the compact export button style
      
      * add download button logic
      
      * update data-testid
      
      * update dashboard tests in public-resource-downloads
      
      * use getDashboardCard helper instead
      
      * move question result download to header
      
      * remove PDF export localized test
      
      * add PublicOrEmbeddedDashboardView loki diffs
      
      * use text-primary instead of text-dark for download icons
      
      * simplify downloadAndAssert embed logic
      
      * simplify classnames merging
      
      * revert ExportPdfMenuItem
      
      * cleanup TitleAndDescriptionContainer
      
      * revert LegendCaption
      
      * show the header if headerButtons is not null
      
      * standalone question download results only shows up on card hover
      
      * always show header if there is a header button
      
      * add floating headers when title is hidden
      
      * add comment on floating header buttons
      
      * use accessible label selectors instead of data-testid
      
      * replace question-results-download-button testid with accessible label
      
      * cleanup downloadAndAssert logic
      
      * update tests
      
      * support shared selector
      
      * update unit test for PublicOrEmbeddedDashboardPage.enterprise
      
      * update unit test for PublicOrEmbeddedDashboardPage.premium
      
      * update unit test for PublicOrEmbedded
      
      * update localization tests
      
      * localize aria-label and re-add label tests
      
      * make aria-label "Download as PDF" for all instances
      
      * fix question tests on locale hash params
      
      * fix tests on disabling downloads
      
      * add realHover case to downloadAndAssert
      
      * update testid in LegendDescriptionIcon
      
      * update public-resource-downloads cypress test
      
      * use visibility checks in tests
      
      * restore ellipsis button size
      
      * restore hover parent state to standalone question
      
      * update localization tests that referenced PDF export button
      
      * remove eslint-disable directives
      
      * update ChartSkeleton
      
      * update ChartSkeleton
      
      * lift spacing to LegendCaption
      
      * use lighter colors for dashcard downloads
      
      * add new loki snapshots
      
      * use the auto refresh text for locale tests as pdf export text is gone
      
      * use the lighter color for all download icons
      
      * add new loki snapshots
      
      * update test assertions for locale tests
      ebcdfddf
    • appleby's avatar
    • Tyler Plude's avatar
      daf6c948
    • bryan's avatar
      eb06aa0d
    • Nicolò Pretto's avatar
      fix(sdk): use instance locale if no locale is passed (#56683) · 88a88270
      Nicolò Pretto authored
      
      * fix(sdk): use instance locale if no locale is passed
      
      * update docs
      
      * we do support country codes, we have tests for it
      
      * Update e2e/test-component/scenarios/embedding-sdk/locale-on-provider.cy.spec.tsx
      
      Co-authored-by: default avatarPhoomparin Mano <poom@metabase.com>
      
      * remove manual fallback to "en", site-locale is never undefined as it has
      a default
      
      ---------
      
      Co-authored-by: default avatarPhoomparin Mano <poom@metabase.com>
      88a88270
    • Timofey Kachalov's avatar
    • Sloan Sparger's avatar
    • Edward Paget's avatar
      fix: make enhance table stats a single query (#56738) · 5ed1cf1a
      Edward Paget authored
      Avoids hitting the postgresql query parameter limit when there are more
      than MAX_UINT16 tables in a database, also should be more efficient to
      fetch this in a single query.
      5ed1cf1a
    • Kamil Mielnik's avatar
      SEM-173 Allow filtering logs on specific namespaces (#56772) · 98f9c394
      Kamil Mielnik authored
      * Use Mantine instead of styled components
      
      * Fix centering
      
      * Add task and status params
      
      * Add TaskStatusPicker
      
      * Make picker clearable
      
      * Add task picker
      
      * Put filters and pagination together
      
      * Translate task status
      
      * Break down logic
      
      * Move loading and error state
      
      * Always render something
      
      * Make task picker searchable
      
      * Add empty state to the table
      
      * Fix clear button being transparent
      
      * Add useUrlState
      
      * Use useUrlState in TasksApp
      
      * Move UrlState to its own file
      
      * Sort
      
      * Rename file
      
      * Rename
      
      * Clean invalid query params on mount
      
      * Prettier
      
      * Use Action
      
      * Ignore invalid pages
      
      * Reuse variable
      
      * Fix tests
      
      * Add test
      
      * Add label to clear button
      
      * Remove redundant condition
      
      * Add assertions
      
      * Improve typing
      
      * Be explicit about empty string handling
      
      * Add url state to logs
      
      * Add download button
      
      * Disable the button instead of hiding it
      
      * Add query input
      
      * Add clear button
      
      * Improve copy
      
      * Typo
      
      * Fix unit tests setup
      
      * Improve empty state message
      
      * Support location in setup
      
      * Add a test for empty state message when filtering
      
      * Add a test
      
      * Add download button assertions
      
      * Add e2e tests
      
      * Simplify assertion
      
      * Remove redundant element
      
      * Add debounce
      
      * Fix timezone issue
      
      * Extract TasksTable
      
      * Move use-url-state to its own directory
      
      * Add unit tests for useUrlState
      
      * Add test
      
      * Refactor
      
      * Add more tests
      
      * Fix missing import
      
      * Add task endpoints mocks
      
      * Add TasksApp tests boilerplate
      
      * Add pagination test
      
      * Add tests for filters
      
      * Add more tests
      
      * Update tests
      
      * Update tests
      
      * Add more assertions
      98f9c394
    • Romeo Van Snick's avatar
      Clean up unused code in the expression parser (#56706) · 04973ca2
      Romeo Van Snick authored
      * Remove unused hooks
      
      * Simplify error creation in pratt parser
      
      * Simplify CompileError construction and remove unused data
      04973ca2
    • Kamil Mielnik's avatar
      SEM-110 Support filtering of tasks list by status and task name (#56664) · b8f0117f
      Kamil Mielnik authored
      * Use Mantine instead of styled components
      
      * Fix centering
      
      * Add task and status params
      
      * Add TaskStatusPicker
      
      * Make picker clearable
      
      * Add task picker
      
      * Put filters and pagination together
      
      * Translate task status
      
      * Break down logic
      
      * Move loading and error state
      
      * Always render something
      
      * Make task picker searchable
      
      * Add empty state to the table
      
      * Fix clear button being transparent
      
      * Add useUrlState
      
      * Use useUrlState in TasksApp
      
      * Move UrlState to its own file
      
      * Sort
      
      * Rename file
      
      * Rename
      
      * Clean invalid query params on mount
      
      * Prettier
      
      * Use Action
      
      * Ignore invalid pages
      
      * Reuse variable
      
      * Fix tests
      
      * Add test
      
      * Add label to clear button
      
      * Remove redundant condition
      
      * Add assertions
      
      * Improve typing
      
      * Be explicit about empty string handling
      
      * Extract TasksTable
      
      * Move use-url-state to its own directory
      
      * Add unit tests for useUrlState
      
      * Add test
      
      * Refactor
      
      * Add more tests
      
      * Fix missing import
      
      * Add task endpoints mocks
      
      * Add TasksApp tests boilerplate
      
      * Add pagination test
      
      * Add tests for filters
      
      * Add more tests
      b8f0117f
    • lbrdnk's avatar
      2a827d44
    • Timofey Kachalov's avatar
    • Nicolò Pretto's avatar
      6999843d
    • lbrdnk's avatar
      Add sorting capabilities to GET /task/ endpoint (#56795) · 7cb34455
      lbrdnk authored
      * Add sorting
      
      * Add test
      
      * Adjust ordering for h2
      
      * Use merge instead of union
      
      * kondo
      
      * Undefined nil ordering among various app dbs
      7cb34455
    • Nick Fitzpatrick's avatar
      Snowplow tracking for shortcuts (#56744) · 9aec86ab
      Nick Fitzpatrick authored
      * temo
      
      * enable tracking for shortcuts
      
      * amending e2e test
      9aec86ab
  3. Apr 16, 2025
    • Nick Fitzpatrick's avatar
      Disabled shortcuts when a modal is open on the page (#56806) · bf27059a
      Nick Fitzpatrick authored
      * Disabled shortcuts when a modal is open on the page
      
      * fix context check
      
      * removing irrelevant test
      bf27059a
    • Uladzimir Havenchyk's avatar
    • Romeo Van Snick's avatar
      Convert compiler to lib (#56426) · 633a4565
      Romeo Van Snick authored
      
      * Convert pratt compiler to use ExpressionParts
      
      * Simplify compile by using compileNode helper
      
      * Add todo's about casts
      
      * Simplify error creation
      
      * Make assertions more consistent and translate error messages
      
      * Remove any check
      
      * Simplify compiler by moving stuff into infix/unary helpers
      
      * Remove unused assertions
      
      * Remove casts on constant operator names
      
      * Add assertions for operators
      
      * Wrap top-level literals in a value clause
      
      * Handle bigints in pratt compiler
      
      * Accept ExpressionParts in Lib.expressionClause
      
      * Remove null from ExpressionArgs
      
      * Add field and metric to expression operator
      
      * Simplify pratt compiler types
      
      * Add more tests for equivalent clauses
      
      * Return metadata objects directly from field-resolver
      
      * Add more operators to type
      
      * Create type for field type
      
      * Remove resolverPass
      
      * Convert resolver to Lib.ExpressionParts
      
      * Convert compiler to expressionParts
      
      * Fix syntax error
      
      * Fix types
      
      * Remove unused passes
      
      * Fix resolver tests
      
      * Add types to top-level literals
      
      * WIP: convert untagged expression-parts from #js
      
      * Manually unwrap field, segment and metric metadata
      
      * Unwrap options in pratt compiler
      
      * Remove empty options
      
      * Handle normalized expression when diagnosing
      
      * Allow customizing field resolver
      
      * Fix fuzz tests
      
      * Add value to ExpressionOperator
      
      * Remove unused TODO's
      
      * Use constants in test so types match
      
      * Wrap clauses in defineClause and extract list of defined clauses
      
      * Forbid setting name on clause config
      
      * Use defined clause name as ExpressionOperator
      
      * Use getClauseDefinition helper to get clause definitions
      
      * Ignore type in filters
      
      * Move expression-parts transformation to lib.js
      
      * Add type-of method implementations for field, metrics and segments
      
      * Trigger change when fast setting custom expression
      
      * Remove superflouous casts
      
      * Simplify resolver return type
      
      * Use reference for top-level fields
      
      * Be more specific about types in compiler
      
      * Convert operator to string
      
      * Add unit test for specific expressions
      
      * Fix literals icons
      
      * Remove unused matchers
      
      * Remove unused option from compiler
      
      * Negate number literals directly in compiler
      
      * Add expression-clause implementation that takes one argument
      
      * Use single-arg version of Lib.expressionParts
      
      * Remove TODO
      
      * Use helper to compile top level literal
      
      * Add effective-type to top-level literals
      
      * Remove unused MBQLCLauseMap type
      
      * Remove unused import
      
      * Add two-argument version of expressionClause
      
      * Wait for button to be visible
      
      * Add operator to invalid operator assertion
      
      * Remove incorrect operator check
      
      * Add more specific type to clause name
      
      * Always throw if function name is not found
      
      * Add overloads to getDefinedClause for known function names
      
      * Document the allowFastSet typing hack
      
      * Lift operator check
      
      * Convert nil to {} in body
      
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      
      * Make expression-parts js conversion more clear
      
      * Pass through lib.metadata.calculation/type-of for the type-of implementations
      
      * Always throw assertion errors
      
      * Use helper to check query invariants
      
      * Remove lib.schema.expression/type-of methods
      
      * Add test for normalization of uppercase keyword arguments
      
      * Allow some normalizers to ignore case
      
      * Use threading for lowercase converter
      
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      
      * Structure test better
      
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      
      * Remove unused var
      
      ---------
      
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      633a4565
    • Nick Fitzpatrick's avatar
      Update navigation shortcuts to be key sequences (#56798) · 6a782d5e
      Nick Fitzpatrick authored
      * adjusting keyboard shortcuts, event names
      
      * adding viewing context to dashboard shortcuts
      
      * adding unit tests for enforce some sanity
      6a782d5e
    • Uladzimir Havenchyk's avatar
      ci: extract build-matrix script (#56773) · fa896cbe
      Uladzimir Havenchyk authored
      * ci: extract build-matrix script
      
      * fixup
      
      * fixup
      
      * add a test
      
      * make executable?
      
      * checkout
      
      * fix path
      
      * add tests from .github to file-path
      
      * fixup
      fa896cbe
    • appleby's avatar
      Log metric data for failures in qp.middleware.metrics/adjust (#56747) · 50e2c326
      appleby authored
      * Log metric data for failures in qp.middleware.metrics/adjust
      
      When qp.middleware.metrics/adjust fails to expand a metric, log the metric's name and dataset_query, not just the
      metric id.
      
      Closes QUE-862
      
      * Update test to assert that metric data is present in ExceptionInfo
      50e2c326
    • bryan's avatar
      fix missing deps.edn checksum (#56800) · 8bb6ef90
      bryan authored
      8bb6ef90
    • Alexander Polyankin's avatar
      781af5af
    • Kamil Mielnik's avatar
      yarn remove use-debounce (#56784) · ec25a3ac
      Kamil Mielnik authored
      ec25a3ac
    • Nicolò Pretto's avatar
      POC of cross version tests to detect breaking changes (#56130) · 5d9bb598
      Nicolò Pretto authored
      
      * wip script to build the frankenjar
      
      * build/run/test functions that seem to be working
      
      * preparing for ci
      
      * wip ci workflow
      
      * need to run the job "manually" at least one to be able to dispatch it
      from the gh cli
      
      * add workflow_call
      
      * bash instead of sh to solve issue of illegal option -o pipefail?
      
      * use correct version of node
      
      * prepare backend
      
      * more envs to ci
      
      * make jar run on the background in ci
      
      * trying to run a list of specs in ci, tagging with tags probably won't
      work as tags potentially need to be there on "older" versions of the
      test
      
      * fewer tests so it maybe doesn't timeout
      
      * run on prs targerting the pr branch and the target base one
      :wq
      
      * clean up
      
      * fix: without --env it wasn't really using the grepTags param:wq
      
      * refactor: check for the actual files instead of doing ls*
      
      * add back some more test files
      
      * add log for ci
      
      * remove colors as they're not shown in ci
      
      * test: wait for data to load in a flaky test
      
      * test: wait for data to load in a flaky test
      
      * make sure we're building the EE jar
      
      * skip licnese step as we don't need it
      
      * move script out of embedding-sdk folder
      
      * make curl -s to spam less in ci
      
      * refactor: move jops to keep the result job last
      
      ---------
      
      Co-authored-by: default avatarUladzimir Havenchyk <uladzimir.dev@gmail.com>
      5d9bb598
    • Riley Thompson's avatar
    • lbrdnk's avatar
      Address remarks for status and task filtering in GET /task endpoint (#56774) · 22f176f8
      lbrdnk authored
      * Docstring
      
      * Support :unknown task
      
      * Add tasks-count
      
      * Use tasks-count in the API definition
      
      * Rename to total
      
      * Add and update tests
      
      * docstring
      22f176f8
    • metamben's avatar
      21b29f39
    • Ngoc Khuat's avatar
      88e251c4
    • github-automation-metabase's avatar
      Bump com.google.guava/guava from 33.4.5-jre to 33.4.6-jre (#55972) · 4bdc21b1
      github-automation-metabase authored
      
      Inspect dependency changes here:
      
      Co-authored-by: default avatarMetabase bot <metabase-bot@metabase.com>
      4bdc21b1
Loading