Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. May 08, 2022
  2. Apr 29, 2022
  3. Apr 26, 2022
  4. Apr 12, 2022
  5. Apr 08, 2022
  6. Apr 05, 2022
  7. Mar 17, 2022
  8. Mar 14, 2022
    • Cam Saul's avatar
      Upgrade Liquibase to latest version; remove final Java source file and need... · aaf1b601
      Cam Saul authored
      Upgrade Liquibase to latest version; remove final Java source file and need for `clojure -X:deps prep` (#20611)
      
      * Upgrade Liquibase to latest version
      
      * Try adjusting log
      
      * Fix checksums for the TWO migrations with ID = 32
      
      * FINALLY get Liquibase to use Log4j2
      
      * Set Liquibase ConsoleUIService OutputStream to null OutputStream
      
      * Manually define a package for our H2 proxy class so Java 8 works
      
      * Fix package-name determination code
      
      * Update migrations file spec
      
      * `databasechangelog` shouldn't be upper-case
      
      * Lower-case quartz table names
      
      * More MySQL fixes :wrench:
      
      * Properties for all the Quartz tables :cry:
      
      * Formatting tweaks [ci skip]
      
      * Revert a few more busted changes
      
      * Fix more busted changes
      
      * Bump Liquibase version to 4.8.0 to fix MySQL defaultValueBoolean bug
      
      * OMG I think I finally fixed MySQL
      
      * Remove Java source file and prep-deps code
      
      * Remove two more references to bin/prep.sh
      
      * Minor cleanup
      
      * Revert unneeded changes
      
      * Fix busted indentation
      
      * Don't search inside java/ anymore since it's G-O-N-E
      
      * Appease the namespace linter
      
      * Update src/metabase/db/liquibase/h2.clj
      aaf1b601
  9. Mar 09, 2022
  10. Feb 16, 2022
  11. Feb 15, 2022
    • Cam Saul's avatar
      Upgrade Hive JDBC driver version from 1.2.2 -> 3.1.2; Bump Spark SQL from 2.1.1 to 3.2.1 (#20353) · 4dc16403
      Cam Saul authored
      * Replace AOT Spark SQL deps with a `proxy` and a `DataSource`
      
      * Support `connection-details->spec` returning a `DataSource`
      
      * Remove target/classes
      
      * Don't need to deps prep drivers anymore
      
      * Fix duplicate `this` params in `proxy` methods; add `:test` alias for Eastwood to make it be a little quieter
      
      * Make sure to call `pool/map->properties`
      
      * Upgrade Hive JDBC driver version from 1.2.2 -> 3.1.2; Bump Spark SQL from 2.1.1 to 3.2.1
      
      * Clean the namespaces
      
      * Don't need to register the a proxy JDBC driver since we're not even using it anymore
      
      * Fix Spark SQL :schema sync for newer versions
      
      * Remove unneeded override
      
      * Fix day-of-week extract for new :sparksql
      
      * Hive/Spark SQL needs to escape question marks inside QUOTED identifiers now :unamused:
      
      * Some minor SQL generation improvements to avoid duplicate casts
      
      * Revert change to debug test
      4dc16403
  12. Feb 14, 2022
  13. Feb 09, 2022
  14. Feb 08, 2022
  15. Feb 03, 2022
  16. Feb 02, 2022
  17. Jan 07, 2022
  18. Dec 28, 2021
  19. Dec 19, 2021
  20. Dec 14, 2021
  21. Dec 10, 2021
    • Jeff Evans's avatar
      Bump log4j from 2.14.1 to 2.15.0 (#19309) · 8bfce98b
      Jeff Evans authored
      
      * Bump log4j from 2.14.1 to 2.15.0
      
      * Disable failing logging tests when bumping log4j
      
      0day in log4j requires bump in dependency. These tests look for logs in
      testing but our test logger doesn't seem to have levels set
      correctly. The disease is certainly worse than the remedy in this case
      and each instance is annotated with the reason it is disabled, and we
      can reenable them in calmer waters
      
      * Fix unused ns
      
      Co-authored-by: default avatarYoungho Kim <miku@korea.ac.kr>
      Co-authored-by: default avatardan sutton <dan@dpsutton.com>
      8bfce98b
  22. Dec 03, 2021
  23. Dec 01, 2021
  24. Nov 03, 2021
    • Cam Saul's avatar
      Add NOT NULL constraint to Card.database_id; attempt to set database_id if possible (#18472) · 83de3e86
      Cam Saul authored
      * Drop long-unused Table.entity_name column
      
      * Add NOT NULL constraint to Card.database_id
      
      * Test fix :wrench:
      
      * Test fix :wrench:
      
      * Fix migration
      
      * Add note about H2 shell to deps.edn
      
      * Add new SQL migration to attempt to set database_id when unset
      
      * Remove data migration that is now done in Liquibase land
      
      * Oops, '$.database', not '$.database_id'
      
      * Parse ints as signed rather than unsigned just to be safe (they *might* be -1337 if they're really broken)
      
      * Don't run for H2
      
      * Update comment
      
      * Fix migration indentation
      
      * Clean namespace
      
      * Use new migration number.
      
      * Use the new migration numbers
      
      * Adopt new migration numbering scheme
      
      * Fix comments
      
      * Fix MySQL + MariaDB insanity
      
      * Fix ID range validation
      
      * Actually 382 is the last legacy ID
      
      * Improved validation and tests
      
      * Adopt the new-new migration ID format.
      
      * Test fixes :wrench:
      
      * Fix merge
      
      * Simplify precondition
      83de3e86
  25. Oct 27, 2021
    • Pawit Pornkitprasan's avatar
      Fix SSH tunnel with ED25519 keys (#18697) · 24975664
      Pawit Pornkitprasan authored
      `org.apache.sshd` requires `net.i2p.crypto/eddsa` dependency
      to work with ED25519 keys.
      
      This worked in 0.40 because `eddsa` was included as a transitive
      dependency of another unrelated dependency (`buddy`) but stopped
      working in 0.41 because the new version of `buddy` no longer depends
      on `eddsa`. Thus, we must explicitly include the dependency.
      
      To prevent this from breaking again, switched one of the test
      keys to an ED25519 key.
      24975664
  26. Oct 21, 2021
  27. Aug 25, 2021
  28. Aug 23, 2021
    • dpsutton's avatar
      Don't warn when running interpreted js (#17529) · d765d16d
      dpsutton authored
      I'm not sure we can fix this. We need the graal compiler which doesn't
      appear to be jdk 8 compatible but I can't actually find javadocs for
      it. Its not clear from
      https://github.com/oracle/graaljs/blob/master/docs/user/RunOnJDK.md
      how you can actually run it.
      
      I tried adding the graal compiler but that seems to assume you are in
      a graal vm and fails not finding a class.
      
      To get a list of all the options available for a context's engine,
      
      ```clojure
      (doto 'metabase.pulse.render.js-engine require in-ns)
      (map (comp (juxt :name :help) bean)
           (.getOptions (.getEngine (context))))
      ```
      
      I've done some profiling
      
      ```clojure
      (dotimes [_ 5]
        (time
         (do (let [rows [["apples" 2]
                         ["bananas" 3]]
                   colors {"apples" "red" "bananas" "yellow"}]
               (js-svg/categorical-donut rows colors))
             nil)))
      
      "Elapsed time: 210.32659 msecs"
      "Elapsed time: 193.211736 msecs"
      "Elapsed time: 190.97775 msecs"
      "Elapsed time: 195.843254 msecs"
      "Elapsed time: 188.077405 msecs"
      nil
      ```
      
      For interpreted and in another language, this doesn't seem the end of
      the world.
      
      And adding more quantities
      ```clojure
      (letfn [(rand-string [] (str/join "-" (repeatedly 4 #(rand-nth ["banana" "horse" "battery" "cloak"]))))]
        (dotimes [_ 5]
          (let [rows (repeatedly 20 (fn [] [(rand-string) (rand-int 100)]))
                colors (zipmap (map first rows) (cycle ["red" "green" "blue" "yellow"]))]
            (time
             (js-svg/categorical-donut rows colors)))))
      
      "Elapsed time: 288.659887 msecs"
      "Elapsed time: 334.733071 msecs"
      "Elapsed time: 317.369294 msecs"
      "Elapsed time: 272.084918 msecs"
      "Elapsed time: 272.7203 msecs"
      nil
      ```
      
      For a timeline line chart, rendering one datapoint per day for a whole
      year:
      
      ```clojure
      (dotimes [_ 5]
        (let [dates (take 365 (iterate #(.plusDays % 1) #t "2020"))
              rows   (map (fn [d] [d (rand-int 200)]) dates)
              labels {:left "count" :bottom "year"}]
          (time
           (js-svg/timelineseries-line rows labels))))
      
      "Elapsed time: 569.691124 msecs"
      "Elapsed time: 544.415676 msecs"
      "Elapsed time: 539.131092 msecs"
      "Elapsed time: 492.60486 msecs"
      "Elapsed time: 523.765691 msecs"
      nil
      ```
      d765d16d
  29. Aug 20, 2021
    • Jeff Evans's avatar
      New BigQuery Driver (#16746) · a980e085
      Jeff Evans authored
      New BigQuery Driver
      
      Create new :bigquery-cloud-sdk driver using the google-cloud-bigquery library instead, and whose source is adapted from the :bigquery driver
      
      https://cloud.google.com/bigquery/docs/reference/libraries
      
      Marking existing :bigquery driver as deprecated, and superseded-by the new one (bigquery-cloud-sdk)
      
      Update new driver and query processor code to use newer Google SDK
      
      Switch test data loading over to use new API
      
      Add project-id connection property to override the value from the service account JSON, and use it as part of qualified names in the query processor if set
      
      Updating google driver so its libraries are compatible with the newer ones used in BigQuery
      
      Update date bucketing tests to skip :bigquery-cloud-sdk (new driver) where :bigquery is skipped
      
      Update `with-bigquery-fks` to take in the driver, since there are now multiple ones
      
      Adding test to confirm that overriding project-id for a public BQ project works (sync and query)
      
      Fixing a bunch of whitespace alignment errors in tests
      a980e085
  30. Aug 17, 2021
    • Cam Saul's avatar
      Backend SVG rendering proof of concept [ci skip] (#15781) · bf00aa99
      Cam Saul authored
      * Backend SVG rendering proof of concept [ci skip]
      
      * Update cssbox to 5.0.0
      
      * Render bar, line, and pie charts in js to svg
      
      sparkline is now done in js, bar is now recognized and done in js, new
      :categorical/donut as well
      
      * Remove api route for render
      
      * pass along render-type, not hardcoded to :inline
      
      * Move bar chart above sparkline and remove line check
      
      In order to introduce the bar chart type need it above the sparkline
      check since it is otherwise the same except for display property of
      the card. But lots of tests assume that this will get hit with a nil
      display type set in testing so remove checking for `:line` allows all
      the testing cases to hit the right type
      
      * Fix tests now that bar graphs aren't html but images
      
      * Include attachments for bar charts
      
      * Move over to in-tree bundle
      
      * Force everything [ci noskip]
      
      trying to ensure that the built jar includes the newer
      "resources/frontend_client/app/dist/lib-static-viz.bundle.js"
      
      * Run `yarn build-static-viz` in backend-deps in CI
      
      this js file is now a hard dependency of the backend so it fits in
      this tsk. All such things that depend on the backend sources will need
      it. Makes me think perhaps we want a checked in version but i'm not
      sure yet.
      
      * Look on classpath not filesystem for js bundle [ci noskip]
      
      * Move yarn build-static-viz into the checkout step
      
      * License information for antlr4-runtime
      
      * create attachment for categorical donuts
      
      * add ordinal legend to donuts (#17177)
      
      * set widths of html image and svg image to 1200
      
      * Revert "add ordinal legend to donuts (#17177)"
      
      This reverts commit 1eb81d2e.
      
      * Helper functions to render html easily
      
      * readme in dev
      
      * readme ensure that static viz bundle exists
      
      * Cleanup ns after removing proxy
      
      * Donut chart colors and legend (#17251)
      
      * use external color map for fill per dimension
      
      * Add support new color legend for donut
      
      * Ensure text doesn't appear as link
      
      entire thing is actually the body of a link tag for emails but we want
      a decent text color rather than a default link color
      
      * use chart colors from https://stats.metabase.com/_internal/colors
      
      
      
      * Make checkers happy
      
      - remove unused imports
      - add a docstring
      - don't shadow fn with a local
      
      * cleanup ns import
      
      * Remove reflective call
      
      * Cleanup ns on correct branch
      
      Co-authored-by: default avatardan sutton <dan@dpsutton.com>
      
      * X-axis: just use (approx) 5 ticks to avoid overlapping labels (#17287)
      
      * increase gap between arcs (#17271)
      
      * Set rendering hints on html->image
      
      * ignore width for now and make them larger
      
      * Ns deprecation and some cleanup
      
      * make namespace checker happy
      
      * Simple tests for detecting chart type
      
      * Rename from poc
      
      * Tests for scalar/smartscalar
      
      * cleanup js svg namespace a bit
      
      * Tests of svg engine
      
      * ns sorting after renaming
      
      * Unify our two different js engine usages
      
      settled on the js context. Has typed returns `(.asString ^Value ...)`
      instead of perhaps capturing std out?
      https://www.graalvm.org/sdk/javadoc/org/graalvm/polyglot/Value.html
      
      
      
      Context is a bit more friendly for getting source into it. One
      downside is that the invocable bit isn't quite as nice. The old way
      would return a java.util.functionFunction but the difference is
      
      (.apply function (object-array args))
      
      vs
      
      (.execute fn-ref (object-array args))
      
      * Don't io/resource the io/resource
      
      * js engine tests
      
      * Ns cleanup in js-svg
      
      type hints in the js-engine ns mean we don't need as many classes from
      polyglot here
      
      * Cleanup of text, ns docstrings, alignment
      
      * Fix fill->fill-opacity with parsed doc, not regex
      
      * Make a single helper that loads a static viz bundle context
      
      * Docstrings and make private in js-svg
      
      * Sort imported classes in js-svg
      
      * Make width passed down through rendering aparatus
      
      - svgs are always rendered at 1200 for quality
      - slack images of html are rendered at 1200 so that they can be zoomed
        in in the ui but slack automatically scales down
      - email sends html and the full svg but includes img width tags so
        that is handled appropriately
      
      * docstring
      
      Co-authored-by: default avatardan sutton <dan@dpsutton.com>
      Co-authored-by: default avatarKyle Doherty <5248953+kdoh@users.noreply.github.com>
      Co-authored-by: default avatarAriya Hidayat <ariya@metabase.com>
      bf00aa99
  31. Aug 10, 2021
    • Cam Saul's avatar
      Whitespace linting (#17348) · 06c0017b
      Cam Saul authored
      * Add the whitespace linter
      
      * Fix whitespace linter errors [except for one file]
      
      * Add a line that will intentionally break stuff to verify the linter is working.
      
      * Ok, remove the line that caused the linter to fail.
      
      * Use latest version of the linter
      
      * Fix missing newline
      06c0017b
  32. Aug 05, 2021
  33. Aug 04, 2021
  34. Aug 03, 2021
    • Cam Saul's avatar
      c24fc9dd
    • Cam Saul's avatar
      :race_car::race_car::race_car: test runner improvements :race_car::race_car::race_car: (#17286) · e1e815f8
      Cam Saul authored
      * Add some dox
      
      * Rename test-runner & cloverage -> metabase.test-runner & metabase.cloverage-runner
      
      * Move JUnit-related test runner code to separate namespace
      
      * Bespoke JUnit-output code
      
      * Delete unused .lein-classpath file
      
      * Do JUnit writes in a cached thread pool
      
      * Add failing test to make sure JUnit output works as expected...
      
      * Move bad-test to metabase.bad-test so the FAILING tests actually run
      
      * FASTER TEST LOADING :race_car:
      
      * Test CircleCI :system-out
      
      * Final cleanup (hopefully)
      
      * Sort some namespaces; allow initializing :plugins when namespaces get loaded for now.
      
      * Need those [[tags]] in docstrings
      
      * Fix bad docstring
      e1e815f8
  35. Aug 02, 2021
Loading