Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Dec 11, 2022
  2. Dec 10, 2022
  3. Dec 09, 2022
  4. Dec 08, 2022
  5. Dec 07, 2022
    • dpsutton's avatar
      Fix numeric parameter values in jwt (#26969) · f342fe17
      dpsutton authored
      * Fix numeric parameter values in jwt
      
      Don't call `seq` on numbers. If its a string, assert it isn't blank,
      otherwise check that it is non-null.
      
      * bind (:value request-param)
      Unverified
      f342fe17
    • dpsutton's avatar
      Fix flaky `remap-human-readable-string-column-test` (#27050) · b43eaf7e
      dpsutton authored
      * Fix flaky `remap-human-readable-string-column-test`
      
      Quite annoying test that would flake quite a bit in CI.
      
      the problem is that the mechanism for `mt/with-column-remappings` wasn't
      aware of the case when there were pre-existing mappings. It just blindly
      added a new mapping. But when the middleware fetching the remappings, it
      found the preexisting ones.
      
      For the venue.name field in this test, that was ("20th Century
      Cafe","25°","33 Taps","800 Degrees Neapolitan Pizzeria", ...). We were
      passing in fake names like "apple", "banana", "kiwi" and it found no
      remappings for those in the db.
      
      So the fix is to check for pre-existing ones, and if found, use
      `tu/with-temp-vals-in-db` to temporarily set them to the desired values,
      otherwise use some new ones with `tt/with-temp*` as it was doing
      previously.
      
      * log errors for CI
      
      * Only use type :full field values when remapping
      
      we store cached chained filter values in here (with type :linked-filter,
      there are also type :sandbox in there) but the :full are the ones that
      are used for remapping.
      
      In the tests, if the chain link tests have already run, there can be 6
      field values for the field here (`(mt/id :venues :name)`) and we want to
      make sure we update the full one, not the chain filter ones
      
      ```clojure
      [{:hash_key "576275248",
        :has_more_values false,
        :last_used_at #t "2022-12-07T21:08:35.592931Z",
        :type :linked-filter,
        :updated_at #t "2022-12-07T21:10:22.972907Z",
        :human_readable_values
        ("Appletini" "Bananasplit" "Kiwi-flavored Thing"), ;; the test updatedthe existing :linked-filter one
        :id 560,
        :values ("apple" "banana" "kiwi"),
        :field_id 15,
        :created_at #t "2022-12-07T21:08:35.592931Z"}
       {:hash_key "-897793959",
        :has_more_values false,
        :last_used_at #t "2022-12-07T21:08:35.695344Z",
        :type :linked-filter,
        :updated_at #t "2022-12-07T21:08:35.695344Z",
        :human_readable_values [],
        :id 564,
        :values ("Kinaree Thai Bistro" "Krua Siri"),
        :field_id 15,
        :created_at #t "2022-12-07T21:08:35.695344Z"}
       {:hash_key "388078290",
        :has_more_values false,
        :last_used_at #t "2022-12-07T21:08:35.742561Z",
        :type :linked-filter,
        :updated_at #t "2022-12-07T21:08:35.742561Z",
        :human_readable_values [],
        :id 566,
        :values ("Tacos Villa Corona" "Tito's Tacos"),
        :field_id 15,
        :created_at #t "2022-12-07T21:08:35.742561Z"}
       {:hash_key "-299897589",
        :has_more_values false,
        :last_used_at #t "2022-12-07T21:08:35.777517Z",
        :type :linked-filter,
        :updated_at #t "2022-12-07T21:08:35.777517Z",
        :human_readable_values [],
        :id 567,
        :values ("Festa" "Fred 62"),
        :field_id 15,
        :created_at #t "2022-12-07T21:08:35.777517Z"}
       {:hash_key "-391654650",
        :has_more_values false,
        :last_used_at #t "2022-12-07T21:08:36.681046Z",
        :type :linked-filter,
        :updated_at #t "2022-12-07T21:08:36.681046Z",
        :human_readable_values [],
        :id 569,
        :values ("Baby Blues BBQ" "Beachwood BBQ & Brewing" "Bludso's BBQ"),
        :field_id 15,
        :created_at #t "2022-12-07T21:08:36.681046Z"}
       {:hash_key "1784886858",
        :has_more_values false,
        :last_used_at #t "2022-12-07T21:08:36.860010Z",
        :type :linked-filter,
        :updated_at #t "2022-12-07T21:08:36.860010Z",
        :human_readable_values [],
        :id 572,
        :values ("Baby Blues BBQ" "Beachwood BBQ & Brewing" "Bludso's BBQ"),
        :field_id 15,
        :created_at #t "2022-12-07T21:08:36.860010Z"}
       {:hash_key nil,
        :has_more_values false,
        :last_used_at #t "2022-12-07T21:04:04.299251Z",
        :type :full, ;; but should have updated this one
        :updated_at #t "2022-12-07T21:04:04.299251Z",
        :human_readable_values [],
        :id 4,
        :values
        ("20th Century Cafe"
         "25°"
         "33 Taps"
         "800 Degrees Neapolitan Pizzeria"
         "BCD Tofu House"),
        :field_id 15,
        :created_at #t "2022-12-07T20:57:21.896298Z"}]
      ```
      
      * remove CI logging
      Unverified
      b43eaf7e
    • Natalie's avatar
      docs - update public links (#27022) · fd40b164
      Natalie authored
      Unverified
      fd40b164
    • Case Nelson's avatar
      MongoDB Questions: $expr operator at the $match do not use indexes (#27031) · 59a1e1e8
      Case Nelson authored
      Resolves #16132
      
      We have been simplifying $expr operations for
      [awhile](https://github.com/metabase/metabase/blob/8e989499e936c04000b13a88f4934e96692083a2/modules/drivers/mongo/src/metabase/driver/mongo/query_processor.clj#L571-L588), since at least 4fba5cfe.
      
      It's possible that there are some cases that we do not simplify that we
      should, but from this investigation, they seem like legit uses
      remaining.
      Unverified
      59a1e1e8
    • Natalie's avatar
      docs - update custom destinations (#27017) · 07c4d591
      Natalie authored
      Unverified
      07c4d591
Loading