Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Jun 03, 2022
    • Nemanja Glumac's avatar
    • dpsutton's avatar
      License improvements (#23120) · 3ad532b9
      dpsutton authored
      * Switch from classpath to basis for license information
      
      Previously we were chopping the classpath up and starting from there so
      we just had a sequence of strings pointing at jars. Now using the basis
      so we use a _much_ nicer map like
      
      ```clojure
      {org.bouncycastle/bcprov-jdk15on
       {:mvn/version "1.70",
        :deps/manifest :mvn,
        :dependents
        [buddy/buddy-core
         org.bouncycastle/bcutil-jdk15on
         org.bouncycastle/bcpkix-jdk15on],
        :parents
        #{[buddy/buddy-sign buddy/buddy-core]
          [buddy/buddy-sign
           buddy/buddy-core
           org.bouncycastle/bcpkix-jdk15on
           org.bouncycastle/bcutil-jdk15on]
          [buddy/buddy-sign
           buddy/buddy-core
           org.bouncycastle/bcpkix-jdk15on]},
        :paths
        ["/Users/dan/.m2/repository/org/bouncycastle/bcprov-jdk15on/1.70/bcprov-jdk15on-1.70.jar"]}
       ...}
      
      ```
      
      So we now have a true name for the dependency, a path to it, and a
      version. No need to string munge on the classpath.
      
      * Read pom with `maven-model`
      
      rather than us trying to parse the xml, use a maven model on it. Note
      there is another level we can go to that would be aware of parent poms
      but we don't need the overkill here. That's far heavier than what we
      need to do in this instance.
      
      Note this also reorders the algo:
      previously
      - license in jar
      - backfill
      - license from pom
      
      Now:
      - license from jar
      - license from pom
      - backfill
      
      Possible we will want to actually just skip the license from pom bit
      since it only gives us a name and a url and not the full text. We could
      match on these and identify them with the resources used from the
      backfill if we like.
      
      Another important change is that this no longer throws if it cannot find
      a pom for a jar. This came up for the following lib:
      
      ```
      ;; deps.edn
      com.google.cloud.sql/postgres-socket-factory
      {:mvn/version "1.6.0"} ; Secure Google Cloud SQL postgres connections
      
      ;; override:
      "com.github.jnr"             {"jffi$native" {:resource "apache2_0.txt"}}
      ```
      Which was from a 3rd party PR.
      
      * Way to generate libs that need overrides
      
      * Remove unused fns, add tests, cleanup docstring
      
      * Don't leave tap> in
      
      Two poms blow up with BOM errors
      
      - jakarta.activation-1.2.1.pom
      - jakarta.activation-api-1.2.2.pom
      
      > UTF-8 BOM plus xml decl of iso-8859-1 is incompatible
      > (position: START_DOCUMENT seen <?xml version="1.0" encoding="iso-8859-1"... @1:41)
      
      It has a parent pom and not a license so we wouldn't find it anyways.
      Unverified
      3ad532b9
    • Alexander Lesnenko's avatar
    • Ngoc Khuat's avatar
      Get params value API returns 400 if param not found (#23035) · 87410681
      Ngoc Khuat authored
      * dashboard api to get params value should return 404 instead of 500 when param not found
      
      * on the 2nd thought, let's return 400
      
      * update the tests too
      
      * wording
      Unverified
      87410681
    • Ngoc Khuat's avatar
      Add `parameters` to report_card (#22976) · 0bd20d0b
      Ngoc Khuat authored
      
      * add parameters to report_card and card APIs
      
      * make sure migration can work with existing cards and add migration tests
      
      * remove debug code
      
      * When parameters is empty, return template tag parameters
      
      * update schema message
      
      * update migraiton test name
      
      * minor changes in test
      
      * fix failing tests
      
      * Always use card.parameters in PublicQuestion
      
      * Add defaults and readd isEmpty check
      
      * Default to undefined/use template tags in PublicQuestion...
      
      * parameters should be in the writableProperties
      
      * Native query card: construct parameters from template tags
      
      * Separate the generation of parameter id
      
      * Add parameter_mappings to report_card (#23003)
      
      * add parameter_mappings to report_card
      
      * fix from Noah's comments
      
      * fix from Noah's comments
      
      * Update a parameter from an updated template tag
      
      * Correct the parameters construction
      
      * Also add `parameter_mappings` to writableProperties
      
      * CI test: bust the npm module cache
      
      * Revert "CI test: bust the npm module cache"
      
      This reverts commit 5a327b616f0220f43a90f7f871e0bd877ffa6f47.
      
      Co-authored-by: default avatarDalton Johnson <daltojohnso@users.noreply.github.com>
      Co-authored-by: default avatarAriya Hidayat <ariya@metabase.com>
      Unverified
      0bd20d0b
    • Howon Lee's avatar
      Add option to turn JSON column unfolding off (boat161) (#22997) · 6c4b14d5
      Howon Lee authored
      Adds option to turn JSON column unfolding off. This does not constitute an actual fix of boat161 but flamber wanted it
      Unverified
      6c4b14d5
  2. Jun 02, 2022
  3. Jun 01, 2022
  4. 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
Loading