Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Apr 21, 2023
  2. Apr 18, 2023
  3. Apr 13, 2023
  4. Apr 12, 2023
    • dpsutton's avatar
      Revert "`clj -M:run` should not think it's running in `:dev` mode (#30004)" (#30043) · fc02e165
      dpsutton authored
      This reverts commit 8a11e382.
      
      The namespace `metabase.server.middleware.security` controls our content
      security policy header. In dev we allow connections to 8080 for webpack
      assets. Not dev we deny these.
      
      `clj -M:run` is dev since it is running the project from source, not a
      jar. This `mb.run.mode` was removed when we were fighting require issues
      for `metabase.query-processor-test.test-mlv2`. That's solved so we can
      restore the dev property to `:run`.
      Unverified
      fc02e165
  5. Apr 11, 2023
  6. Apr 05, 2023
  7. Mar 30, 2023
  8. Mar 22, 2023
  9. Mar 17, 2023
  10. Mar 14, 2023
  11. Mar 13, 2023
  12. Mar 10, 2023
  13. Mar 09, 2023
  14. Mar 08, 2023
  15. Mar 07, 2023
    • dpsutton's avatar
      Update tools.build and usage (#28977) · b549b291
      dpsutton authored
      Calling our basis function with just :oss or :ee we don't end up with an
      `:argmap` key.
      
      ```clojure
      uberjar=> (def basis (create-basis :oss))
      ,#'build.uberjar/basis
      uberjar=> (:argmap basis)
      nil          ;; nothing extra in oss
      
      uberjar=> (def basis (create-basis :ee))
      ,#'build.uberjar/basis
      uberjar=> (:argmap basis)
      {:extra-paths ["enterprise/backend/src"]}
      
      ;; and if other aliases are used:
      uberjar=> (def basis' (b/create-basis {:project "deps.edn" :aliases [:dev :test]}))
      ,#'build.uberjar/basis'
      uberjar=> (:argmap basis')
      {:extra-deps {lambdaisland/deep-diff2 {:mvn/version "2.7.169"},
                    methodical/methodical {:mvn/version "0.15.1"},
                    io.github.metabase/hawk {:sha
                    "45ed36008014f9ac1ea66beb56fb1c4c39f8342b"},
                    ....}
       :extra-paths ["dev/src"...]
       :jvm-opts ["-Dmb.run.mode=dev" ...]
       :exec-fn metabase.test-runner/find-and-run-tests-cli}
      ```
      Unverified
      b549b291
    • dpsutton's avatar
      Fix flaky test and test for a new case (#28757) · cc4601b1
      dpsutton authored
      
      * Fix flaky test and test for a new case
      
      flaky test was annoying. It would timeout after 45 seconds. And
      annoyingly, it times out on the _client_, not the server. So we don't
      get the proper error message we expect.
      
      And what's happening is that the backend just hooks up the pipe from
      it's request to the response. And if no bytes ever come across, we just
      twiddle our thumbs until the http request in the test gives up.
      
      The only reliable way i could think of to fix this is to spin up a
      webserver that just accepts and then ignores requests (which is what
      github did to us in the flaky test).
      
      Had to bump the ring adapter to get the newly exposed `:async-timeout
      60000` parameter. By default the webserver in the test has a timeout of
      30 seconds, which is shorter than the 45 second timeout for the test's
      request to the geojson endpoint.
      
      * add comment
      
      * clean up test server logic
      
      ---------
      
      Co-authored-by: default avatarNemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
      Unverified
      cc4601b1
  16. Mar 01, 2023
    • Cam Saul's avatar
      Metabase® Lib™ v2 (#28517) · abd1958e
      Cam Saul authored
      * Metabase lib PoC RFC [ci skip]
      
      * Cleanup [ci skip]
      
      * `:lib/uuid` overhaul [ci skip]
      
      * More tests [ci skip]
      
      * Basic join support [ci skip]
      
      * Simplify a few things, more tests, etc. [ci skip]
      
      * Pipeline queries FTW [ci skip]
      
      * Metabase® Lib™ v2
      
      * Fix cljs test assertions
      
      * No bees please
      
      * Update docstring
      
      * Mega simplification
      
      * Fix Kondo warnings
      
      * Address PR feedback
      
      * Fix Malli util for Cljc
      
      * Oops, `instrument!` should be public
      
      * Cloverage do not instrument JS util namespace
      
      * Fix Cloverage again
      
      * Don't count MySQL or Postgres namespaces for Coverage
      
      * Address PR feedback
      
      * Move dispatch value keyword function to util
      
      * Revert acccidental require
      
      * Test fix
      
      * Fix Cljs =?
      
      * Fix totally unrelated broken links
      Unverified
      abd1958e
    • Cam Saul's avatar
      Build script overhaul 2023 (#28767) · 3c980639
      Cam Saul authored
      * Build Script overhaul
      
      * Remove stray deps.edn
      
      * Include :ci profile for build and release tests
      
      * Fix release script
      
      * Update markdown dox
      
      * Update another dox
      
      * Tweakz
      
      * Don't pin new version of data.xml to core project, just for build scripts
      
      * Ignore unrecognized options
      
      * Fix i18n/enumerate
      Unverified
      3c980639
  17. Feb 27, 2023
    • Braden Shepherdson's avatar
      [metabase-lib] Dev experience and CLJC infra improvements · 4580eab9
      Braden Shepherdson authored
      Dev experience:
      - CLJS now has source maps
      - Devtools extension renders CLJS data in Chrome (et al) Devtools
      - Use a debug build of CLJS in the tests
      - Fixed line numbers and breakpoints being off-by-one in Devtools
      
      CLJC infra:
      - More robust direct approach to JS<->CLJS conversions, powered by
        Malli transformers.
      - Powerful `define-getters-and-setters` macro to generate the accessors.
      4580eab9
  18. Feb 20, 2023
  19. Feb 17, 2023
  20. Feb 15, 2023
  21. Feb 14, 2023
    • Braden Shepherdson's avatar
      [metabase-lib] PoC for wrapping JS objects with cljs-bean in CLJC · 4c15f80c
      Braden Shepherdson authored
      A `metabase.domain-entities.malli/defn` macro that (in CLJS) uses the
      schemas for the arguments to drive wrapping of vanilla JS objects for
      idiomatic use in CLJC code.
      
      See the first two functions in `metabase.domain-entities.queries.util`
      which get passed vanilla JS objects but can use them as CLJS maps.
      4c15f80c
  22. Feb 13, 2023
  23. Feb 09, 2023
    • dpsutton's avatar
      Fix for toucan2 laziness in hydration (#28201) · ea0d4329
      dpsutton authored
      https://github.com/camsaul/toucan2/pull/126
      
      Editing the data model loads a _lot_ of data. It hits the following form
      from the api:
      
      ```clojure
      (hydrate [:tables [:fields [:target :has_field_values]
                         :has_field_values] :segments :metrics])
      ```
      
      On my test instances, with 1500 tables each with 14 fields: 15mb and 359
      tables each with 14 fields: 3.69mb. Not great.
      
      If you want to recreate, create an empty db, sync it, then
      
      ```clojure
        (time
         (let [conn (sql-jdbc.conn/db->pooled-connection-spec 3)]
           (dotimes [n 359]
             (jdbc/execute! conn [(format "create table if not exists foo_%d (id int, col_1 text, col_2 text, col_3 text, col_4 text, col_5 text, col_6 text, col_7 text, col_8 text, col_9 text, col_10 text, col_11 text, col_12 text, col_13 text, col_14 text)" n)]))))
      
        (sync/sync-database! (db/select-one 'Database :id 3) {:scan :schema})
      
        (binding [api/*current-user-permissions-set* (delay #{"/"})]
          (count (#'metabase.api.database/db-metadata 3 true true)))
      ```
      
      And the source of the bug was a classic recur with a lazy concat.
      
      ```diff
      diff --git a/src/toucan2/tools/hydrate.clj b/src/toucan2/tools/hydrate.clj
      index e1d0459..10c9c49 100644
      --- a/src/toucan2/tools/hydrate.clj
      +++ b/src/toucan2/tools/hydrate.clj
      @@ -456,7 +456,7 @@
           (if (empty? hydrated-instances)
             (concat acc (map :instance annotated-instances))
             (let [[not-hydrated [_needed-hydration & more]] (split-with (complement :needs-hydration?) annotated-instances)]
      -        (recur (concat acc (map :instance not-hydrated) [(first hydrated-instances)])
      +        (recur (vec (concat acc (map :instance not-hydrated) [(first hydrated-instances)]))
                      more
                      (rest hydrated-instances))))))
      
      ```
      Unverified
      ea0d4329
    • Mark Bastian's avatar
      Upgrading ring jetty adapter to ring-jetty9-adapter (and Jetty 11) (#28137) · eda2b042
      Mark Bastian authored
      Upgrade to Jetty 11 via https://github.com/sunng87/ring-jetty9-adapter. Required updating from javax servlet packages to jakarta, since jakarta is newer.
      Unverified
      eda2b042
  24. Feb 08, 2023
  25. Feb 07, 2023
  26. Feb 01, 2023
  27. Jan 20, 2023
    • Bryan Maass's avatar
      Data graph permissions decoding -- removing redundancies (#27665) · a93aa967
      Bryan Maass authored
      This work removes a spec and a p.schema for data graph permissions.
      
      There are still some specs but they are for execution, and collection graph permissions. Those should be targeted next.
      
      * decoded + verified FIXME
      
      * still good
      
      * some cleanup
      
      * a little more cleaning up
      
      * bit more cleaning
      
      * converted update-group-permissions! -> mu/defn
      
      * use the correct shape for new-group-perms
      
      * remove bunch of pschemas
      
      * linter appeasement
      
      * update test for setting dissallowed schema
      
      * respond to review comments
      
      * fix some tests + improve mu/defn error messages
      
      * a lint fix
      
      * lint fix
      
      * read and query are optional
      
      * update expected error message to the improved one
      
      * stop calling trs at the top level
      
      * fix function signature
      
      * improve test
      Unverified
      a93aa967
  28. Jan 18, 2023
  29. Jan 11, 2023
    • Cam Saul's avatar
      Migrate most application DB code to Honey SQL 2 (Part 2 of 2) (#27543) · 2cd0bb39
      Cam Saul authored
      * Switch to Honey SQL 2 for some application DB things
      
      * Fix Chain Filter query
      
      * More fixes
      
      * Test fixes :wrench
      
      * Fix Kondo lint errors
      
      * Test fixes :wrench:
      
      * Test and formatting fixes for MySQL
      
      * Fix new code using `db/query`
      
      * Fix circular references
      
      * Switch to Honey SQL 2, Part 1
      
      * Test fix
      
      * Revert deletion of ratios-test
      
      * Fix Kondo error
      
      * Fix stack overflow
      
      * Update code to use new names for schemas
      Unverified
      2cd0bb39
Loading