Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Feb 02, 2023
    • Bryan Maass's avatar
      insert next-gen permission paths alongside currently active permission paths +... · c46337ad
      Bryan Maass authored
      insert next-gen permission paths alongside currently active permission paths + classification (#27911)
      
      * implement move, which returns v2 paths
      
      - TODO: insert these into the db
      
      (move v1-path) => [v2 paths]
      
      * cleanup + add some schemas
      
      * generative tests 4 permission path classification
      
      * whitespace lint
      
      * detect data, query, and paths for v2
      
      * calling move on v2 paths is a no-op
      
      * differentiate between v1 and v2 permissions
      
      quickchecking for move, classify-path, and classify-data-path
      
      * fix tests + add idempotency test
      
      * add tests for classification of permission paths
      
      - rename move to ->v2-path
      - move some fxns around
      - ascii art in test
      
      * making the legos line up
      
      - need to insert both v1 and v2 versions of paths (of course)
      - valid-path? has to allow v2 paths to be inserted
      
      * replace mu/with-api-error-message
      
      * linter + code quality fixes
      
      * privatize rx->kind
      
      * remove some changes that should be 4 anotherbranch
      
      * revert ns
      
      * delete v2 permissions in
      
      - they aren't handled by the perm graph parser, so they don't get propagated into "old graph", so the diff between old and new indicates that they need to be rewritten.
      
      * only delete v2 paths for the current group_id
      
      - reorder declarations in models.permissions
      
      * remove extra line break
      
      * Update src/metabase/models/permissions.clj
      
      fix typo
      
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      
      ---------
      
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      Unverified
      c46337ad
    • Alexander Polyankin's avatar
    • Mark Bastian's avatar
      Ban println/printf via clj-kondo config (#27997) · 021c6708
      Mark Bastian authored
      Added bans for print and friends. Fixed issues in kondo config where a macroexpansion put in a print by replacing with (constantly nil) as a no-op.
      Unverified
      021c6708
    • Mahatthana (Kelvin) Nomsawadi's avatar
      Bump `node` to version 16 (#27970) · 10a56f06
      Mahatthana (Kelvin) Nomsawadi authored
      * `nock` behave differently between v14 and v16+
      
      * Remove xmlhttprequest
      
      * [ci skip] Add a comment warning people to not upgrade CI node version
      
      As it might break the unit tests.
      Unverified
      10a56f06
    • Aleksandr Lesnenko's avatar
      Polish tooltips (#27965) · 5f3da072
      Aleksandr Lesnenko authored
      * polish-tooltips
      
      * review
      Unverified
      5f3da072
    • dpsutton's avatar
      Run all tests on mysql/h2/postgres app-db tests (#28000) · 0dd33509
      dpsutton authored
      Originally made all "drivers" tests skip the :mb/once test selected test
      namespaces. But we use the drivers matrix to test the different app-db
      types (mysql, postgres). So this moves the `:exclude-tags [:mb/once]`
      selector off of the drivers job and into particular driver jobs.
      
      ```clojure
      user=> (letfn [(uses-exclude? [[job-name job]]
                       (let [steps (:steps job)]
                         (reduce (fn [uses? step]
                                   (if-let [with (:with step)]
                                     (if (= ":exclude-tags '[:mb/once]'" (:test-args with))
                                       (reduced true)
                                       uses?)
                                     uses?))
                                 false
                                 steps)))]
               (-> (group-by uses-exclude? (:jobs (yaml/from-file ".github/workflows/drivers.yml")))
                   (update-vals (fn [jobs] (map key jobs)))))
      {true (:be-tests-athena-ee
             :be-tests-bigquery-cloud-sdk-ee
             :be-tests-druid-ee
             :be-tests-googleanalytics-ee
             :be-tests-mongo-4-2-ee
             :be-tests-mongo-4-2-ssl-ee
             :be-tests-mongo-5-0-ee
             :be-tests-mongo-5-0-ssl-ee
             :be-tests-mongo-latest-ee
             :be-tests-oracle-18-4-ee
             :be-tests-oracle-21-3-ee
             :be-tests-presto-186-ee
             :be-tests-presto-jdbc-ee
             :be-tests-redshift-ee
             :be-tests-snowflake-ee
             :be-tests-sparksql-ee
             :be-tests-sqlite-ee
             :be-tests-sqlserver-ee
             :be-tests-vertica-ee),
       false (:be-tests-google-related-classpath-ee ;; includes an :only selector
              :be-tests-mariadb-10-2-ee
              :be-tests-mariadb-latest-ee
              :be-tests-mysql-5-7-ee
              :be-tests-mysql-latest-ee
              :be-tests-postgres-ee
              :be-tests-postgres-latest-ee)}
      ```
      
      These maria/mysql/postgres tests all specify `MB_DB_TYPE` so we omit the
      `exclude-tags` selector to run all tests. The only strange one here is
      the `:be-tests-google-related-classpath-ee` job which includes an :only
      selector:
      
      ```yaml
          steps:
          - uses: actions/checkout@v3
          - name: Test Google Related Classpath drivers
            uses: ./.github/actions/test-driver
            with:
              junit-name: 'be-tests-${{ matrix.driver }}-classpath-ee'
              test-args: ':only "[metabase.query-processor-test.expressions-test metabase.driver.google-test metabase.driver.googleanalytics-test]"'
      ```
      Unverified
      0dd33509
    • dpsutton's avatar
      Include numThreadsAwaitingCheckoutDefaultUser in conn pool stats (#28015) · 3508dad0
      dpsutton authored
      This includes the stats in
      
      ```clojure
      prometheus=> (troubleshooting/connection-pool-info)
      {:connection-pools {"metabase-postgres-app-db" {:numConnections 4,
                                                      :numIdleConnections 4,
                                                      :numBusyConnections 0,
                                                      :minPoolSize 1,
                                                      :maxPoolSize 15,
                                                      :numThreadsAwaitingCheckoutDefaultUser 0},
                          "db-52-postgres-clean" {:numConnections 1,
                                                  :numIdleConnections 1,
                                                  :numBusyConnections 0,
                                                  :minPoolSize 1,
                                                  :maxPoolSize 15,
                                                  :numThreadsAwaitingCheckoutDefaultUser 0}}}
      ```
      
      And thus ultimately in c3p0 stats:
      
      ```
      _# HELP c3p0_num_threads_awaiting_checkout_default_user C3P0 Number of threads awaiting checkout
      _# TYPE c3p0_num_threads_awaiting_checkout_default_user gauge
      c3p0_num_threads_awaiting_checkout_default_user{database="metabase-postgres-app-db",} 0.0
      c3p0_num_threads_awaiting_checkout_default_user{database="db-52-postgres-clean",} 0.0
      ```
      Unverified
      3508dad0
    • Ngoc Khuat's avatar
      Unverified
      13a47418
    • Anton Kulyk's avatar
      Replace 'all' icon with 'folder' (#27996) · 718e7235
      Anton Kulyk authored
      Unverified
      718e7235
  2. Feb 01, 2023
  3. Jan 31, 2023
  4. Jan 30, 2023
Loading