Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Dec 06, 2023
    • Cam Saul's avatar
    • Cam Saul's avatar
      Misc zoom-in-bins drill fixes (#36445) · 40b35743
      Cam Saul authored
      Unverified
      40b35743
    • Noah Moss's avatar
    • Cal Herries's avatar
      Unverified
      19e1f98d
    • Alexander Solovyov's avatar
    • Alexander Solovyov's avatar
      add Snyk workflow (#36349) · f2b7f78d
      Alexander Solovyov authored
      Resolves #35677
      Unverified
      f2b7f78d
    • Alexander Polyankin's avatar
    • Kamil Mielnik's avatar
      Expressions in FilterPicker without legacy query (#36396) · 2dc72a8b
      Kamil Mielnik authored
      * Add expression-clause-for-legacy-expression
      
      Fixes #34830.
      
      * Add legacy-expression-for-expression-clause
      
      * Fix wrapper function name
      
      * Include ExpressionClause in Aggregatable type
      
      * Use Aggregatable type in aggregate function
      
      * Rename query to legacyQuery in Expressions (part 1)
      
      * Rename query to legacyQuery in Expressions (part 2)
      
      * Rename query to legacyQuery in Expressions (part 3)
      
      * Support MLv2 expressionClause in processSource and ExpressionWidget
      
      * Revert changes to ExpressionStep as it's out of scope of this task
      
      * Use new expressionClause in ExpressionWidget
      
      * Use onSelect instead of onSelectLegacy in handleExpressionChange
      
      * Remove onSelectLegacy from AggregationPicker
      
      * Use nullish coalescing operator
      
      * Assert new onChangeExpression argument in test
      
      * Assert new onChangeExpression argument in test
      
      * Update AggregationPicker tests
      
      * Replace toEqual + expect.objectContaining with toMatchObject
      
      * Add stageIndex to setup, use destructuring for onSelect arguments
      
      * Deal with awkward assertions
      
      * Use props in a conservative way
      
      * Replace legacyQuery.database() with query + metadata
      
      * Add a TODO comment
      
      * Add clause prop to AggregationPicker
      
      * Migrate clause name
      
      * Replace 3rd argument in onChangeExpression with onChangeExpressionClause
      
      * Use destructuring
      
      * Allow AggregationClause, drop expression from ExpressionEditorTextfield
      
      * Make withExpressionName work with AggregationClause
      
      * Rename expressionClause to clause
      
      * Update tests with new interface
      
      * Use overloading instead of generics
      
      * Add function body
      
      * Rename operator to clause
      
      * Revert "Use overloading instead of generics"
      
      This reverts commit 3953f85b8f63764cbb09825fa45f52d82efd7b71.
      
      * Fix tests failing due to useSelect usage in AggregationPicker
      
      * Omit aggregation options converting expressions to legacy
      
      Fixes #36120.
      
      * Remove temporary hack
      
      * Get rid of props spread
      
      * Migrate isExpressionEditorInitiallyOpen to MLv2
      
      * Omit aggregation options converting expressions to legacy
      
      Fixes #36120.
      
      * Normalize legacy expressions as MBQL expressions
      
      * Fix isExpressionEditorInitiallyOpen
      
      * Update expressionName signature
      
      * Pass props in ExpressionStep tests in a usual way
      
      * Drop a conditional statement
      
      * Bring back expression prop for backwards-compatibility
      
      * Update ExpressionWidget validation & tests
      
      * Bring back using expression in componentWillReceiveProps
      
      * Bring back removed assertion
      
      * Remove legacyQuery prop from AggregationPicker
      
      * Add a test case for isExpressionEditorInitiallyOpen (which uses Lib.expressionName)
      
      * Fix legacyQuery creation
      
      * Add assertion for expression name
      
      * Fix committing expression with done button
      
      * Improve assertions in tests
      
      * Make with-expression-name set the display-name of the clause
      
      Fixes #36167.
      
      This is needed to be able to set/change the display name of custom aggregation columns too.
      
      * Add expression name assertion
      
      * Add expression name assertion
      
      * Add expression name assertion
      
      * Add expression name assertion
      
      * Add expression name assertion
      
      * Add expression name assertion
      
      * Add expression name assertion
      
      * Unskip an e2e test
      
      * Add expression name assertion
      
      * Add expression name assertion
      
      * Use displayInfo instead of displayName
      - see https://github.com/metabase/metabase/pull/36203#discussion_r1410496658
      
      * Deprecate displayName in favor of displayInfo
      - see https://metaboat.slack.com/archives/C0645JP1W81/p1701341786914219?thread_ts=1701335646.088359&cid=C0645JP1W81
      
      * Use clearer notation
      
      * Format code
      
      * Use displayInfo instead of expressionName in tests
      
      * Add isNamed attribute to ColumnDisplayInfo and ClauseDisplayInfo
      
      * Use displayInfo instead of expressionName in AggregationPicker
      
      * Drop expressionName
      
      * Drop redundant cast
      
      * Simplify isExpressionEditorInitiallyOpen interface
      
      * Use display-info with :named? instead of expression-name
      
      * Improve comment
      
      * Add :named? to the schema of display-info
      
      * Use conditional types for ExpressionWidget prop
      
      * Use getNotebookStep
      
      * Simplify condition
      
      * Simplify assertions
      
      * Use .lastCall
      
      * Remove isNamed attribute from ColumnDisplayInfo
      
      * Use .lastCall
      
      * Fix typing
      
      * Bring back legacyQuery prop to AggregationPicker
      
      * Fix isExpressionEditorInitiallyOpen for new clauses
      
      * Fix unit tests
      
      * Remove wrong assertion
      
      * Fix assertion
      
      * Trigger a change
      
      * Revert "Trigger a change"
      
      This reverts commit 254913dd85d7aa1059ca712e19e4e9f1e901dc8e.
      
      * Fix assertion
      
      * Allow FilterClause
      
      * Drop legacyFilter usage from FilterPicker, FilterStep & QuestionFilters
      
      * Update FilterPicker unit tests
      
      * Remove unused function
      
      * Fix types in unit test
      
      * Remove redundant waitFor
      
      * Update ColumnDisplayInfo type
      
      * Revert changes to ColumnDisplayInfo, avoid using semanticType & effectiveType attributes
      
      * Introduce NamedClause and CustomExpressionClause types
      
      * Simplify assertions
      
      * Remove casting from FilterPicker
      
      * Rename NamedClause to CustomNameClause
      
      * Exclude AggregationClause from FilterPicker's interfaces
      
      * Avoid casting using generics
      Unverified
      2dc72a8b
    • Denis Berezin's avatar
      Set embedding visual settings before initial render (#36095) · 2ffee750
      Denis Berezin authored
      * Move embedding settings prep before rendering
      
      * Revert not needed change
      
      * Add dynamic embedding settings for preview mode, add e2e tests for embedding settings
      
      * Refactor test, remove not needed code
      
      * Updates for e2e test based on code review
      Unverified
      2ffee750
    • Levente Kurusa's avatar
      team: add levex to BEC (#36434) · 18742132
      Levente Kurusa authored
      Unverified
      18742132
    • Mahatthana (Kelvin) Nomsawadi's avatar
      Fix click behavior link to dashboards/questions not using client router (#35975) · d4f85c24
      Mahatthana (Kelvin) Nomsawadi authored
      * Fix click behavior link to dashboards/questions not using client router
      
      * Make the code cleaner
      
      * Fix unit tests
      
      * Make API clearer
      
      * Address review: Handle case insensitive subpath
      
      * Add E2E tests
      
      * Fix failed E2E tests
      
      * Fix another fail E2E test
      
      * Add a test to ensure invalid URL won't break navigation
      
      * Add tests + ensure multiple level subpath works
      Unverified
      d4f85c24
  2. Dec 05, 2023
  3. Dec 04, 2023
    • Ngoc Khuat's avatar
      Sync dynamic tables for snowflake (#36121) · 6515ea75
      Ngoc Khuat authored
      Unverified
      6515ea75
    • Mark Bastian's avatar
      Ensure Metadata is Propagated for Standalone Pulse Cards (#36357) · 25c9addf
      Mark Bastian authored
      Pulse cards based on models with user-curated metadata were not showing proper formatting for percentages. This is because the singe `execute-card` function in `metabase.pulse.util` was not adding in the card `:result_metadata` when the card was a model.
      
      The metadata is now properly added.
      
      Additionally, `metabase.pulse.pulse-integration-test` has been refactored for reuse. The `with-metadata-data-cards` macro provides 3 examples of cards that should be tested (a base card, a model card, and a derived question) and a function that executeds the pulse and returns the resulting data in the last column (The one we are asserting on).
      
      Note that as we develop the test scenario in this ns there may be further refactoring opportunities, such as returning the attachments from the pulse email as well.
      Unverified
      25c9addf
    • bryan's avatar
      MB_CLOUD_GATEWAY_IPS is settable from env var (#36257) · a6cba791
      bryan authored
      * MB_CLOUD_GATEWAY_IPS is settable from env var
      
      it can be set to a comma delimited sequence of ips like: "1.2.3.4,5.6.7.8".
      
      * lint fix
      
      * uncomment cloud-gateway-ips setter
      
      * Make sure there's a value for mb-cloud-gateway-ips
      
      - before testing that it gets printed out
      
      * use .first to call .within on a single value
      Unverified
      a6cba791
    • Braden Shepherdson's avatar
      [MLv2] Underlying records: use card name as label for nested queries (#36318) · 0e044b96
      Braden Shepherdson authored
      Fixes #35340 by using the card's name if this question's source is a card.
      Unverified
      0e044b96
    • Aleksandr Lesnenko's avatar
      Unverified
      8d2b2396
    • dpsutton's avatar
      fix flaky audit tests (#36331) · 9b5af86b
      dpsutton authored
      
      * fix flaky audit tests
      
      somehow (and _only_ in cloverage running) we seem to end up with the
      audit collection but no cards in it. Then all of the tests are failing
      which check permissions.
      
      ```
      ERROR in (cannot-edit-audit-content-dashboards-over-api) (metabase/util.cljc:114)
      expected: (= "You don't have permissions to do that." (mt/user-http-request :rasta :put 403 (str "dashboard/" (u/the-id dashboard)) {:name "My new title"}))
        actual: java.lang.Exception: Not something with an ID: nil
       at metabase.util$error.invokeStatic (metabase/util.cljc:114)
      ```
      
      This is failing
      
      ```clojure
      (deftest cannot-edit-audit-content-dashboards-over-api
        (install-audit-db-if-needed!)
        (let [dashboard (t2/select-one :model/Dashboard :collection_id (:id (perms/default-audit-collection)))]
          (is (= "You don't have permissions to do that."
                                                                         ;; this dashboard is nil
                                                                         ;; and u/the-id errors
                 (mt/user-http-request :rasta :put 403 (str "dashboard/" (u/the-id dashboard)) {:name "My new title"})))))
      ```
      
      So let's ensure that all of the cards, dashboards, and collection exist,
      otherwise install them. Previously it was just checking that the
      collection existed, and for some reason it was empty
      
      * uncomment audit tests
      
      * remove excess comments + rewrite exists? queries
      
      ---------
      
      Co-authored-by: default avatarbryan <bryan.maass@gmail.com>
      Unverified
      9b5af86b
Loading