Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Jun 02, 2022
  2. Jun 01, 2022
  3. May 31, 2022
    • dpsutton's avatar
      Bump transitive com.google.code.gson/gson (#23069) · d7b9ce1c
      dpsutton authored
      An alert from trivy:
      
      ```
      Package: com.google.code.gson:gson
      Installed Version: 2.8.7
      Vulnerability CVE-2022-25647
      Severity: HIGH
      Fixed Version: 2.8.9
      Link: CVE-2022-25647
      Trivy
      ```
      
      running `clj -Sdeps` will not show this dep because it is in two
      drivers. Instead running
      
      ```
      clj A:ee:drivers
      ```
      
      will find it.
      
      ```
      . metabase/bigquery-cloud-sdk /Users/dan/projects/work/metabase/modules/drivers/bigquery-cloud-sdk
          . com.google.cloud/google-cloud-bigquery 1.135.4
            . com.google.code.gson/gson 2.8.7
      ```
      
      and
      
      ```
        . metabase/googleanalytics /Users/dan/projects/work/metabase/modules/drivers/googleanalytics
          . com.google.apis/google-api-services-analytics v3-rev20190807-1.32.1
            . com.google.api-client/google-api-client 1.32.1
              . com.google.http-client/google-http-client-gson 1.39.2
                X com.google.code.gson/gson 2.8.6 :older-version
      ```
      
      This shows: google analytics depends on 2.8.6 but it is not actually
      used and bigquery-cloud-sdk depends on 2.8.7 which is the version that
      we are ending up with. (The `X` means excluded from the jar with reason
      being `:older-version`).
      
      More info:
      
      https://clojure.org/reference/dep_expansion#_tree_printing
      
      ```
      Trees are built from the trace log and include all considered nodes. Included nodes are prefixed with .. Excluded nodes are prefixed with X. The end of the line will contain the reason code (some codes are suppressed). The current set of reason codes (subject to change) are:
      
          :new-top-dep - included as top dep (suppressed)
      
          :new-dep - included as new dep (suppressed)
      
          :same-version - excluded, same as currently selected dep (suppressed)
      
          :newer-version - included, newer version than previously selected
      
          :use-top - excluded, same as top lib but not at top
      
          :older-version - excluded, older version than previously selected
      
          :excluded - excluded, node in parent path excluded this lib
      
          :parent-omitted - excluded, parent node deselected
      
          :superseded - excluded, this version was deselected
      
      ```
      
      THE FIX:
      
      Just put a top level dependency on the version we care about. No need to
      exclude the version. Technically only need it in one project as our
      build would always use the specified version. But in case anyone builds
      with just one or the other included in both for completeness with a
      comment indicating the other location.
      
      ```clojure
      com.google.code.gson/gson {:mvn/version "2.8.9"}
      ```
      
      PROOF OF FIX:
      
      clj -A:ee:drivers and look for gson
      
      ```
        . metabase/bigquery-cloud-sdk /Users/dan/projects/work/metabase/modules/drivers/bigquery-cloud-sdk
          . com.google.cloud/google-cloud-bigquery 1.135.4
            X com.google.code.gson/gson 2.8.7 :older-version
      ```
      
      ```
      . metabase/googleanalytics /Users/dan/projects/work/metabase/modules/drivers/googleanalytics
          . com.google.apis/google-api-services-analytics v3-rev20190807-1.32.1
            . com.google.api-client/google-api-client 1.32.1
              . com.google.http-client/google-http-client-gson 1.39.2
                X com.google.code.gson/gson 2.8.6 :older-version
          . com.google.code.gson/gson 2.8.9
      ```
      
      - 2.8.7 in bigquery-cloud-sdk now has an `X` and `:older-version`
      - 2.8.6 in google analytics still has `X` and `:older-version`
      - metabase/googleanalytics now has a top level (and included `.`) gson on 2.8.9
      Unverified
      d7b9ce1c
    • Braden Shepherdson's avatar
      Add entity_id columns to serialized tables with external IDs (#22762) · 911892b8
      Braden Shepherdson authored
      That is: collection, dimension, metric, native_query_snippet, pulse,
      report_card, report_dashboard, report_dashcard, segment, timeline
      
      Notably that doesn't include database, table, or field, since those all
      have external unique IDs that are used instead.
      Unverified
      911892b8
    • Case Nelson's avatar
      Include field annotations for native queries too (#22962) · 87d4e587
      Case Nelson authored
      * Include field annotations for native queries too
      
      Persistence will replace a source-table source-query with a native
      query, but preprocess has still filled in source-metadata with all of
      the relevant field-ids expected to be returned. With this change we
      include field info from the store in the same way that mbql-cols does.
      This allows persisted models to honor field settings like `:visibility
      :details-only`.
      
      * Force type of merge-source-metadata-col to map
      
      By doing the lookup to store/field at the top of the merge, the type of
      annotations coming through was a FieldInstance. Tests, at least, were
      unhappy about this and it's better not to change it.
      
      * Resolve fields for ids in source-metadata
      
      Makes sure that the qp/store has all the available fields for
      annotations.
      
      * Recursively find source-metadata field-ids for annotations
      
      * Use transducer as per review
      Unverified
      87d4e587
    • Alexander Lesnenko's avatar
      fix login form mobile layout (#23046) · 6e64e2ce
      Alexander Lesnenko authored
      * fix login form mobile layout
      
      * add padding
      Unverified
      6e64e2ce
    • Alexander Lesnenko's avatar
    • Alexander Lesnenko's avatar
    • Dalton's avatar
      Migrate card parameter utils to TypeScript (#22965) · ea9a7d01
      Dalton authored
      * Convert dashboard parameter utils to TypeScript
      
      * Remove unused imports
      
      * Convert parameter card utils to TypeScript
      Unverified
      ea9a7d01
    • Dalton's avatar
      Migrate dashboard parameter utils to TypeScript (#22985) · 37c4d3bf
      Dalton authored
      * Convert dashboard parameter utils to TypeScript
      
      * Remove unused imports
      Unverified
      37c4d3bf
    • Dalton's avatar
      Fix missing 'meta' variable (#23016) · 6b43a560
      Dalton authored
      Unverified
      6b43a560
    • dpsutton's avatar
      Fix deadlock in pivot table connection management (#22981) · a15fc4ea
      dpsutton authored
      Addresses part of https://github.com/metabase/metabase/issues/8679
      
      Pivot tables can have subqueries that run to create tallies. We do not
      hold the entirety of resultsets in memory so we have a bit of an
      inversion of control flow: connections are opened, queries run, and
      result sets are transduced and then the connection closed.
      
      The error here was that subsequent queries for the pivot were run while
      the first connection is still held open. But the connection is no longer
      needed. But enough pivots running at the same time in a dashboard can
      create a deadlock where the subqueries need a new connection, but the
      main queries cannot be released until the subqueries have completed.
      
      Also, rf management is critical. It's completion arity must be called
      once and only once. We also have middleware that need to be
      composed (format, etc) and others that can only be composed
      once (limit). We have to save the original reducing function before
      composition (this is the one that can write to the download writer, etc)
      but compose it each time we use it with `(rff metadata)` so we have the
      format and other middleware. Keeping this distinction in mind will save
      you lots of time. (The limit query will ignore all subsequent rows if
      you just grab the output of `(rff metadata)` and not the rf returned
      from the `:rff` key on the context.
      
      But this takes the following connection management:
      
      ```
      tap> "OPENING CONNECTION 0"
      tap> "already open: "
        tap> "OPENING CONNECTION 1"
        tap> "already open: 0"
        tap> "CLOSING CONNECTION 1"
        tap> "OPENING CONNECTION 2"
        tap> "already open: 0"
        tap> "CLOSING CONNECTION 2"
        tap> "OPENING CONNECTION 3"
        tap> "already open: 0"
        tap> "CLOSING CONNECTION 3"
      tap> "CLOSING CONNECTION 0"
      ```
      
      and properly sequences it so that connection 0 is closed before opening
      connection 1.
      
      It hijacks the executef to just pass that function into the reducef part
      so we can reduce multiple times and therefore control the
      connections. Otherwise the reducef happens "inside" of the executef at
      which point the connection is closed.
      
      Care is taken to ensure that:
      - the init is only called once (subsequent queries have the init of the
      rf overridden to just return `init` (the acc passed in) rather than
      `(rf)`
      - the completion arity is only called once (use of `(completing rf)` and
      the reducing function in the subsequent queries is just `([acc] acc)`
      and does not call `(rf acc)`. Remember this is just on the lower
      reducing function and all of the takes, formats, etc _above_ it will
      have the completion arity called because we are using transduce. The
      completion arity is what takes the volatile rows and row counts and
      actually nests them in the `{:data {:rows []}` structure. Without
      calling that once (and ONLY once) you end up with no actual
      results. they are just in memory.
      Unverified
      a15fc4ea
    • Benoit Vinay's avatar
      Alert to typescript (#22832) · e8ba7d53
      Benoit Vinay authored
      * Types added to Alert
      
      * Alert package created
      
      * utils added to Alert
      
      * Clean up Question
      
      * alertType back in
      
      * Query import added back in
      
      * Types imports updated
      
      * Fix Dashboard types
      Unverified
      e8ba7d53
    • Anton Kulyk's avatar
      Refactor `TableSimple` visualization (#22982) · a2e90b15
      Anton Kulyk authored
      * Refactor TableSimple
      
      * Fix sorting
      
      * Move TableSimple to own directory
      
      * Move TableCell to own file
      
      * Migrate TableSimple to styled components
      
      * Migrate TableCell to styled components
      
      * Extract TableFooter component
      
      * Fix table cell selectors in cypress
      
      * Fix E2E tests
      Unverified
      a2e90b15
    • Natalie's avatar
      docs - update saml & sso (#22954) · eb5ea93e
      Natalie authored
      Unverified
      eb5ea93e
    • Nemanja Glumac's avatar
    • Alexander Polyankin's avatar
      Unverified
      4d119be7
Loading