Skip to content
Snippets Groups Projects
Unverified Commit 121db001 authored by dpsutton's avatar dpsutton Committed by GitHub
Browse files

Merge master nov 11 (#49838)


* Make sure a new table gets table-level block if any other tables have table-level block (#49509)

* Filter out Empty Rows from Pivot Exports  (#49512)

* Pivot Measures Order Used in Pivot Exports

Fixes #48442

A pivot table can have any number of measures, and the user can order these by dragging in the UI. Before this PR,
that order was ignored and measures would alway be in index order, which is confusing for any user who needs the
measures to be displayed in a particular order, especially if they've re-ordered them in the pivot viz settings UI.

A test has been added to check that measure order is used.

A few minor changes to the pivot qp and post-processor
 - measure indices are looked up in the pivot qp and added in viz-settings order
 - the pivot measures are only added if the qp has not already added them.
 - pivot-opts Malli spec has been made in the namespace, adjusted to allow `nil` as a valid pivot-opts output, and
 used in relevant functions

* address review points.

* add a rows order test

* Filter out Empty Rows from Pivot Exports

Fixes #49353

The linked issue is not actually related to pivot export size but is instead related to the 'Min of Created At: Month'
aggregation; the default aggregation function was `+`, so it broke when the date string was encountered.

That was fixed.

As I was trynig to keep the export small if possible, I noticed that in some cases empty rows are appended, so I added
the filter so that if a pivot row's values are completely empty, it doesn't add it.

Finally, this PR also adds the 'sub section totals' which I noticed were missing from the exports. This comes up when
you have 3+ pivot-rows configured, so you can see the subtotals for the first pivot row and the subtotals nested
within those sections for the second pivot row, and so on.

* add test for non-numeric values

* Make sure the new name refs match on aggregations not just breakouts

* cljfmt

* Fix - Values from the returned rows not present in the visualization are interpolable in the URL but don't have values (#49530)

* Fix #46318

* Add repro for #46318

* Move setup to beforeEach

* Email throttling config (#49477)

* Update Readme version references and published npm version to 1.52.1 (#49674)

* feat(sdk): Add chart settings to `InteractiveQuestion` (#49167)

* fix(sdk): Fix visualization default size (#49672)

* Re-introduce "Upload CSV" button for instances with DWH attached (#49545)

* Move the upload CSV button to the main nav bar

* Remove the old `SidebarOnboardingSection`

* Remove obsolete unit tests

* Rework E2E tests

* Add some spacing around the button

* Fix E2E test

* Break `MainNavbar` unit test down

* Expand unit tests

* Update E2E tests

* Fix E2E test failure

* Move JSDoc where it belongs

* Provide context for translators

* Simplify the condition

* docs: contact support to change cloud env var (#49555)

* docs: cloud environment variables

* Apply suggestions from code review

Co-authored-by: default avatarJeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: default avatarJeff Bruemmer <jeff.bruemmer@gmail.com>

* docs: remove nested queires admin setting (#49699)

* docs: remove nested queries setting

* docs: remove mention of nested query setting

* Note about apsaradb (#49675)

* note about apsaradb

* Update docs/installation-and-operation/configuring-application-database.md

Co-authored-by: default avatarJeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: default avatarJeff Bruemmer <jeff.bruemmer@gmail.com>

* fix(sdk): put a bandage on the flashing error on static question in strict mode (#49659)

* link fix (#49700)

* Remove withFeatures from renderWithProviders (#49137)

* Ensure that correct error messages show up in the Edit user modal (#48966)

* docs - notes on database browser (#49726)

* notes on database browser

* typo

* redshift defines "text" as varchar(255) and we want it to be way longer (#49710)

* Fix label and link on authentication upsell card (#49707)

Closes #49534

* [Notification] Send notification options (#49576)

* Handle touch start capture as well as mouse down for popover (#49465)

* Handle touch start capture as well as mouse down for popover

* Also stop event propagation for touch events on menu item

* Support localization in static embeds (#49441)

* Correct embedding hash options type semantically

* Pass `X-Metabase-Locale` to embed downloads

* wip locale header middleware

* Allow smart scalar text to be translated

* Stop using global variable

* Add more details to embedding types

* Extend the E2E util type and correct some properties types

* Add e2e test

* Fix dashboard name

* Add a test for static embed question

* Make a type name follows a convention

Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>

* Fix failed E2E tests due to missing default values

* Fix public embed not working with `?locale` anymore

* Revert "wip locale header middleware"

This reverts commit 83d8d135.

* Preserve locale when in the `as-admin` macro is used

Motivating issue:

```shell
❯ http get 'http://localhost:3000/api/embed/dashboard/eyJhbGciOiJIUzI1NiJ9.eyJyZXNvdXJjZSI6eyJkYXNoYm9hcmQiOjEyfSwicGFyYW1zIjp7fX0.QZ-tEWpgJeSMUuaPfuH6_VQwM2yXNMcuureWCtHsszU/dashcard/162/card/124' x-metabase-locale:fr -pb | jq '.data|.cols|map(.display_name)'
[
  "State",
  "Count"
]
```

I'm running a query that has aggregated columns and it is returning the
untranslated. Note that these are computed and dynamically given a
display name.

```clojure
(case tag
  :count     (i18n/tru "Count")
  :cum-count (i18n/tru "Cumulative count"))
```

The problem is that we run embedding things as admin. And that gets the
current user, which in embed and public spaces is nil, and so binds a
nil to user-locale, which defaults to english when translating.

After:

```
❯ http get 'http://localhost:3000/api/embed/dashboard/eyJhbGciOiJIUzI1NiJ9.eyJyZXNvdXJjZSI6eyJkYXNoYm9hcmQiOjEyfSwicGFyYW1zIjp7fX0.QZ-tEWpgJeSMUuaPfuH6_VQwM2yXNMcuureWCtHsszU/dashcard/162/card/124' x-metabase-locale:fr -pb | jq '.data|.cols|map(.display_name)'
[
  "State",
  "Nombre de lignes"
]

❯ http get 'http://localhost:3000/api/embed/dashboard/eyJhbGciOiJIUzI1NiJ9.eyJyZXNvdXJjZSI6eyJkYXNoYm9hcmQiOjEyfSwicGFyYW1zIjp7fX0.QZ-tEWpgJeSMUuaPfuH6_VQwM2yXNMcuureWCtHsszU/dashcard/162/card/124' x-metabase-locale:zh -pb | jq '.data|.cols|map(.display_name)'
[
  "State",
  "行数"
]

❯ http get 'http://localhost:3000/api/embed/dashboard/eyJhbGciOiJIUzI1NiJ9.eyJyZXNvdXJjZSI6eyJkYXNoYm9hcmQiOjEyfSwicGFyYW1zIjp7fX0.QZ-tEWpgJeSMUuaPfuH6_VQwM2yXNMcuureWCtHsszU/dashcard/162/card/124

' x-metabase-locale:es -pb | jq '.data|.cols|map(.display_name)'
[
  "State",
  "Contar"
]
```

This is fetching a dashboard's card which is a query of orders grouped
by created at month, sum of total.

---------

Co-authored-by: default avatarNicolò Pretto <info@npretto.com>
Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
Co-authored-by: default avatardan sutton <dan@dpsutton.com>

* docs(sdk): fix dead link in sdk quickstart (#49749)

* Remove sandboxes tests from flaky jail (#49656)

* Remove @flaky tag

* Make workaround test pass

* Disable workaround test

* Uncomment and unquarantine the workaround test

* Disable normal test for now

* Revert "Disable normal test for now"

This reverts commit 68fa2175.

* Bring back quarantine

* Update comment

* Fix flaky native query drill test (#49745)

* Try to fix flake

* See if timeout is necessary

* Revert "See if timeout is necessary"

This reverts commit 181f3c5e.

* Revert change for coordinates filter

* feat(sdk): deprecate the ModifyQuestion component (#49747)

* Fix flaky 25885 repro (#49753)

* Remove @flaky tag from no longer flaking tests (#49608)

* Remove @flaky tag

* Unskip test and remove @flaky tag

* Remove @flaky tag

* Remove @flaky tag

* Revert "Remove @flaky tag"

This reverts commit 08c57add.

* Revert "Remove old `MB_API_KEY` setting (#48592)" (#49507)

* Revert "Remove old `MB_API_KEY` setting (#48592)"

This reverts commit 187e9508.

* preserve metadata of the wrapped handler

* fix(sdk): generated cli components has inconsistent styles after the style leak fix (#49723)

* Do not pollute SDK users `window` object (#49770)

* remove cube driver from list of community drivers (#49780)

* Prep for enabling multi-arch docker builds + Java 21 (#48910)

* build on java 21

* update docker image

* update test

* more using 21

* back to 11 for build

* update docker command

* update containerization

* update docker actions

* revert dockerfile change

* update other docker action versions

* use release commit for containerization

* [testing] Add a few basic expressions to the generators (#49564)

Adds basic expressions to the query generators.

There's a lot more to do to robustly generate realistic expressions! But
this is enough to make expressions exist on queries, which then get
consumed as inputs to filters etc.

* Bump Oracle driver (#49430)

* Bump Oracle driver

Move to ojdbc11

* Update modules/drivers/oracle/deps.edn

Co-authored-by: default avatarCam Saul <1455846+camsaul@users.noreply.github.com>

---------

Co-authored-by: default avatarCam Saul <1455846+camsaul@users.noreply.github.com>

* [testing] Add order-by to the generative testing for queries (#49565)

This introduces a reusable `weighted-choice` function and a "weight"
system for the various steps. `:order-by` should be more rare than
filters, etc., `:limit` and `:append-stage` should be more rare still.

* docs: update links to learn (#49789)

* docs: update links to learn

* bad replace

* Update docs/exploration-and-organization/events-and-timelines.md

Co-authored-by: default avatarJeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: default avatarJeff Bruemmer <jeff.bruemmer@gmail.com>

* Enforce collection perms on native source-card IDs instead of requiring native query perms (#49364)

* Disable connection reuse for requests that serve streaming responses (#49773)

* Revert "[streaming-response] Use HttpEndpoint.isOpen() instead of reading a byte from TCP socket (#49460)"

This reverts commit 060baf0c.

* Disable connection reuse for requests that serve streaming responses

* docs - add notes on oracle connection (#49795)

* add notes on oracle connection

* edit

* [testing] Add explicit joins to the query generators (#49566)

I had to add `only-safe-columns` to filter out columns with known issues
in current pMBQL. In particular, implicitly joining on a column which
appears twice (eg. because of a double- or self-join) is ambiguous with
classic `:field` refs, and will cause errors.

There's a `:dynamic` var to re-enable all the columns for tests that are
only exercising new `:column` refs.

* Keep Pivoted Option works in Subscriptions (#49559)

* Keep Pivoted Option works in Subscriptions

Fixes: #49525

Even though the user could toggle 'Keep data pivoted` in the Sharing Sidebar UI, the setting was not being propagated
to the backend, so attachments would not be pivoted.

* add a cypress test

* add viz settings to get the pivot working

* fix for linter

* remove eslint ignore

---------

Co-authored-by: default avatarAleksandr Lesnenko <alxnddr@gmail.com>

* fix: Handle bigquery string(255) in sync (#49800)

Fixes: #49786

* Enable debugUnreturnedConnectionStackTraces in data-warehouse-connection-pool-properties (#49456)

* Add blurb from C3P0 docs to comment for unreturnedConnectionTimeout

* Enable debugUnreturnedConnectionStackTraces in data-warehouse-connection-pool-properties

Closes #47981

* Add defsetting for jdbc-data-warehouse-debug-unreturned-connection-stack-traces

And only enable debugUnreturnedConnectionStackTraces in the C3P0 config if the setting is enabled. There is some
memory cost to enabling the setting, and since maxPoolSize is user-configurable, it seems safer to disable
debugUnreturnedConnectionStackTraces by default.

* Add metabase.logger/level-enabled?

* Log a warning if C3P0 logs are not configured correctly to log stack traces

Log a warning if the user enables the jdbc-data-warehouse-debug-unreturned-connection-stack-traces but does not raise
the log level for the com.mchange package to INFO or higher.

* Add docs for MB_JDBC_DATA_WAREHOUSE_DEBUG_UNRETURNED_CONNECTION_STACK_TRACES

* Improve markdown docs for MB_JDBC_DATA_WAREHOUSE_DEBUG_UNRETURNED_CONNECTION_STACK_TRACES

Co-authored-by: default avatarJeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: default avatarJeff Bruemmer <jeff.bruemmer@gmail.com>

* Deprecate scores from search API response (#49653)

Search currently returns a detailed list of the scores for each item, which is pretty hefty, and the type is also coupled to the current rankers, which will change in future. 

Removing from the type to start to just validate that nothing uses it.

Best to just not model this. Going to see about just removing it from the BE as well, and put in some other way to debug. Worst case an opt-in query parameter.

* Make "Add database" more prominent (#49678)

* Remove dead code from browse models page

* Use the grid to control the gap

* Implement "Add database" button

* Add basic unit tests

* Make sure the feature works when there are no databases

* Add analytics to the db list

* Add "Add database" button to the sidebar

* Add E2E Snowplow tests

* Add unit tests

* Deal with authentication in each beforeEeach separately

* Add Snowplow E2E test for a database card

* Slightly tweak the title line height

* [Notification] Handlebars :older_man:

 (#49645)

* Fix flaky test (#49758)

* Fix flaky alert tests (#49673)

* Fix flaky tests

* Fix flaky tests

* Fix flaky notebook test (#49771)

* Fix flaky test

* Bring back waiting

* Decrease flakiness

* [Notification] Convert all mustaches emails to handlebars (#49759)

* sort namespace

---------

Co-authored-by: default avatarNoah Moss <32746338+noahmoss@users.noreply.github.com>
Co-authored-by: default avataradam-james <21064735+adam-james-v@users.noreply.github.com>
Co-authored-by: default avatarKamil Mielnik <kamil@kamilmielnik.com>
Co-authored-by: default avatarNgoc Khuat <qn.khuat@gmail.com>
Co-authored-by: default avatargithub-automation-metabase <166700802+github-automation-metabase@users.noreply.github.com>
Co-authored-by: default avatarOisin Coveney <oisin@metabase.com>
Co-authored-by: default avatarNemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: default avatarAlex Yarosh <alexandra@metabase.com>
Co-authored-by: default avatarJeff Bruemmer <jeff.bruemmer@gmail.com>
Co-authored-by: default avatarLuis Paolini <paoliniluis@gmail.com>
Co-authored-by: default avatarNicolò Pretto <info@npretto.com>
Co-authored-by: default avatarRaphael Krut-Landau <raphael.kl@gmail.com>
Co-authored-by: default avatarAlexander Solovyov <alexander@solovyov.net>
Co-authored-by: default avatarRomeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: default avatarMahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
Co-authored-by: default avatarPhoomparin Mano <poom@metabase.com>
Co-authored-by: default avatarRyan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: default avatarBraden Shepherdson <braden@metabase.com>
Co-authored-by: default avatarCam Saul <1455846+camsaul@users.noreply.github.com>
Co-authored-by: default avatarOleksandr Yakushev <alex@bytopia.org>
Co-authored-by: default avatarAleksandr Lesnenko <alxnddr@gmail.com>
Co-authored-by: default avatarCase Nelson <case@metabase.com>
Co-authored-by: default avatarappleby <86076+appleby@users.noreply.github.com>
Co-authored-by: default avatarChris Truter <crisptrutski@users.noreply.github.com>
parent 0d781919
No related merge requests found
Showing
with 98 additions and 75 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment