Skip to content

Commit

Permalink
Merge branch 'master' into sdk-launch-in-core-app
Browse files Browse the repository at this point in the history
  • Loading branch information
oisincoveney committed Oct 1, 2024
2 parents dadc072 + b28aa41 commit d64fb3a
Show file tree
Hide file tree
Showing 459 changed files with 14,457 additions and 11,682 deletions.
1 change: 1 addition & 0 deletions bin/build/resources/overrides.edn
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"amalloy" {"ring-gzip-middleware" {:resource "MIT.txt"}}
"buddy" {"buddy-core" {:resource "apache2_0.txt"}
"buddy-sign" {:resource "apache2_0.txt"}}
"dev.failsafe" {"failsafe" {:resource "LICENSE"}}
"colorize" {"colorize" {:resource "EPL.txt"}}
"com.github.jnr" {"jffi$native" {:resource "apache2_0.txt"}}
"com.google.api-client" {"google-api-client" {:resource "apache2_0.txt"}}
Expand Down
1 change: 1 addition & 0 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
compojure/compojure {:mvn/version "1.7.1" ; HTTP Routing library built on Ring
:exclusions [ring/ring-codec]}
crypto-random/crypto-random {:mvn/version "1.2.1"} ; library for generating cryptographically secure random bytes and strings
diehard/diehard {:mvn/version "0.11.12"}
dk.ative/docjure {:mvn/version "1.19.0" ; excel export
:exclusions [org.apache.poi/poi
org.apache.poi/poi-ooxml]}
Expand Down
5 changes: 5 additions & 0 deletions docs/developers-guide/driver-changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ title: Driver interface changelog
- `:test/dynamic-dataset-loading` feature has been added. It enables drivers to bail out of tests that require
creation of new, not pre-loaded, dataset during test run time.

- The `:temporal/requires-default-unit` feature has been added. It should be false for most drivers, but it's necessary
for a few (like the old, pre-JDBC Druid driver) to find all temporal field refs and put a `:temporal-unit :default` on them.
That default setting was previously done for all drivers, but it introduced some downstream issues, so now only those
drivers which need it can set the feature.

## Metabase 0.50.17

- Added method `metabase.driver/incorporate-auth-provider-details` for driver specific behavior required to
Expand Down
1 change: 1 addition & 0 deletions docs/developers-guide/partner-and-community-drivers.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Anyone can build a community driver. These are the currently known third-party d
| [Netsuite SuiteAnalytics Connect](https://github.com/ericcj/metabase-netsuite-driver) | ![GitHub stars](https://img.shields.io/github/stars/ericcj/metabase-netsuite-driver) | ![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/ericcj/metabase-netsuite-driver) |
| [Databend](https://github.com/databendcloud/metabase-databend-driver) | ![GitHub stars](https://img.shields.io/github/stars/databendcloud/metabase-databend-driver) | ![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/databendcloud/metabase-databend-driver) |
| [Peaka](https://github.com/peakacom/metabase-driver) | ![GitHub stars](https://img.shields.io/github/stars/peakacom/metabase-driver) | ![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/peakacom/metabase-driver) |
| [GreptimeDB](https://github.com/greptimeteam/greptimedb-metabase-driver) | ![GitHub stars](https://img.shields.io/github/stars/greptimeteam/greptimedb-metabase-driver) | ![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/greptimeteam/greptimedb-metabase-driver) |

If you don't see a driver for your database, then try looking in the comments of the [issue related to the database](https://github.com/metabase/metabase/labels/Database%2F). You might also find more by [searching on GitHub](https://github.com/search?q=metabase+driver).

Expand Down
19 changes: 10 additions & 9 deletions e2e/snapshot-creators/default.cy.snap.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ import {
USERS,
USER_GROUPS,
} from "e2e/support/cypress_data";
import { restore, snapshot, withSampleDatabase } from "e2e/support/helpers";
import {
restore,
snapshot,
updateSetting,
withSampleDatabase,
} from "e2e/support/helpers";

const {
STATIC_ORDERS_ID,
Expand Down Expand Up @@ -85,14 +90,10 @@ describe("snapshots", () => {
}

function updateSettings() {
cy.request("PUT", "/api/setting/enable-public-sharing", { value: true });
cy.request("PUT", "/api/setting/enable-embedding", { value: true }).then(
() => {
cy.request("PUT", "/api/setting/embedding-secret-key", {
value: METABASE_SECRET_KEY,
});
},
);
updateSetting("enable-public-sharing", true);
updateSetting("enable-embedding", true).then(() => {
updateSetting("embedding-secret-key", METABASE_SECRET_KEY);
});

// update the Sample db connection string so it is valid in both CI and locally
cy.request("GET", `/api/database/${SAMPLE_DB_ID}`).then(response => {
Expand Down
1 change: 1 addition & 0 deletions e2e/support/helpers/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ export { createTimelineWithEvents } from "./createTimelineWithEvents";
export { getCurrentUser } from "./getCurrentUser";
export { remapDisplayValueToFK } from "./remapDisplayValueToFK";
export { updateDashboardCards } from "./updateDashboardCards";
export { updateSetting } from "./updateSetting";
11 changes: 11 additions & 0 deletions e2e/support/helpers/api/updateSetting.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type { Settings } from "metabase-types/api";

export const updateSetting = <
TKey extends keyof Settings,
TValue extends Settings[TKey],
>(
setting: TKey,
value: TValue,
): Cypress.Chainable<Cypress.Response<never>> => {
return cy.request<never>("PUT", `/api/setting/${setting}`, { value });
};
6 changes: 3 additions & 3 deletions e2e/support/helpers/e2e-cloud-helpers.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { updateSetting } from "./api";

export const setupMetabaseCloud = () => {
cy.request("PUT", "/api/setting/site-url", {
value: "https://CYPRESSTESTENVIRONMENT.metabaseapp.com",
});
updateSetting("site-url", "https://CYPRESSTESTENVIRONMENT.metabaseapp.com");
};
6 changes: 3 additions & 3 deletions e2e/support/helpers/e2e-filter-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import {
popover,
} from "e2e/support/helpers/e2e-ui-elements-helpers";

import { updateSetting } from "./api";

export function setDropdownFilterType() {
cy.findByText("Dropdown list").click();
}
Expand Down Expand Up @@ -83,7 +85,5 @@ export function setConnectedFieldSource(table, field) {
}

export function changeSynchronousBatchUpdateSetting(value) {
cy.request("PUT", "/api/setting/synchronous-batch-updates", {
value: value,
});
updateSetting("synchronous-batch-updates", value);
}
4 changes: 2 additions & 2 deletions e2e/support/helpers/e2e-snowplow-helpers.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isEE } from "e2e/support/helpers";
import { isEE, updateSetting } from "e2e/support/helpers";

const HAS_SNOWPLOW = Cypress.env("HAS_SNOWPLOW_MICRO");
const SNOWPLOW_URL = Cypress.env("SNOWPLOW_MICRO_URL");
Expand All @@ -10,7 +10,7 @@ export const describeWithSnowplowEE =
HAS_SNOWPLOW && isEE ? describe : describe.skip;

export const enableTracking = () => {
cy.request("PUT", "/api/setting/anon-tracking-enabled", { value: true });
updateSetting("anon-tracking-enabled", true);
};

export const resetSnowplow = () => {
Expand Down
File renamed without changes.
5 changes: 2 additions & 3 deletions e2e/test/scenarios/admin-2/settings.cy.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
setupSMTP,
tableHeaderClick,
undoToast,
updateSetting,
visitQuestion,
visitQuestionAdhoc,
} from "e2e/support/helpers";
Expand Down Expand Up @@ -794,9 +795,7 @@ describe("scenarios > admin > license and billing", () => {

describe("scenarios > admin > localization", () => {
function setFirstWeekDayTo(day) {
cy.request("PUT", "/api/setting/start-of-week", {
value: day.toLowerCase(),
});
updateSetting("start-of-week", day.toLowerCase());
}

beforeEach(() => {
Expand Down
3 changes: 2 additions & 1 deletion e2e/test/scenarios/admin-2/sso/ldap.cy.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
setTokenFeatures,
setupLdap,
typeAndBlurUsingLabel,
updateSetting,
} from "e2e/support/helpers";

import {
Expand Down Expand Up @@ -188,7 +189,7 @@ describeEE(

it("should show the login form when ldap is enabled but password login isn't (metabase#25661)", () => {
setupLdap();
cy.request("PUT", "/api/setting/enable-password-login", { value: false });
updateSetting("enable-password-login", false);
cy.signOut();
cy.visit("/auth/login");

Expand Down
16 changes: 7 additions & 9 deletions e2e/test/scenarios/admin-2/whitelabel.cy.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
restore,
setTokenFeatures,
undoToast,
updateSetting,
visitDashboard,
visitQuestion,
} from "e2e/support/helpers";
Expand Down Expand Up @@ -72,9 +73,10 @@ describeEE("formatting > whitelabel", () => {
cy.log("Add a logo");
cy.readFile("e2e/support/assets/logo.jpeg", "base64").then(
logo_data => {
cy.request("PUT", "/api/setting/application-logo-url", {
value: `data:image/jpeg;base64,${logo_data}`,
});
updateSetting(
"application-logo-url",
`data:image/jpeg;base64,${logo_data}`,
);
},
);
});
Expand All @@ -101,9 +103,7 @@ describeEE("formatting > whitelabel", () => {
it("should work for people that set favicon URL before we change the input to file input", () => {
const faviconUrl =
"https://cdn.ecosia.org/assets/images/ico/favicon.ico";
cy.request("PUT", "/api/setting/application-favicon-url", {
value: faviconUrl,
});
updateSetting("application-favicon-url", faviconUrl);
checkFavicon(faviconUrl);
cy.signInAsNormalUser();
cy.visit("/");
Expand Down Expand Up @@ -730,9 +730,7 @@ function changeLoadingMessage(message) {
}

function setApplicationFontTo(font) {
cy.request("PUT", "/api/setting/application-font", {
value: font,
});
updateSetting("application-font", font);
}

const openSettingsMenu = () => appBar().icon("gear").click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe("binning related reproductions", () => {
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
cy.findByText(/CREATED_AT/i).realHover();
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
cy.findByText("by day").click({ force: true });
cy.findByText("by month").click({ force: true });

// Implicit assertion - it fails if there is more than one instance of the string, which is exactly what we need for this repro
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
Expand Down
2 changes: 1 addition & 1 deletion e2e/test/scenarios/collections/cleanup.cy.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe("scenarios > collections > clean up", () => {
cy.log("should not show in custom analytics collections");
visitCollection("root");
navigationSidebar().within(() => {
cy.findByText("Metabase analytics").click();
cy.findByText("Usage analytics").click();
cy.findByText("Custom reports").click();
});
collectionMenu().click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
visitQuestion,
} from "e2e/support/helpers";

const ANALYTICS_COLLECTION_NAME = "Metabase analytics";
const ANALYTICS_COLLECTION_NAME = "Usage analytics";
const CUSTOM_REPORTS_COLLECTION_NAME = "Custom reports";
const PEOPLE_MODEL_NAME = "People";
const METRICS_DASHBOARD_NAME = "Metabase metrics";
Expand Down
4 changes: 2 additions & 2 deletions e2e/test/scenarios/collections/permissions.cy.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,9 @@ describe("collection permissions", () => {
);
cy.findByTestId("permission-table");

sidebar().findByText("Metabase analytics").click();
sidebar().findByText("Usage analytics").click();
cy.findByTestId("permissions-editor").findByText(
"Permissions for Metabase analytics",
"Permissions for Usage analytics",
);
cy.findByTestId("permission-table");
});
Expand Down
2 changes: 1 addition & 1 deletion e2e/test/scenarios/custom-column/custom-column.cy.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ describe("scenarios > question > custom column", () => {
.click();

getNotebookStep("summarize")
.findByText("Product Date: Day")
.findByText("Product Date: Month")
.should("be.visible");
});

Expand Down
5 changes: 2 additions & 3 deletions e2e/test/scenarios/dashboard-cards/click-behavior.cy.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
saveDashboard,
setTokenFeatures,
updateDashboardCards,
updateSetting,
visitDashboard,
visitEmbeddedPage,
visitIframe,
Expand Down Expand Up @@ -1807,9 +1808,7 @@ describe("scenarios > dashboard > dashboard cards > click behavior", () => {
});

it("allows opening custom URL destination that is not a Metabase instance URL using link (metabase#33379)", () => {
cy.request("PUT", "/api/setting/site-url", {
value: "https://localhost:4000/subpath",
});
updateSetting("site-url", "https://localhost:4000/subpath");
const dashboardDetails = {
enable_embedding: true,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
saveDashboard,
showDashboardCardActions,
sidebar,
updateSetting,
visitDashboard,
} from "e2e/support/helpers";
import { createMockParameter } from "metabase-types/api/mocks";
Expand Down Expand Up @@ -869,11 +870,9 @@ describe("issues 27020 and 27105: static-viz fails to render for certain date fo
// This is currently the default setting, anyway.
// But we want to explicitly set it in case something changes in the future,
// because it is a crucial step for this reproduction.
cy.request("PUT", "/api/setting/custom-formatting", {
value: {
"type/Temporal": {
date_style: "MMMM D, YYYY",
},
updateSetting("custom-formatting", {
"type/Temporal": {
date_style: "MMMM D, YYYY",
},
});

Expand Down
Loading

0 comments on commit d64fb3a

Please sign in to comment.