Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Mar 18, 2021
  2. Mar 17, 2021
    • Cam Saul's avatar
      Fix sandboxed Field Values regression · 91f0ed62
      Cam Saul authored
      Merge pull request from GHSA-m8w4-6wxv-8v6m
      
      * Fix sandboxed Field Values regression
      
      * Test fixes :wrench:
      
      * Dox fix :wrench:
    • Jeff Evans's avatar
      Enforce permissions on revision API · 6818b678
      Jeff Evans authored
      Merge pull request from GHSA-pxfh-93j9-h745
      
      Check read permission on the instance from get
      
      Check write permission on the instance from revert
      
      Rewrite expectations to clojure.test in revision_test.clj
      
      Remove some ugliness (in the delay) and switch to fixtures instead
      
      Add new test in revision_test.clj for preventing unauthorized reversions
      6818b678
  3. Mar 16, 2021
  4. Mar 15, 2021
  5. Mar 13, 2021
  6. Mar 12, 2021
    • Jeff Evans's avatar
      Include partitioned tables in sync (#15151) · c9e1aabf
      Jeff Evans authored
      Include partitioned tables in sync
      
      Add new table type ("PARTITIONED TABLE") to `.getTables` invocation
      
      Add test for Postgres to ensure all partitions, in addition to main table, are synced (for PG version 10 or higher)
      
      Pull `exec!` into helper fn in `postgres_test.clj`
      Unverified
      c9e1aabf
    • Nemanja Glumac's avatar
      #15105 Repro: When Sandbox is granted to linked table column, but no access to... · b0d7297d
      Nemanja Glumac authored
      #15105 Repro: When Sandbox is granted to linked table column, but no access to the linked table, then "dirty" queries fail (#15139)
      
      Unverified
      b0d7297d
    • Luis Paolini's avatar
      Update full-app-embedding.md (#15095) · 92067ca2
      Luis Paolini authored
      
      * Update full-app-embedding.md
      
      Added a detail about SameSite=None cookie
      
      * Update docs/enterprise-guide/full-app-embedding.md
      
      Co-authored-by: default avatarJeff Bruemmer <jeff@metabase.com>
      
      Co-authored-by: default avatarJeff Bruemmer <jeff@metabase.com>
      Unverified
      92067ca2
    • Robert Roland's avatar
      Clean up sync scheduling (#15043) · 6668b4ee
      Robert Roland authored
      It's possible for the scheduler to get in a weird state if the sync
      fails while it executes.
      
      This change makes it *only* recreate a job/task if the schedule has
      changed or if it is missing. Previously, clearing the state at every
      start had bad effects if the JVM had terminated during the sync.
      
      Adds a vector of Exception classes that signal a "fatal" exception
      during sync for a specific database. If these exceptions occur, the sync
      for that database stops and will pick up next time.
      
      This will have to be expanded per driver, but I don't see a way around
      that, as each driver will have its own, unique way of failing.
      
      metabase/metabase#14817
      Unverified
      6668b4ee
  7. Mar 10, 2021
    • Nemanja Glumac's avatar
      Consolidate users in Cypress tests (#15058) · ef824613
      Nemanja Glumac authored
      
      * Move user groups above users
      
      * Use `email` in a user object instead of `username`
      
      * Add `createUser` function
      
      - Get rid of `makeUserObject` and store users' group membership directly within the user object
      
      * Improve `createUser` function
      
      * Add sandboxed user to the main `USERS` object
      
      * Use newly constructed `sandboxed` user in tests
      
      * Export `signInAsSandboxedUser()`
      
      * Fix function name
      
      Co-authored-by: default avatarPaul Rosenzweig <paulrosenzweig@users.noreply.github.com>
      
      * Fix linter errors
      
      * Simplify `createUser()` function
      
      * Use user attributes directly in tests
      
      * Fix broken tests
      
      * Destructure users in tests
      
      * Use double quotes
      
      * Extract Cypress user data (#15103)
      
      * Extract user data in a separate file
      
      * Convert `createUser` function to a Cypress custom command
      
      * Convert `signIn` function to a Cypress custom command
      
      * Convert `signInAsAdmin` function to a Cypress custom command
      
      * Convert `signInAsNormalUser` function to a Cypress custom command
      
      * Convert `signInAsSandboxedUser` function to a Cypress custom command
      
      * Convert `signOut` function to a Cypress custom command
      
      * Guard against user groups data falling out of sync
      
      Co-authored-by: default avatarPaul Rosenzweig <paulrosenzweig@users.noreply.github.com>
      Unverified
      ef824613
    • Cam Saul's avatar
    • dpsutton's avatar
      Click through migration (#15050) · dae904d6
      dpsutton authored
      * Fix click through behavior (#15014)
      
      * formatting
      
      * Safer get's, author metadata and correct added
      
      * Don't return anything if we didn't modify it
      
      * Make private and add a docstring
      
      * Generate json strings rather than long in-line versions
      
      * Docstrings and prevent migrating ones that may already be migrated
      
      * Noisier as it now merges click_behavior on top of existing
      
      * update docstring with new nesting
      
      * always keep column settings
      
      previously the script was only looking for column settings which
      included view_as or link_template. Now we always keep those columns
      and merge in the new click_behavior when those keys are present
      
      * linkTemplateText -> linkTextTemplate
      
      * Ensure dashcard goes on top of card viz settings
      
      * Update expected now that dash merges on top of card
      
      * drop columns that don't have view_as
      
      so we don't overwrite the top level stuff if there is already a
      click_behavior. That signifies that either this migration has run, or
      perhaps already has had manual intervention. An open question is if we
      extend this to the columns: if there's manual intervention do we
      really want to be mucking about in here?
      
      Also, go back to the dropping columns style.
      
      ```clojure
      (if (and ...)
          (assoc m col (merge field-settings click-behavior))
          m) ;; here we omit the column again in our reduce-kv
      ```
      
      * Fundamentally: scour card for click and merge them into dashcard
      
      reshape all click behaviors in both and merge them in.
      
      Still some broken tests at the moment
      
      * Remove old style click behavior no longer expected
      
      * fixed
      
      * Some more comments and remove some silly select keys and when-lets
      
      just compute both keys and then u/select-non-nil-keys and be done with
      it
      
      * Docstrinc additions about nil
      
      * Remove niles, test scenario #5 from flamber
      
      * Handle empties and nil _AFTER_ merging
      
      previously had taken care to punt things down to nil, collapse empty
      maps, etc. but this is a value that will merge on top of a map rather
      than with the map
      
      ```clojure
      (m/deep-merge {:a {:b :c}} {:a nil})
      {:a nil}
      ;; vs
      (m/deep-merge {:a {:b :c}} {:a {}})
      {:a {:b :c}}
      ```
      
      so let the postwalk after the merge clean up empty collections and nil
      values and let them blend as normal
      
      * Deep merge and prioritize new shape in card and dashcard
      
      ```clojure
      (m/deep-merge fixed-card
                    fixed-dashcard
                    (existing-fixed card)
                    (existing-fixed dashcard))
      ```
      
      This is the change here essentially. Fix the card and dashcard, look
      for existing new shapes on the card and dashcard as well
      
      * Don't merge existing fix from card. can't happen
      
      this change though did help out. we want to resolve when there are old
      style and new style on the same dashcard. In this case, the new style
      should persist:
      
      ```clojure
      (testing "If there is migration eligible on dash but also new style on dash, new style wins"
        (let [dash {"column_settings"
                    {"[\"ref\",[\"field-id\",4]]"
                     {"view_as"       "link"
                      "link_template" "http://old" ;; this stuff could be migrated
                      "link_text"     "old"
                      "column_title"  "column title"
                      "click_behavior"
                      {"type" "link",
                       "linkType" "url", ;; but there is already a new style and it wins
                       "linkTemplate" "http://new",
                       "linkTextTemplate" "new"}}}}]
          (is (= {"column_settings"
                  {"[\"ref\",[\"field-id\",4]]"
                   {"click_behavior"
                    {"type" "link",
                     "linkType" "url",
                     "linkTemplate" "http://new",
                     "linkTextTemplate" "new"},
                    "column_title" "column title"}}}
                 (migrate nil dash)))))
      ```
      
      note the column settings for field-id 4 have the old style and the new
      style but the result is that the new style survives. This happens from
      the `(m/deep-merge fixed-card fixed-dashcard (existing-fixed
      dashcard))` as the existing is put on top
      
      * Don't strip original values
      
      * propagate old info in migration test
      Unverified
      dae904d6
  8. Mar 08, 2021
  9. Mar 05, 2021
  10. Mar 03, 2021
  11. Mar 02, 2021
Loading