Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Sep 14, 2022
  2. Sep 12, 2022
  3. Sep 06, 2022
  4. Aug 31, 2022
  5. Aug 29, 2022
  6. Aug 23, 2022
    • Cam Saul's avatar
      [Toucan 2 Prep] Replace the `IObjectPermissions` protocol with multimethods (#24917) · 241f2179
      Cam Saul authored
      * [Toucan 2 prep] Don't invoke Toucan models as functions
      
      * Some fixes
      
      * Test fixes
      
      * Test fix
      
      * [Toucan 2 prep] Don't call `type` or `class` on Toucan models
      
      * Test fixes
      
      * More test fixes :wrench:
      
      * Replace perms protocol with multimethods; derive models from perms policy keywords
      
      * Test fixes :wrench:
      
      * Appease Eastwood
      
      * Fix errors now that App has been merged in
      
      * Empty commit to trigger CI
      241f2179
  7. Aug 22, 2022
  8. Aug 19, 2022
  9. Aug 18, 2022
  10. Aug 17, 2022
    • Cal Herries's avatar
      Fix for #24715: "Remember Me" functionality doesn't work (#24744) · 4532d07e
      Cal Herries authored
      * Separate setting the timeout cookie's expires attribute from the session cookie's max-age
      
      * Add back public-settings/session-cookies tests and add docstrings
      
      * Fix setting cookies with full-app-embedding
      
      * Add docstring
      
      * Change logout to always delete the session
      
      * Remove extra code
      
      * Change session-cookie-name from multimethod to simple case expression
      
      * Refactor: move use-permanent-cookies? closer to usage
      
      * Fix FE unit test
      4532d07e
  11. Aug 16, 2022
  12. Aug 15, 2022
  13. Aug 12, 2022
    • Cam Saul's avatar
      Enable Kondo for tests part 2: enable `:unused-binding` linter and fix warnings (#24748) · adf45182
      Cam Saul authored
      * Fix some small things
      
      * Add Kondo to deps.edn to be able to debug custom hooks from REPL
      
      * Fix macroexpansion hook for with-temp* without values
      
      * Test config (WIP)
      
      * More misc fixes
      
      * Disable :inline-def for tests
      
      * More misc fixes
      
      * Fix $ids and mbql-query kondo hooks.
      
      * Fix with-temporary-setting-values with namespaced symbols
      
      * More misc fixes
      
      * Fix the rest of the easy ones
      
      * Fix hook for mt/dataset
      
      * Horrible hack to work around https://github.com/clj-kondo/clj-kondo/issues/1773 . Custom linter for mbql-query macro
      
      * Fix places calling mbql-query with a keyword table name
      
      * Fix the last few errors in test/
      
      * Fix errors in enterprise/test and shared/test
      
      * Fix driver test errors
      
      * Enable linters on CI
      
      * Enable unresolved-namespace linter for tests
      
      * Appease the namespace linter again
      
      * Test fixes
      
      * Enable unused-binding linter for test/ => 293 warnings
      
      * 259 warnings
      
      * 234 warnings
      
      * => 114 warnings
      
      * Fix the rest of the unused binding warnings in test/
      
      * Fix unused binding errors in enterprise/backend/test
      
      * Fix unused binding lint errors in driver tests
      
      * Test fix :wrench:
      
      * Assure Kondo that something is in fact used
      adf45182
    • Cam Saul's avatar
      Enable Kondo for tests (part 1) (#24736) · bc4acbd2
      Cam Saul authored
      * Fix some small things
      
      * Add Kondo to deps.edn to be able to debug custom hooks from REPL
      
      * Fix macroexpansion hook for with-temp* without values
      
      * Test config (WIP)
      
      * More misc fixes
      
      * Disable :inline-def for tests
      
      * More misc fixes
      
      * Fix $ids and mbql-query kondo hooks.
      
      * Fix with-temporary-setting-values with namespaced symbols
      
      * More misc fixes
      
      * Fix the rest of the easy ones
      
      * Fix hook for mt/dataset
      
      * Horrible hack to work around https://github.com/clj-kondo/clj-kondo/issues/1773 . Custom linter for mbql-query macro
      
      * Fix places calling mbql-query with a keyword table name
      
      * Fix the last few errors in test/
      
      * Fix errors in enterprise/test and shared/test
      
      * Fix driver test errors
      
      * Enable linters on CI
      
      * Enable unresolved-namespace linter for tests
      
      * Appease the namespace linter again
      
      * Test fixes
      bc4acbd2
  14. Aug 10, 2022
    • Case Nelson's avatar
      [Actions] Simplify emitter schema model (#24570) · 98bbb001
      Case Nelson authored
      * Move writeback migrations to 45
      
      * Empty commit to trigger GitHub Actions
      
      * [Actions] Simplify emitter schema model
      
      emitter_action was dropped since emitters just have a singular action
      and the join table was unecessary.
      
      emitter_action.action_id columns moved onto emitter table.
      
      Dropped CardEmitter and DashboardEmitter pre-insert, pre-update,
      pre-delete since they were used in tests only and normal operation
      would see the emitter inserted first.
      
      Since previous code may have 'orphaned' emitters without an action, we
      delete emitters without action to be safe.
      
      * Handle flakiness with geojson java.net.UnknownHostException errors (#24523)
      
      * Handle flakiness with geojson java.net.UnknownHostException errors
      
      In CI seems like we are getting errant errors:
      
      ```clojure
      geojson.clj:62
      It validates URLs and files appropriately
      http://0xc0000200
      expected: (valid? geojson)
        actual: #error {
       :cause "Invalid IP address literal: 0xc0000200"
       :via
       [{:type clojure.lang.ExceptionInfo
         :message "Invalid GeoJSON file location: must either start with http:// or https:// or be a relative path to a file on the classpath. URLs referring to hosts that supply internal hosting metadata are prohibited."
         :data {:status-code 400, :url "http://0xc0000200"}
         :at [metabase.api.geojson$valid_url_QMARK_ invokeStatic "geojson.clj" 62]}
        {:type java.net.UnknownHostException
         :message "0xc0000200"
         :at [java.net.InetAddress getAllByName "InetAddress.java" 1340]}
        {:type java.lang.IllegalArgumentException
         :message "Invalid IP address literal: 0xc0000200"
         :at [sun.net.util.IPAddressUtil validateNumericFormatV4 "IPAddressUtil.java" 150]}]
      ```
      
      Not clear if this change has a hope of fixing it: if it doesn't resolve
      once its possible it is cached somewhere in the network stack, or it
      won't resolve if you ask again.
      
      But gonna give it a shot.
      
      Set the property `"networkaddress.cache.negative.ttl"` to `"0"`
      
      > networkaddress.cache.negative.ttl (default: 10)
      >    Indicates the caching policy for un-successful name lookups from the name service. The value is specified as an integer to indicate the number of seconds to cache the failure for un-successful lookups.
      
      >    A value of 0 indicates "never cache". A value of -1 indicates "cache forever".
      
      From
      https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/net/InetAddress.html
      
      
      in the hopes that we can try multiple times. Restores the original value
      after the test completes so we don't inadvertently change behavior
      elsewhere.
      
      If we get an error of java.net.UnknownHostException we try again if we
      have attempts remaining. If we get a boolean it means the ip resolution
      worked so we can rely on the response (checking if it resolves locally
      or not)
      
      * add a delay
      
      * comment out test
      
      Co-authored-by: default avatarCam Saul <github@camsaul.com>
      Co-authored-by: default avatardpsutton <dan@dpsutton.com>
      98bbb001
  15. Aug 08, 2022
  16. Aug 05, 2022
  17. Aug 04, 2022
  18. Aug 03, 2022
    • Braden Shepherdson's avatar
      Serdes v2: Handle other embedded MBQL fragments (#24537) · cb9e9aed
      Braden Shepherdson authored
      This PR handles the other JSON-encoded MBQL snippets I was able to find.
      
      These snippets contain `Table` and `Field` IDs, and so are not portable. These
      fields are expanded during serialization and the IDs replaced with portable
      references, then converted back in deserialization.
      
      Note that the referenced field must already be loaded before it has a valid ID.
      `serdes-dependencies` defines this order, therefore each entity depends on those
      tables and fields referenced in its MBQL fragments.
      
      The complete set of fields I found to convert:
      
      - `Metric.definition`
      - `Segment.definition`
      - `DashboardCard.parameter_mappings`
      - `Card.parameter_mappings`
      cb9e9aed
  19. Aug 02, 2022
  20. Jul 26, 2022
  21. Jul 25, 2022
    • adam-james's avatar
      Add a check to PUT /user/:id to disallow name edits if an SSO user (#23752) · 3795b56c
      adam-james authored
      * Add a check to PUT /user/:id to disallow name edits if an SSO user
      
      * Clean up After SAML SSO tests
      
      The `:sso_source` key is set for the Rasta user in some SAML tests, but is expeted to be nil in subsequent tests, so
      we clean up in the SAML test ns.
      
      * Add a test to ensure SSO user names can't be changed via API
      
      * Missed a change I had made while adjusting tests
      
      * valid-name-update? take 1 name, to allow better error messages
      
      Let's the user know that first or last name is the cause of a problem, rather than just 'names'.
      
      * Remove unneeded thread macro
      
      * Use partial=
      
      * slight change to local fn for reusability
      3795b56c
    • Braden Shepherdson's avatar
      Serdes v2: Add `--v2 true` flag to the `dump` and `load` commands (#24230) · 6d46ef12
      Braden Shepherdson authored
      * Serdes v2: Add `--v2 true` flag to the `dump` and `load` commands
      
      This is the last piece for end-to-end serialization and deserialization.
      The results should be similar to v1, though probably not identical.
      6d46ef12
  22. Jul 22, 2022
  23. Jul 21, 2022
  24. Jul 20, 2022
Loading