This project is mirrored from https://github.com/metabase/metabase.
Pull mirroring updated .
- Oct 13, 2020
-
-
Cam Saul authored
-
Nemanja Glumac authored
-
- Oct 12, 2020
-
-
Paul Rosenzweig authored
-
Paul Rosenzweig authored
* add some tests for value formatting * use parameter slugs rather than ids for dashboard links * add test of dashboard -> dashboard linking * add chained filter cypress test * don't go to collection when cancelling dashboard archive * eslint * don't crash when parameter mapping is undefined * use current, unsaved dashboard for crossfilter options * restore feature names to choropleth tooltips * more comments
-
Nemanja Glumac authored
-
dpsutton authored
* Handle slashes in oracle schema/table names #13225 [ci drivers] table names like `table_slash/` are valid in our normal query apparatus but are invalid in the calls to `.getColumns` and `.getTables` when determining the shape of the database. In these contexts it needs to be `table_slash//` - also get fix TODO to reduce over the list of tables rather than realizing entire result set and then reducing * Test slashes in oracle tablenames [ci drivers] (#13225) * Add test for schema slashes in oracle, stylistic changes [ci drivers] * Oracle db in test suite can't handle 42 character usernames [ci drivers]
-
Paul Rosenzweig authored
-
Nemanja Glumac authored
-
Tim Macdonald authored
-
Robert Roland authored
We should not be logging to a file by default, this was an oversight in the migration to log4j2 Resolves #13422
-
Nemanja Glumac authored
-
Tim Macdonald authored
It wasn't used elsewhere in the codebase and was generating incorrect output in /api/pulse/form_input (spuriously adding #general as a channel when Slack wasn't configured)
-
- Oct 10, 2020
-
-
dpsutton authored
* Only get substrings in fingerprinting when supported [ci drivers] failing tests in bigquery and mongo as they don't support expressions. * Corrects ns form and gets driver from table def [ci drivers] getting driver from dynamic var was not reliable at this place * Move expression check into `metadata-queries/table-row-sample` debated whether caller should know that whether to pass in truncation options or they might "silently" be ignored. Probably best this way and added that information to docstring.
-
- Oct 09, 2020
-
-
Cam Saul authored
-
Nemanja Glumac authored
* Fix `public.cy.spec.js` flake Note in the comment clearly says that the tests are sequential. If the first one fails, it affects the others. That's why we were seeing 9 failed tests in this file alone. * Fix `snippet.cy.spec.js` flake In very rare occasions it happened that test runner doesn't clear the input field before it starts typing new name. That's how we end up with `stuff-snippetMath` instead of just `Math`. * Wait for a dashboard to update NOTE: - In the latest CI run click on "Category" happened before this XHR - due to congestion or a slow network, popover couldn't be found within 4s (Cypress started searching for it immediately after the previous click) * Fix `modal()` + "Not now" related set of flakes * Quarantine `public.cy.spec.js`
-
- Oct 08, 2020
-
-
Cam Saul authored
-
Cam Saul authored
* New driver build scripts and fix Google driver build * Install Clojure CLI in Circle CI * Fix driver build script * Build script fix
* More dox * Enforce minimum build Clojure CLI version and address feedback * New metabuild-common directory for shared stuff. Address some PR feedback -
Nemanja Glumac authored
* Remove Selenium from the project [ci skip] * Remove karma [ci skip] Note: a huge help was [this](https://github.com/metabase/metabase/pull/9232/commits/8986c457f83dc5d0caacb9d4caf8e030f142707a) unmerged commit by Tom Robinson. * Remove webchauffeur * Remove unsupported tests * Temporarily skip Cypress flake (blocking the merge of #13401)
-
- Oct 07, 2020
-
-
Cam Saul authored
-
Cam Saul authored
Merge release 0.36.x
-
Cam Saul authored
* Clean up embedding tests * Embedded versions of chain filter API endpoints * reenable chained filter endpoints on public/embedded dashboards * update params value/search endpoint for public/embed * chain filter embed endpoints need to convert between slugs <-> IDs * For public/embed endpoints, ignore current user permissions if request is authenticated Co-authored-by:
Paul Rosenzweig <paul.a.rosenzweig@gmail.com>
-
Cam Saul authored
-
Nemanja Glumac authored
* Revert Cypress upgrade (v5.3.0. -> v3.8.2) Additionally needed to make all tests pass: * Fix Cypress flakes (cannot find "Not now" string within a modal)
-
dpsutton authored
* Use db pool connection rather than raw details connection pool is correctly setup with ssh tunneling information (if any) * Don't error when getting postgres enum types this was throwing errors when we allowed our pooled connections to close underneath us. But this particular step just isn't important enough for that. If we don't have a connection available to us, let the more robust query stuff fail it rather than this one off * Set idleConnectionTestPeriod to 120 when ssh tunneling The ssh tunnelling apparatus needs some work. The tunnels are created and put in the spec details map but then this is tossed away when we create the pool. ```clojure (defn- create-pool! "Create a new C3P0 `ComboPooledDataSource` for connecting to the given `database`." [{:keys [id details], driver :engine, :as database}] {:pre [(map? database)]} (log/debug (u/format-color 'cyan (trs "Creating new connection pool for {0} database {1} ..." driver id))) (let [details-with-tunnel (ssh/include-ssh-tunnel details) ;; If the tunnel is disabled this returned unchanged spec (connection-details->spec driver details-with-tunnel) properties (data-warehouse-connection-pool-properties driver)] (connection-pool/connection-pool-spec spec (merge properties (when (ssh/use-ssh-tunnel? details) {"idleConnectionTestPeriod" 120}))))) ``` this is swapped into an atom of {db_id -> pooleddatasource} but this means we don't have the :tunnel-session and :tunnel-tracker info from `start-ssh-tunnel`. * Remove connection pool keys when set to nil our connection pool would end up with {db_id nil ...} for no reason. Add tests to ensure. This change is largely driven by the codox testing requirement. There's no good way to test that the ssh tunneling options includes (when (ssh/use-ssh-tunnel? details) {"idleConnectionTestPeriod" 120}) and the test coverage checker was unhappy * Correct ns form in test file * Remove try/catch around enum types there's already error handling around this sync step so let it happen. The issue was that this check didn't use the correct connection to respect tunnelling and therefore would throw an error in getting enum types and fail the database sync step. That is now done correctly so if this step fails the other steps would as well and we no longer need to handle an error here specifically * Move ssh heartbeat into ssh.clj and not use jdbc jdbc had a way to test idle connections but other non-jdbc datasources obviously wouldn't benefit. Luckily our ssh connection can handle this on its own
-
Simon Belak authored
* SQL: sync only tables for which we have SELECT privilege * More elegant tests [ci drivers] * Turn `get-tables` and `has-select-privilege?` into multimethods * Rename `get-tables` → `db-tables` * Remove debug import * Align multimethod's signature with method's * Very minor style changes [ci drivers] - drivers will fail as of now, want CI to fail this PR * Add postgres, vertica, oracle, redshift [ci drivers] * Minor refactor [ci drivers] * Fix tests: add grants to ad-hoc tables & views [ci drivers] * We don't need DatabaseMetadata any more [ci drivers] * Fix args [ci drivers] * Fix redshift result transform function [ci drivers] * Add debug data [ci all] * Don't run tests for default (always true) implementation [ci drivers] * Refactro [ci drivers] * Pass driver explicitly [ci drivers] * Pass db explicitly [ci drivers] * Add fallback if no privileges are defined [ci drivers] * Ignore errors when checking privileges [ci drivers] * Fix format [ci drivers] * Add logging [ci drivers] * Remove cruft [ci drivers] * Fix format [ci drivers] * Use sql-jdbc.conn/db->pooled-connection-spec [ci drivers] * We don't need full Database object [ci drivers] * Refactor [ci drivers] * cleanup [ci drivers] * Batched metadata queries [ci drivers] * Update tests [ci drivers] * Make linter happy [ci drivers] * Update test [ci drivers] * Quote table name to make Oracle happy [ci drivers] * Use sql.qp to generate probe query [ci drivers] * make linter happy [ci drivers] * Alias dummy in select [ci drivers] * Add MySQL, Presto, MSSQL, Snowflake [ci drivers] * Make linter happy [ci drivers] * Don't use JDBC in Presto [ci drivers] * Make probe select work in snowflake [ci drivers] * Don't needlessly use `:default` [ci drivers] * Nicer code grouping [ci drivers] * Dispatch to correct (parent) method [ci drivers] * Don't be too clever [ci drivers] * Pass driver along [ci drivers] * Better error msg [ci snowflake] * snowflake weirdness [ci snowflake] * Snowflake: pass along db name [ci snowflake] * Snowflake: more debug data [ci snowflake] * Cleanup [ci drivers] * Implement code review suggestions [ci drivers] * Test fallback path [ci drivers] * Add missing refer [ci drivers] * Move tests to individual drivers [ci drivers] * Make linter happy [ci drivers] * Fix test [ci drivers] * Fix tests [ci drivers] * Fix tests [ci drivers] * Fix tests [ci drivers] * Add vertica tests [ci drivers] * Fix tests [ci drivers] * Fix tests [ci drivers] * Fix oracle tests [ci drivers] * Fix tests [ci drivers] * Fix Presto [ci drivers] * snowflake: reuse db user [ci drivers] * Fix tests [ci drivers] * Add some doc strings [ci drivers] * Redshift: don't mess around with passwords [ci drivers] * Snowflake: reuse PUBLIC role [ci drivers] * Fix tests [ci drivers] * Further simplify [ci drivers] * [ci drivers] * Typo [ci drivers] * Reuse user [ci drivers] * Cleanup SQL [ci drivers] * Use more sql utils [ci drivers] * Presto is a lost cause [ci drivers] * Oracle: drop semicolons [ci drivers] * Oracle: use 2 users [ci oracle] * Add debug data [ci oracle] * add require [ci oracle] * Oralce: get all perms [ci oracle] * Oracle: don't setup nested users [ci oracle] * Oracle: use system user [ci drivers] * Oracle: proper cleanup [ci drivers] * Oracle is case sensitive :( [ci drivers] * snowflake: create a dummy user [ci snowflake] * Test for privilege inheritance [ci drivers] * Fix tests [ci drivers] * Fix tests [ci drivers] * Use the correct driver flag [ci drivers] * Postgres: correctly handle foreign tables [ci drivers] * Use probing [ci drivers] * Fix presto * Bring presto api in line with the rest [ci drivers] * Make linter happy [ci drivers] * Create user and give ownership [ci drivers] * Don't pollute state [ci postgres] * Remove db-specific tests [ci drivers] * Fix requires [ci drivers] * Fix indentation [ci drivers] * Refactor [ci drivers] * Fix test [ci drivers] * Make linter happy [ci drivers] * Fix presto tests [ci drivers] * Snowflake: reorder fns [ci drivers] * Typo [ci drivers] * Cleanup [ci drivers] * Account for excluded-schemas being nil [ci drivers] * Refactor [ci drivers] * Snowflake: grant select on view [ci drivers] * Fix snowflake regression [ci drivers] * Add test for `fast-active-tables` [ci drivers] Co-authored-by:
Walter Leibbrandt <23798+walterl@users.noreply.github.com> Co-authored-by:
Robert Roland <rob@metabase.com>
-
Paul Rosenzweig authored
-
Robert Roland authored
Previously, when adding a database, we would try to connect to the database once with SSL, and once without. If connecting without SSL works, but connecting with did not, we save the database as not needing SSL. This ignored the SSL setting the user specified. This makes the user's setting take precedence in only allowing SSL connections. Resolves #13295
-
Cam Saul authored
* Fix noisy logs in tests * Fix lint error
-
Nemanja Glumac authored
-
dpsutton authored
* Half of fix for OOM in sync (#13288) (2.1) * truncate type/Text fields to 1234 (a distinct number we can use as a heuristic for longer fields if desired) * test truncation in metadata-queries-test * test that fingerprints reflect these truncations in fingerprint-test * Check database_type of text for substring of summaries #13288 in pg, many types go to :type/Text which cannot have substring on them, such as xml, json, jsonb, etc. * Skip fingerprinting "structured" fields, take substring of text fields * "Sniff" JSON results when truncated in fingerprinting - had to move the truncation-size var due to circularity, but it most logically belongs in the fingerprinting namespace as that's the only mechanism that really should be aware of it anyways - get rid of :refer :all in a test ns - fingerprinting doesn't happen on base_type :type/Structured so add that to the query for fields to fingerprint * Move `table-rows-sample` truncation option into options map * Switch json fingerprinting entirely to heuristic rather than parsing - faster in all cases and accuracy is not a particular goal - doesn't rely on the truncation size for switching to heuristic * Derive SerializedJson and XML from :type/Structured * Fixes metadata queries test when no truncation-size provided * JSON heuristic for array of booleans - want to validate as JSON [true, false] but not [random tag] * Removes two unused deps from fingerprinters we no longer actually parse json so don't need cheshire and don't use clojure.string/starts-with in favor of a little descent parser * CamelCases schema name and move truncation-size to appropriate ns truncation size used to be used in the fingerprinting analysis when checking text for JSON (using a heuristic if it was truncated) and passed into the query to get table summaries. Now its only passed into the summaries query and the JSON recognizer in the text fingerprinter always uses heuristics * Fix test now that its not relying on truncation limit for heuristics previously was making a string that was the `truncation-limit` length to trigger the heuristics of json parsing. now we always use heuristic so no need to construct such a precise length string.
-
Simon Belak authored
* Add `db-start-of-week` multimethod * Update drivers & settings [ci drivers] * Use tru in setting def [ci drivers] * Remove reflections [ci drivers] * Fix migration [ci drivers] * Update adjust * Punt on adjust for now * Fix tests [ci drivers] * Fix tests [ci drivers] * Add missing args [ci drivers] * Fix tests [ci all] * Short-circuit if offset = 0 [ci drivers] * Fix week of year test [ci drivers] * h2: use iso-week [ci drivers] * Typo [ci drivers] * Add UI for setting * fix FE assumptions * Unified week-of-year [ci drivers] * Make h2 work regardless of locale [ci drivers] * h2: make `add-interval-honeysql-form` work with expression amounts [ci drivers] * Fix h2 tests [ci all] * Don't rely on int division [ci drivers] * Better week-of-year [ci drivers] * Make linter happy [ci drivers] * More celanup [ci drivers] * Typo [ci drivers] * Fix hive & snowflake [ci drivers] * Add missing require [ci drivers] * Bump hive [ci drivers] * Mongo: add week-of-year [ci all] * Druid: week-of-year [ci drivers] * Fix Mongo [ci drivers] * More fixes [ci drivers] * Fix oracle [ci drivers] * tweak copy and move the setting up * Oracle: use to_char [ci drivers] * More tests [ci drivers] * Remove unneeded migration [ci drivers] * Druid: don't be fancy with woy [ci drivers] * Remove references to `start_of_week` from tests [ci drivers] * Druid: use correct values in test [ci drivers] * More tests [ci drivers] * Typo [ci drivers] * Fix Google driver [ci drivers] Co-authored-by:
Paul Rosenzweig <paul.a.rosenzweig@gmail.com> Co-authored-by:
Maz Ameli <maz@metabase.com> Co-authored-by:
Cam Saul <github@camsaul.com>
-
Sameer Al-Sakran authored
We haven't been using this operationally for years. It's just taking up space and adding a button to the readme.
- Oct 06, 2020
- Oct 05, 2020
-
-
Paul Rosenzweig authored
* dashboard interactivity: custom drill through and chained filters (cherry picked from commit f3ea3099da981c967fcffd5c7e318c88064c0a96) * add missing param * Better error message & test for cases where you don't have Field perms (cherry picked from commit 2ae8174c388a105170bb316b6266b900f8844c62) * Fix lint error (cherry picked from commit aa967359ecf9705f28dded2b5b30eb42ebec156e) * type another letter to avoid ordering issue (cherry picked from commit 5f285219c07eeff41b3d1fbfc091092a6ce60ed4) * fix failing cy tests (cherry picked from commit 8dbb9561a21f853a550d4ab1385fbdf142ea36e6) * update test * Fix merge * sort correctly * Fix namespace decl sorting * use another within block for the "add to dash" modal Co-authored-by:
Cam Saul <github@camsaul.com>
-
Cam Saul authored
* Fix footer on release-0.36.x (#13287) * Repro for issue #13241 (#13252) * Add custom "hack" for cypress' broken `.type()` functionality (This is most likely the cause of many flakes we're experiencing in CI. More info can be found here: https://github.com/cypress-io/cypress/issues/5480 ) * Add repro for #13241 (already fixed) * Split and distinguish repro test from functionality validation * Add repro for #12762 Enable when underlying issue is fixed and the test should pass. * Add repro for #13289 (#13300) Co-authored-by:
flamber <1447303+flamber@users.noreply.github.com> Co-authored-by:
Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
-
Nemanja Glumac authored
* Upgrade Cypress to v5.3.0 * Add Cypress test retries to the config (2 for the "run" mode and 0 for the "open" mode) Notes: - upgrading `@testing-library/cypress` was not possible at this point. It would almost certainly require upgrading webpack, and maybe adjusting babel settings. - `yarn resolutions` will not be needed once we properly upgrade weback and all libraries that have "Cypress" as a dependency
-
Nemanja Glumac authored
Tests are in stored in two separate files: - frontend/test/metabase/scenarios/admin/datamodel/segments.cy.spec.js and - frontend/test/metabase/scenarios/admin/datamodel/metrics.cy.spec.js
-