Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Nov 26, 2019
  2. Nov 21, 2019
  3. Nov 19, 2019
  4. Nov 18, 2019
  5. Nov 15, 2019
    • Cam Saul's avatar
      B I G timezone improvements :wrench: (#11308) · 852b3482
      Cam Saul authored
      - Differentiate between columns that record timezone info vs ones that are normalized. (i.e., TIMESTAMP WITH TIME ZONE vs. TIMESTAMP WITH LOCAL TIME ZONE in Oracle and other DBs that have this distinction.) Also differentiate between recording offset from UTC and Zone ID.
      
      - New :type/Temporal base type for :type/Date, :type/Time, and :type/DateTime. Previously, :type/Date and :type/Time derived from :type/DateTime which didn't quite make sense.
      
      - Add new attempted-murders dataset to count number of crows spotted. Has same temporal instant in a variety of formats with and without timezone to facilitate writing new tests
      
      - New tests for TIME WITH TIME ZONE columns.
      
      - Fix MySQL behavior for TIMESTAMP columns, which are the equivalent of Oracle TIMESTAMP WITH LOCAL TIME ZONE (i.e., they are normalized to UTC when stored) vs DATETIME (which are Local non-timezone-aware columns).
      Unverified
      852b3482
  6. Nov 13, 2019
  7. Oct 28, 2019
    • Paul Rosenzweig's avatar
      Timezone aware scale (#11111) · 3b6f8871
      Paul Rosenzweig authored
      * copy over code from pr
      
      * remove chronological
      
      * remove tick formatting
      
      * remove chronological
      
      * use reporting_timezone
      
      * remove unneeded tests
      
      * remove import
      
      * add timeseriesScale tests/fixes
      
      * eslint
      
      * more timeseriesScale tests
      
      * remove now unneeded rangeFn
      
      * more timeseriesScale tests
      
      * report_timezone to actual_timezone
      
      * display warning if timezones are mismatched
      
      * extract getTimezone
      
      * don't error if series doesn't have a card (in tests)
      
      * move expected/actual timezones into data, add warning when series have different timezones
      
      * fixes
      
      * make sure getTimezone works on transformed series
      
      * update actual/expected to results/requested
      
      * call getTimezone from LAB renderer rather than apply axis
      
      * include timezone as part of a timeseries interval
      
      * missed variable
      
      * include timezone when updating timeseries interval
      
      * remove "report_timezone"
      
      * add timezone fields to DatasetData flow type
      
      * make the fields optional
      
      * Fill data using timezone scale (#11143)
      Unverified
      3b6f8871
  8. Oct 21, 2019
    • Tom Robinson's avatar
      Fix Google Analytics query builder crashes (#11186) · 77ae8d16
      Tom Robinson authored
      * hide section picker if when viewing column settings
      
      * hide sidebar title
      
      * add ChartSettingsSidebar test
      
      * always show column settings title
      
      * lint
      
      * override sidebar title
      
      * remove unneeded diff
      
      * group reference sidebar tables by schema
      
      * keep everything as one list
      
      * use name instead of display_name
      
      * add tests
      
      * add schema pane
      
      * filter to querable tables
      
      * update tests
      
      * unused imports
      
      * sort schema and table names
      
      * change scalar compact formatting to depend on pixel width rather than grid width (#10932)
      
      * prompt for save when sharing unsaved question (#10976)
      
      * use generic props override instead of just `title` and `onBack`
      
      * Update pulse table style to match app (#10989)
      
      * undefined -> null, you can spread null aparently
      
      * Upgrade redshift driver to 1.2.36.1060 (#11181)
      
      * fix bug where column settings were dropped (#11154)
      
      * remove leading slash on publicPath (#11174)
      
      * Fix GA crashes
      77ae8d16
    • Szymon Bochniak's avatar
      c7666939
  9. Oct 18, 2019
  10. Oct 16, 2019
    • Cam Saul's avatar
      Timezone fixes (#11081) · 18da2fe5
      Cam Saul authored
      *  Make sure report timezone is taken into account when converting bucketed datetime filter clauses to ranges
      *  Properly handle results for H2 and Oracle TIMESTAMP WITH TIME ZONE columns and SQL Server DATETIMEOFFSET columns
      *  Enable timezone tests for all DBs; failing ones disabled for now
      
      Test improvements: 
      
      *  with-temporary-setting-values macro will now throw an Exception if passed an incorrect number of args in binding form
      *  Rework Oracle test extensions to use Oracle's wacky INSERT ALL syntax to load all rows for a test dataset at once. Oracle tests 10x faster 
      *  Rework timezone tests to be more idiomatic and readable
      *  Test fixes to make sure various drivers can properly load test data with timezone-aware columns
      *  A few fixes for test utility functions, including making sure the dataset macro works properly when used at the top-level of a test with multiple drivers
      *  Fix the random Vertica test failures by adding retry logic when loading data fails
      *  Other code cleanup
      Unverified
      18da2fe5
  11. Oct 09, 2019
  12. Oct 07, 2019
  13. Oct 04, 2019
  14. Sep 30, 2019
    • Cam Saul's avatar
      BigQuery code improvements (#11024) · 10037cda
      Cam Saul authored
      Unverified
      10037cda
    • Cam Saul's avatar
      Test data warehouse connections on checkout (#11018) · cbabdf4e
      Cam Saul authored
      c3p0 has an option to test connections when fetched from the connection pool intended to fix that exact problem, so this was a simple matter of enabling it. It is not enabled by default because it adds overhead to connection checkout, especially for JDBC drivers that don't support the full JDBC 4 API, which includes a Connection.isValid() method. However, all of our JDBC drivers are JDBC 4 compliant, meaning c3p0 can check connection validity fairly efficiently.
      
      With the data warehouse on the same machine as the Metabase server, the added overhead was in the order of ~100µs, or an order of magnitude or two below the threshold of human perception. With the data warehouse in AWS us-east-1 and the Metabase server in San Francisco, the overhead was around ~70ms, which is basically typical network latency for such a request.
      
      Based on those results, it appears that the additional cost of this test is roughly equal to the network latency of the request. IRL the Metabase server and data warehouse are likely to be located in closer geographical proximity to one another than my trans-contintental tests, if not in the same AWS region (or equivalent). I would expect the added overhead for most query executions for most setups to be in the 1-10ms range and the p99 to be under 100ms extra latency.
      
      Accepting that overhead seems like a no-brainer when considering that an entire class of bugs will be fixed by enabling the option.
      Unverified
      cbabdf4e
  15. Sep 27, 2019
    • Cam Saul's avatar
      Optimize datetime filters! (#10980) · ceddd03e
      Cam Saul authored
      The biggest performance improvement in history of Metabase since we switched to Clojure
      
      Before when filtering by a "bucketed" datetime field we would wrap the field and the value(s) it was being compared against in casting/truncation functions. For example when compiling a query to find fields where month is September 2019, we previously generated SQL like this:
      
      ```sql
      SELECT count(*)
      FROM public.checkins
      WHERE date_trunc('month', CAST(public.checkins.date AS timestamp)) 
          = CAST(timestamp '2019-09-01T00:00:00Z' AS date)
      ```
      
      As mentioned in #4043, this is not good for performance! Metabase now generates logically equivalent SQL like
      
      ```sql
      SELECT count(*)
      FROM public.checkins 
      WHERE (
          public.checkins.date >= timestamp '2019-09-01T00:00:00Z' AND
          public.checkins.date < timestamp '2019-10-01T00:00:00Z'
      )
      ```
      
      Fixes #4043
      Fixes #11009 
      Fixes #11010
      Fixes #11011 
      Fixes #11012
      Fixes #11013
      
      :open_mouth: :race_car: 
      Unverified
      ceddd03e
  16. Sep 24, 2019
  17. Sep 22, 2019
  18. Sep 20, 2019
  19. Sep 17, 2019
  20. Sep 13, 2019
  21. Sep 11, 2019
  22. Sep 08, 2019
  23. Sep 07, 2019
  24. Aug 29, 2019
  25. Aug 28, 2019
  26. Aug 26, 2019
  27. Aug 15, 2019
    • Cam Saul's avatar
      Merge master -> release-0.33.x (#10604) · fc60d633
      Cam Saul authored
      * Compute Content-Security-Policy hashes for inline JS (#10504)
      
      * Split out inline JS from index/init templates to separate files
      
      * Read inline JS from resources at run time
      
      * Calculate inline JS hashes for CSP header from content
      
      * Move inline JS to resource sub-directory
      
      * Update and memoize inline JS loading
      
      * Revert debug code
      
      * Deduplicate `resp/response` calls
      
      * Fix paths to moved inline JS resources
      
      * Force creation of test data DB so things don't get left in the cache
      
      This fix was provided by @camsaul.
      
      * Combine and `defonce` inline JS hashes
      
      * s/inlinejs/inline-js/
      
      * Ensure that Metabase JAR is readable by `metabase` container user (#10510)
      
      If the umask of the user that builds the image is xx7, the JAR will not be
      world readable in the resulting image.
      
      * Remove `--add-modules=java.xml.bind` Java option (#10521)
      
      Fixes #10244. @camsaul confirmed that it is no longer needed.
      
      * Join on collection table's ID, not the joining table's `collection_id` (#10481)
      
      * Join on collection table's ID, not the joining table's `collection_id`
      
      This caused each record that joins on collection, to be duplicated for each
      existing collection:
      
      `LEFT JOIN collection collection ON card.collection_id = collection_id`
      
      should be
      
      `LEFT JOIN collection collection ON card.collection_id = collection.id`
      
      * Test fixes from @cam on EE
      
      * Insights: correctly handle infinities in results (#10502)
      
      Filter out models with infinities
      
      * Transfer log events as JSON objects and allow filtering on front-end (#10522)
      
      * Return log events as JSON objects from API; render on front-end
      
      Site UUID added to log events.
      
      * Remove superfluous memoization of site UUID retrieval
      
      Settings are already cached.
      
      * Transfer timestamps in ISO-8601 format
      
      * Move `metabase.metabot.instance/local-process-uuid` to `metabase.public-settings`
      
      * Use `local-process-uuid` in stead of `site-uuid`
      
      `site-uuid` is not unique across processes, which is what we want to
      associate with log events.
      
      * Remove unused import
      
      * Allow log events to be filtered by process UUID on front-end
      
      * Move process selector out of loading wrapper
      
      Otherwise, if there are process UUIDs with no log events, the selector is
      removed with the log event list.
      
      * Figured out how to add docs to `defonce`
      
      * Fix ns declaration
      
      * Linter appeasement
      
      * Merge log events received from back-end with previously received ones
      
      This allows responses from multiple back-end instances to be spliced
      together.
      
      * Use MB components in stead of plain, styled HTML tags
      
      The select is only displayed if more than one process UUID was found.
      
      * Linter appeasement
      
      * Move `metabase.public-settings/local-process-uuid` to `metabase.config`
      
      * Fix sorting on multiple log event fields
      
      * Flatten `Select` children to allow nested arrays of children
      
      * Generate options directly under parent Select
      
      * Limit the number of log events that we render
      
      * Docstring and style updates
      
      * Update editor config with Clojure files max line length
      
      * Ensure that `NumericWrapper` is imported before use
      
      * Cleanup layout
      
      * Bump HoneySQL version (#10559)
      
      The new version (0.9.5) includes @camsaul's Turkish upper case fix:
      jkk/honeysql#237
      
      * Factor out test for access to localStorage (#10533)
      
      * Factor out test for access to localStorage
      
      This allows code that uses localStorage to test against
      `window.hasLocalStorage`, in stead of handling exceptions generated when
      access to localStorage is denied.
      
      * Move check for localStorage to metabase/lib/dom
      
      * Fix typo in warning message (#10556)
      
      * revert text color to #74838f (#10560)
      
      * revert text-medium color to #74838f
      
      * use light instead of medium on preview button
      
      * MBTL (#10105)
      
      Add transforms and domain models
      
      * Added page about maps and updated nav (#10495)
      
      * Added page about maps and updated nav
      
      * Clarified step 1
      
      * Added more details throughout
      
      * Quick URL change
      
      * Added additional resource!
      
      * fix typo: 'sdisplay' to 'display'
      
      * Add message with link to docs for fields without any filter widgets (#10340)
      
      * Correct proxy command line [ci skip] (#10430)
      
      * Bump Toucan version to include Turkish lower case fix (#10581)
      
      * Wrap `tru` and `trs` macro results in `str` (#10571)
      
      * Add versions of `trs` and `tru` that wrap results in `str`
      
      The pre-existing `trs` and `tru` were renamed to `lazy-trs` and `lazy-tru`
      respectively, and new `trs` and `tru` funcs were added, wrapping the result
      of its lazy counterpart in `str`.
      
      This way the normal use case of `trs` and `tru` is improved by no longer
      requiring that it be wrapped in `str`.
      
      Cases where the translated result is passed to `str` anyway, the lazy
      version can be used.
      
      * `(str (trs ...))` → `(trs ...)`
      
      And the same for `tru`.
      
      * Allow `defsetting` descriptions to use lazy versions of `trs`/`tru`
      
      * Use `lazy-trs`/`lazy-tru` where `str` is applied separately
      
      * Remove unnecessary `vec` from `tru`/`trs` macros
      
      * puppetlabs.i18n does not have a `lazy-tru`
      
      * Missed some settings that now need to use `lazy-tru`
      
      * Only use `lazy-tru` in top-level `def`s
      
      If the localized strings are looked up on module import, before locales are
      loaded, the lookup will fail and the original input string will be used.
      
      * Fix bad usages of `tru` that should be `lazy-tru`
      
      * s/lazy-tr/deferred-tr/g
      
      * Avoid `tr*` macros being used in top-level (compile time) statements
      
      Because localizations are not yet loaded at compile time.
      
      * Add type hint for `str*` wrapping of `trs`/`tru`
      
      * Fix assigned function's return type hint
      
      * Expand docstrings for `i18n/tr[su]`
      
      * Use `trs` and `tru` from metabase.util.i18n instead of puppetlabs.i18n.core
      
      * Defer compile time translation lookups
      
      These changes were pointed out by exceptions generated by `i18n/str*`.
      
      * Remove unused `require`d function
      
      * New compile time `trs` usages caught by `lein uberjar`
      
      * Ensure that error message from db driver is a string
      
      It is necessary to ensure that the error message is a string, because some
      db driver errors come from statically declared error messages, using
      `deferred-tru`. Like those in
      `metabase.driver.common/connection-error-messages`.
      
      Fixes #10347 and #10473.
      
      * Remove string type hint from `humanize-connect-error-message`
      
      * Don't disable preview for fields with non-trivial type  (#9687)
      
      * Don't create API callback if no database is associated with card (#10573)
      
      * Don't create API callback if no database is associated with card
      
      Fixes #10538
      
      * Return empty array to avoid mapping over null
      Unverified
      fc60d633
  28. Aug 14, 2019
    • Walter Leibbrandt's avatar
      Wrap `tru` and `trs` macro results in `str` (#10571) · b0147303
      Walter Leibbrandt authored
      * Add versions of `trs` and `tru` that wrap results in `str`
      
      The pre-existing `trs` and `tru` were renamed to `lazy-trs` and `lazy-tru`
      respectively, and new `trs` and `tru` funcs were added, wrapping the result
      of its lazy counterpart in `str`.
      
      This way the normal use case of `trs` and `tru` is improved by no longer
      requiring that it be wrapped in `str`.
      
      Cases where the translated result is passed to `str` anyway, the lazy
      version can be used.
      
      * `(str (trs ...))` → `(trs ...)`
      
      And the same for `tru`.
      
      * Allow `defsetting` descriptions to use lazy versions of `trs`/`tru`
      
      * Use `lazy-trs`/`lazy-tru` where `str` is applied separately
      
      * Remove unnecessary `vec` from `tru`/`trs` macros
      
      * puppetlabs.i18n does not have a `lazy-tru`
      
      * Missed some settings that now need to use `lazy-tru`
      
      * Only use `lazy-tru` in top-level `def`s
      
      If the localized strings are looked up on module import, before locales are
      loaded, the lookup will fail and the original input string will be used.
      
      * Fix bad usages of `tru` that should be `lazy-tru`
      
      * s/lazy-tr/deferred-tr/g
      
      * Avoid `tr*` macros being used in top-level (compile time) statements
      
      Because localizations are not yet loaded at compile time.
      
      * Add type hint for `str*` wrapping of `trs`/`tru`
      
      * Fix assigned function's return type hint
      
      * Expand docstrings for `i18n/tr[su]`
      
      * Use `trs` and `tru` from metabase.util.i18n instead of puppetlabs.i18n.core
      
      * Defer compile time translation lookups
      
      These changes were pointed out by exceptions generated by `i18n/str*`.
      
      * Remove unused `require`d function
      
      * New compile time `trs` usages caught by `lein uberjar`
      
      * Ensure that error message from db driver is a string
      
      It is necessary to ensure that the error message is a string, because some
      db driver errors come from statically declared error messages, using
      `deferred-tru`. Like those in
      `metabase.driver.common/connection-error-messages`.
      
      Fixes #10347 and #10473.
      
      * Remove string type hint from `humanize-connect-error-message`
      Unverified
      b0147303
  29. Aug 12, 2019
  30. Aug 07, 2019
  31. Jul 29, 2019
  32. Jul 12, 2019
  33. Jul 10, 2019
Loading