Compare commits
351 Commits
claude-cod
...
claude-cod
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aae19be618 | ||
|
|
d7130ed448 | ||
|
|
407dd14106 | ||
|
|
83941fea48 | ||
|
|
59644bf378 | ||
|
|
3a8184b185 | ||
|
|
8d8a3e2a96 | ||
|
|
7821b79043 | ||
|
|
d28ff2f121 | ||
|
|
d02f02ee0b | ||
|
|
e93e4e05c0 | ||
|
|
2eb994bd95 | ||
|
|
e613f283db | ||
|
|
4d888a1de4 | ||
|
|
f1f5dde5d8 | ||
|
|
160bbec78d | ||
|
|
d934b0babf | ||
|
|
8686c53446 | ||
|
|
72001629e6 | ||
|
|
5c845ba3c3 | ||
|
|
3d42a5c78c | ||
|
|
a638e855da | ||
|
|
a1b8c3b5b8 | ||
|
|
e67b2d64fc | ||
|
|
e105a57db1 | ||
|
|
ba1500863a | ||
|
|
a51ab2900c | ||
|
|
e934b54f41 | ||
|
|
328ebbcead | ||
|
|
a5f4c4a190 | ||
|
|
3848e58b39 | ||
|
|
b8345f0176 | ||
|
|
03f140aedc | ||
|
|
aabf32d9f2 | ||
|
|
4c129b2d75 | ||
|
|
6bd5115ca3 | ||
|
|
d8dcb4c67e | ||
|
|
e1f803afd1 | ||
|
|
1897a37ade | ||
|
|
472c718b70 | ||
|
|
cfbb5b1197 | ||
|
|
9b88ab8ed3 | ||
|
|
d73c1f0581 | ||
|
|
d423ca80a0 | ||
|
|
ac78a9f92d | ||
|
|
556daad590 | ||
|
|
26053e133b | ||
|
|
4464be1a8b | ||
|
|
624c118990 | ||
|
|
b0d4aea79d | ||
|
|
7ff41f59eb | ||
|
|
b645d99b84 | ||
|
|
2b6bc390b3 | ||
|
|
508dcaeacc | ||
|
|
3df44a9c5e | ||
|
|
344b722f49 | ||
|
|
db1aaa49c8 | ||
|
|
fbe7122dc5 | ||
|
|
1e303ea32f | ||
|
|
7a0bd60c94 | ||
|
|
0a4d7039ad | ||
|
|
66ba50cfea | ||
|
|
3764616d8c | ||
|
|
9bb5e3ec50 | ||
|
|
ebcdfddf7e | ||
|
|
3b3d9229a2 | ||
|
|
daf6c948e6 | ||
|
|
eb06aa0d79 | ||
|
|
88a88270be | ||
|
|
fe1df8df88 | ||
|
|
3c539e3626 | ||
|
|
5ed1cf1a2d | ||
|
|
98f9c39437 | ||
|
|
04973ca224 | ||
|
|
b8f0117f5f | ||
|
|
2a827d4448 | ||
|
|
764b236601 | ||
|
|
6999843d4c | ||
|
|
7cb3445541 | ||
|
|
9aec86abce | ||
|
|
bf27059a98 | ||
|
|
3dd6b40c80 | ||
|
|
633a4565ff | ||
|
|
6a782d5eb4 | ||
|
|
fa896cbe1c | ||
|
|
50e2c32603 | ||
|
|
8bb6ef90d7 | ||
|
|
781af5af39 | ||
|
|
ec25a3ac4a | ||
|
|
5d9bb5985a | ||
|
|
49f744375c | ||
|
|
22f176f81b | ||
|
|
21b29f3965 | ||
|
|
88e251c441 | ||
|
|
4bdc21b1aa | ||
|
|
008973b814 | ||
|
|
01eb3ac384 | ||
|
|
43d5939a64 | ||
|
|
cbacd7048e | ||
|
|
21e1ca15c6 | ||
|
|
5f47d1cbd3 | ||
|
|
fd25c7efcc | ||
|
|
4c59fc665f | ||
|
|
38bb58583d | ||
|
|
1eeaec0e94 | ||
|
|
6985eca2b3 | ||
|
|
b211f68ec7 | ||
|
|
c6488e7fc6 | ||
|
|
f786d876bb | ||
|
|
f74bf7fac2 | ||
|
|
a3da9834be | ||
|
|
3dff6bef19 | ||
|
|
30ca07666d | ||
|
|
67de26fc3f | ||
|
|
b7a74d02c7 | ||
|
|
d001543d0e | ||
|
|
51d772c85b | ||
|
|
f9c6432297 | ||
|
|
8afc62789e | ||
|
|
8ee568053a | ||
|
|
cabe5b28f8 | ||
|
|
f78b415927 | ||
|
|
363c87a8af | ||
|
|
5472a21887 | ||
|
|
90b57b895a | ||
|
|
74f24399e1 | ||
|
|
dfc753e0f6 | ||
|
|
330f2c0a3c | ||
|
|
6c0ae49c2d | ||
|
|
bd3ef171a8 | ||
|
|
93831828e4 | ||
|
|
922cda5ec0 | ||
|
|
53093f8c1a | ||
|
|
a4ba2acd4b | ||
|
|
a54de86b39 | ||
|
|
5d97d19781 | ||
|
|
97387d0942 | ||
|
|
63198734e2 | ||
|
|
2a4e8d1c69 | ||
|
|
de8c20bf55 | ||
|
|
ba131b1abd | ||
|
|
452dbefda4 | ||
|
|
fd7c0db61f | ||
|
|
5e19281112 | ||
|
|
50df68482e | ||
|
|
c17c259d79 | ||
|
|
3be8f6ab2b | ||
|
|
50664531b3 | ||
|
|
1f19dee6c5 | ||
|
|
c3c5edc272 | ||
|
|
728fa82bc2 | ||
|
|
9eb88c3478 | ||
|
|
24b79c324c | ||
|
|
c3e6655d45 | ||
|
|
8f57a69882 | ||
|
|
067057efda | ||
|
|
98c2872f2b | ||
|
|
10b7df74e9 | ||
|
|
b46ae17a3b | ||
|
|
b373500c04 | ||
|
|
31f31e59f0 | ||
|
|
cf806ce408 | ||
|
|
baab33ecca | ||
|
|
acea8921ab | ||
|
|
4d38da9476 | ||
|
|
231d159585 | ||
|
|
59bd5a5905 | ||
|
|
6d647bccde | ||
|
|
c198bc44e7 | ||
|
|
20e9cd8fc1 | ||
|
|
76241f7db7 | ||
|
|
722fc1a45f | ||
|
|
d20183be8e | ||
|
|
b626947efb | ||
|
|
c583ae13e6 | ||
|
|
a8ecef4802 | ||
|
|
c1062d680a | ||
|
|
1762ab78d5 | ||
|
|
10890aee1f | ||
|
|
87bbb5b9a1 | ||
|
|
cfb87dc8a1 | ||
|
|
9fc01e8dc6 | ||
|
|
cc4202abde | ||
|
|
c3ec3d1a90 | ||
|
|
6658efa2f9 | ||
|
|
d703d1a3e7 | ||
|
|
971252a066 | ||
|
|
2390fca3af | ||
|
|
db87251a3a | ||
|
|
64dcfe501e | ||
|
|
23db3d6618 | ||
|
|
785db78108 | ||
|
|
11239d8d7b | ||
|
|
44274c63ad | ||
|
|
9c8720bc0a | ||
|
|
6fb0244736 | ||
|
|
95afcd14b1 | ||
|
|
1abbfdd637 | ||
|
|
f6fbcab4d0 | ||
|
|
b4bcdb65d3 | ||
|
|
0ac5d0bf7f | ||
|
|
ba72e829bf | ||
|
|
f4511c2b97 | ||
|
|
ed9e654155 | ||
|
|
c92fe37769 | ||
|
|
e1fd2d1cdd | ||
|
|
89f7b64763 | ||
|
|
2621458071 | ||
|
|
cbcf698e30 | ||
|
|
d6b7f86354 | ||
|
|
be9cffd831 | ||
|
|
ba40a8354e | ||
|
|
ee794794ca | ||
|
|
c409a653c5 | ||
|
|
830be48c20 | ||
|
|
2dba03a0d0 | ||
|
|
10fff67c18 | ||
|
|
c375e64c2d | ||
|
|
0601021d0c | ||
|
|
796a3c8290 | ||
|
|
2b577eb3f5 | ||
|
|
1f197ad4cd | ||
|
|
5d102ec856 | ||
|
|
a14ebf5f29 | ||
|
|
54b509bf2f | ||
|
|
e2fbe3142f | ||
|
|
e3ba446fbd | ||
|
|
83d3bc708d | ||
|
|
56aaaa96d7 | ||
|
|
3196d30a33 | ||
|
|
146c4dd8df | ||
|
|
117785089c | ||
|
|
216212b27a | ||
|
|
f231f3b519 | ||
|
|
4126202645 | ||
|
|
d8705ab9b9 | ||
|
|
88ce89e065 | ||
|
|
6e957d4ab7 | ||
|
|
c9d926e018 | ||
|
|
d186e5d0e8 | ||
|
|
304da4aba7 | ||
|
|
9e10b9c131 | ||
|
|
a65865fce2 | ||
|
|
3a93e08dbe | ||
|
|
921e0a4ffc | ||
|
|
3c40ebd387 | ||
|
|
260a02887e | ||
|
|
c03a20dae7 | ||
|
|
9a521649a3 | ||
|
|
89153b5504 | ||
|
|
c4749ad880 | ||
|
|
dcaeb12485 | ||
|
|
c1ae2a738a | ||
|
|
eec2e8034a | ||
|
|
18f5b5282b | ||
|
|
e8ba2da551 | ||
|
|
631bb25266 | ||
|
|
8aa1b56dc6 | ||
|
|
d1ce4b64a2 | ||
|
|
29c361e150 | ||
|
|
a8463d2a47 | ||
|
|
a54b7ed035 | ||
|
|
2725e33502 | ||
|
|
8a8e0c6e5b | ||
|
|
1d819fac28 | ||
|
|
4b6ed446b2 | ||
|
|
ce99b5c4f5 | ||
|
|
0eff2ec6de | ||
|
|
832be65250 | ||
|
|
c5d31e8ba2 | ||
|
|
5546d00759 | ||
|
|
d02f98c519 | ||
|
|
23ffd1ce0a | ||
|
|
1bb78814cf | ||
|
|
103a64f3ad | ||
|
|
45c30a4676 | ||
|
|
6d7ae96779 | ||
|
|
4187e57c4a | ||
|
|
8bd3844525 | ||
|
|
bff123bb45 | ||
|
|
b63e596d37 | ||
|
|
2600de0663 | ||
|
|
5f7b7cb812 | ||
|
|
e04d00c264 | ||
|
|
d2bcabb33c | ||
|
|
e1c7441569 | ||
|
|
8ff8ed3494 | ||
|
|
f0ba0e628a | ||
|
|
8d5baa6a73 | ||
|
|
dbefc5643a | ||
|
|
d1a4eb463e | ||
|
|
273ecb3b63 | ||
|
|
bc2c0b2fa7 | ||
|
|
3f6b4e3938 | ||
|
|
e2ae5b91a8 | ||
|
|
073300b47e | ||
|
|
74b62202b9 | ||
|
|
f07d1810ea | ||
|
|
9cd41f0b6f | ||
|
|
acacf330ec | ||
|
|
a9a62e5b82 | ||
|
|
1020b3dcee | ||
|
|
339b7d1dd4 | ||
|
|
e0e833aa52 | ||
|
|
0dc44b4551 | ||
|
|
8ef81c9a91 | ||
|
|
641e170996 | ||
|
|
3f78551385 | ||
|
|
e5ed289651 | ||
|
|
ff42a7c926 | ||
|
|
94abd0f302 | ||
|
|
a4ee7f4eb7 | ||
|
|
2aa82343e2 | ||
|
|
ebc59ff5fd | ||
|
|
90f1364fe2 | ||
|
|
bb58f77a79 | ||
|
|
0f094446f1 | ||
|
|
a582ad33c4 | ||
|
|
83ebdb8afd | ||
|
|
0eec5c335f | ||
|
|
f541df16f8 | ||
|
|
08a13afd28 | ||
|
|
49cec30f3f | ||
|
|
f6cecc0960 | ||
|
|
d9779da94a | ||
|
|
f2b5cf8fcb | ||
|
|
1e48077705 | ||
|
|
00527b55c0 | ||
|
|
f62755dc9b | ||
|
|
1a990b898b | ||
|
|
0bebb404eb | ||
|
|
eef8dd149b | ||
|
|
b86d92d156 | ||
|
|
a1b5478734 | ||
|
|
edd33406f7 | ||
|
|
eb303b3596 | ||
|
|
13f81f354f | ||
|
|
8135a2f41f | ||
|
|
8737a30d70 | ||
|
|
004ba66176 | ||
|
|
9fed60a967 | ||
|
|
37b8a235ca | ||
|
|
f4eeb43daf | ||
|
|
c38c533c72 | ||
|
|
1d70e07d79 | ||
|
|
a2f38e43de | ||
|
|
ba9c2face3 | ||
|
|
4da41fc578 | ||
|
|
e7dda8b9ff | ||
|
|
babdb67fb5 | ||
|
|
63dadf79d5 |
1
.claude/commands/fix-flakey-test.md
Normal file
@@ -0,0 +1 @@
|
||||
Fix flakey test $ARGUMENTS
|
||||
1
.claude/commands/fix-issue.md
Normal file
@@ -0,0 +1 @@
|
||||
Fix issue $ARGUMENTS
|
||||
1
.claude/commands/fix-pr.md
Normal file
@@ -0,0 +1 @@
|
||||
Fetch unresolved comments for this branch's PR, then fix them
|
||||
1
.claude/commands/repro-issue.md
Normal file
@@ -0,0 +1 @@
|
||||
Repro issue $ARGUMENTS in a failing test
|
||||
@@ -11,6 +11,7 @@
|
||||
:def-fn {:level :warning}
|
||||
:dynamic-var-not-earmuffed {:level :warning}
|
||||
:equals-expected-position {:level :warning, :only-in-test-assertion true}
|
||||
:equals-true {:level :warning}
|
||||
:keyword-binding {:level :warning}
|
||||
:main-without-gen-class {:level :warning}
|
||||
:minus-one {:level :warning}
|
||||
@@ -42,7 +43,6 @@
|
||||
|
||||
#_:docstring-leading-trailing-whitespace
|
||||
#_:equals-false
|
||||
#_:equals-true
|
||||
#_:used-underscored-binding
|
||||
|
||||
;;
|
||||
@@ -275,6 +275,7 @@
|
||||
compojure.core/context {:message "Use metabase.api.util.handlers/route-map-handler instead of compojure.core/context, it is much faster and supports OpenAPI spec generation"}
|
||||
compojure.core/defroutes {:message "Use metabase.api.util.handlers/defroutes instead of compojure.core/routes, it supports OpenAPI spec generation."}
|
||||
compojure.core/routes {:message "Use metabase.api.util.handlers/routes instead of compojure.core/routes, it supports OpenAPI spec generation."}
|
||||
clojurewerkz.quartzite.jobs/defjob {:message "Use metabase.task/defjob instead of clojurewerkz.quartzite.jobs/defjob"}
|
||||
fipp.edn/pprint {:message "Use metabase.util.log instead of fipp.edn/pprint"}
|
||||
honeysql.core/call {:message "Use hx/call instead because it is Honey SQL 2 friendly"}
|
||||
honeysql.core/raw {:message "Use hx/raw instead because it is Honey SQL 2 friendly"}
|
||||
@@ -300,7 +301,7 @@
|
||||
honeysql.types {:message "Use Honey SQL 2. Honey SQL 1 is removed as a dependency in Metabase 49+."}
|
||||
honeysql.util {:message "Use Honey SQL 2. Honey SQL 1 is removed as a dependency in Metabase 49+."}}
|
||||
|
||||
:discouraged-tag {p {:message "You can use it, but don't commit it." }}
|
||||
:discouraged-tag {p {:message "You can use it, but don't commit it."}}
|
||||
|
||||
:unresolved-var
|
||||
{:exclude
|
||||
@@ -346,6 +347,7 @@
|
||||
metabase-enterprise.audit-app.pages.common common
|
||||
metabase-enterprise.sandbox.api.table table
|
||||
metabase-enterprise.sandbox.api.util sandbox.api.util
|
||||
metabase-enterprise.database-routing.core database-routing
|
||||
metabase-enterprise.test met
|
||||
metabase.analytics.sdk sdk
|
||||
metabase.analytics.stats stats
|
||||
@@ -570,6 +572,7 @@
|
||||
metabase.sso.ldap/with-ldap-connection clojure.core/fn
|
||||
metabase.sync.util/sum-for clojure.core/for
|
||||
metabase.sync.util/with-emoji-progress-bar clojure.core/let
|
||||
metabase.task/defjob clojure.core/defn
|
||||
metabase.test.data.interface/defdataset clojure.core/def
|
||||
metabase.test.data.interface/defdataset-edn clojure.core/def
|
||||
metabase.test/defdataset clojure.core/def
|
||||
@@ -750,6 +753,7 @@
|
||||
clojurewerkz.quartzite.schedule.cron/schedule macros.quartz/schedule
|
||||
clojurewerkz.quartzite.schedule.simple/schedule macros.quartz/simple-schedule
|
||||
clojurewerkz.quartzite.triggers/build macros.quartz/build-trigger
|
||||
metabase-enterprise.database-routing.e2e-test/with-temp-dbs! macros.metabase-enterprise.database-routing.e2e-test/with-temp-dbs!
|
||||
metabase-enterprise.impersonation.util-test/with-impersonations! macros.metabase-enterprise.impersonation.util-test/with-impersonations!
|
||||
metabase-enterprise.query-reference-validation.api-test/with-test-setup! macros.metabase-enterprise.query-reference-validation.api-test/with-test-setup!
|
||||
metabase-enterprise.sandbox.test-util/with-gtaps! macros.metabase-enterprise.sandbox.test-util/with-gtaps!
|
||||
@@ -772,6 +776,7 @@
|
||||
metabase.public-sharing.api-test/with-sharing-enabled-and-temp-dashcard-referencing! macros.metabase.public-sharing.api-test/with-sharing-enabled-and-temp-dashcard-referencing!
|
||||
metabase.query-analysis.task.test-setup/with-test-setup! macros.metabase.query-analysis.task.test-setup/with-test-setup!
|
||||
metabase.query-processor.streaming/streaming-response macros.metabase.query-processor.streaming/streaming-response
|
||||
metabase.server.statistics-handler-test/with-server macros.metabase.server.statistics-handler-test/with-server
|
||||
metabase.test.data.users/with-group-for-user macros.metabase.test.data.users/with-group-for-user
|
||||
metabase.test.util/with-temp-env-var-value! macros.metabase.test.util/with-temp-env-var-value!
|
||||
metabase.test.util/with-temporary-raw-setting-values macros.metabase.test.util/with-temporary-raw-setting-values
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
metabase.api.common
|
||||
metabase.api.common.validation
|
||||
metabase.api.dashboard
|
||||
metabase.api.database
|
||||
metabase.api.dataset
|
||||
metabase.api.field
|
||||
metabase.api.macros
|
||||
@@ -146,6 +147,10 @@
|
||||
{:api #{metabase.core.initialization-status}
|
||||
:uses :any}
|
||||
|
||||
database-routing
|
||||
{:api #{metabase.database-routing.core}
|
||||
:uses #{premium-features}}
|
||||
|
||||
db
|
||||
{:api #{metabase.db metabase.db.metadata-queries metabase.db.query metabase.db.setup}
|
||||
:uses #{auth-provider config connection-pool driver legacy-mbql lib plugins query-processor task util}}
|
||||
@@ -178,6 +183,7 @@
|
||||
auth-provider
|
||||
config
|
||||
connection-pool
|
||||
database-routing
|
||||
db
|
||||
legacy-mbql
|
||||
lib
|
||||
@@ -192,7 +198,8 @@
|
||||
sync
|
||||
task
|
||||
upload
|
||||
util}}
|
||||
util
|
||||
enterprise/database-routing}}
|
||||
|
||||
eid-translation
|
||||
{:api #{metabase.eid-translation.core}
|
||||
@@ -612,7 +619,7 @@
|
||||
|
||||
util
|
||||
{:api :any
|
||||
:uses #{config driver legacy-mbql lib models plugins premium-features public-settings}}
|
||||
:uses #{config db driver legacy-mbql lib models plugins premium-features public-settings}}
|
||||
|
||||
xrays
|
||||
{:api #{metabase.xrays.api metabase.xrays.core}
|
||||
@@ -680,6 +687,10 @@
|
||||
{:api #{}
|
||||
:uses #{premium-features}}
|
||||
|
||||
enterprise/database-routing
|
||||
{:api #{metabase-enterprise.database-routing.core metabase-enterprise.database-routing.api}
|
||||
:uses #{api config database-routing events lib models premium-features query-processor util}}
|
||||
|
||||
enterprise/enhancements
|
||||
{:api #{metabase-enterprise.enhancements.init}
|
||||
:uses #{models premium-features sso util enterprise/sso}}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
(ns macros.metabase.server.statistics-handler-test)
|
||||
|
||||
(defmacro with-server
|
||||
[_ _ [connector chan-start-handle chan-finish-handle chan-done-request] & body]
|
||||
`(let [~connector nil
|
||||
~chan-start-handle nil
|
||||
~chan-finish-handle nil
|
||||
~chan-done-request nil]
|
||||
~@body))
|
||||
@@ -0,0 +1,5 @@
|
||||
(ns macros.metabase-enterprise.database-routing.e2e-test)
|
||||
|
||||
(defmacro with-temp-dbs! [bindings & body]
|
||||
`(let [~@(interleave bindings (repeat nil))]
|
||||
~@body))
|
||||
@@ -300,6 +300,7 @@
|
||||
metabase.util.malli/with [[:default]]
|
||||
metabase.util.malli/with-api-error-message [[:default]]
|
||||
metabase.util.namespaces/import-fns [[:default]]
|
||||
metabase.util.queue-test/await-test-while [[:block 1]]
|
||||
metabuild-common.core/exit-when-finished-nonzero-on-exception [[:block 0]]
|
||||
metabuild-common.core/step [[:block 1]]
|
||||
metabuild-common.entrypoint/exit-when-finished-nonzero-on-exception [[:block 0]]
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
FROM mcr.microsoft.com/vscode/devcontainers/java:11
|
||||
FROM mcr.microsoft.com/vscode/devcontainers/java:21
|
||||
|
||||
# Set up nodesource, install node, yarn, fontconfig for static viz, rlwrap for dev ergonomics
|
||||
|
||||
RUN ( curl -fsSL https://deb.nodesource.com/setup_18.x | bash ) \
|
||||
RUN ( curl -fsSL https://deb.nodesource.com/setup_22.x | bash ) \
|
||||
&& export DEBIAN_FRONTEND=noninteractive \
|
||||
&& apt-key adv --refresh-keys --keyserver keyserver.ubuntu.com \
|
||||
&& apt-get update && apt-get -y install --no-install-recommends nodejs yarn rlwrap fontconfig
|
||||
|
||||
# install Clojure
|
||||
RUN curl https://download.clojure.org/install/linux-install-1.11.1.1262.sh | bash
|
||||
RUN curl https://download.clojure.org/install/linux-install-1.12.0.1488.sh | bash
|
||||
|
||||
2
.github/CODEOWNERS
vendored
@@ -7,7 +7,7 @@ frontend/src/metabase/public/containers/PublicOrEmbeddedQuestion @metabase/embed
|
||||
frontend/src/metabase/public/containers/PublicOrEmbeddedDashboard @metabase/embedding
|
||||
frontend/src/metabase/ui @metabase/core-frontend-admin-webapp
|
||||
# snowplow/* @metabase/data
|
||||
|
||||
src/metabase/analytics/prometheus.clj @metabase/cloud-ops
|
||||
.github @metabase/devexp
|
||||
.clj-kondo @metabase/devexp
|
||||
deps.edn @metabase/backend-developers
|
||||
|
||||
116
.github/actions/build-ee-extra/action.yml
vendored
@@ -1,116 +0,0 @@
|
||||
name: Build ee-extra
|
||||
description: Build Metabase Enterprise Edition with extra features
|
||||
|
||||
inputs:
|
||||
java-version:
|
||||
required: true
|
||||
default: 21
|
||||
iam-role:
|
||||
description: "The IAM role to assume"
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Prepare Java
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: ${{ inputs.java-version }}
|
||||
distribution: 'temurin'
|
||||
- name: Reveal its original version.properties
|
||||
run: jar xf ./bin/docker/metabase.jar version.properties && cat version.properties
|
||||
shell: bash
|
||||
- name: get major version
|
||||
id: major_version
|
||||
run: echo "major_version=$(cat version.properties | grep 'tag=' | cut -d'.' -f2)" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
- name: get drivers registry
|
||||
run: |
|
||||
curl -OL https://raw.githubusercontent.com/metabase/metabase-registry/main/registry.yaml
|
||||
shell: bash
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: lts/Jod # 22.x.x
|
||||
- run: rm package.json && npm install yaml
|
||||
shell: bash
|
||||
- name: parse drivers registry
|
||||
uses: actions/github-script@v7
|
||||
id: drivers_registry
|
||||
with:
|
||||
script: | # js
|
||||
const { parse } = require('yaml');
|
||||
const fs = require('fs');
|
||||
const registry = parse(fs.readFileSync('registry.yaml', 'utf8'));
|
||||
|
||||
const drivers = registry.drivers;
|
||||
const majorVersion = '${{ steps.major_version.outputs.major_version }}';
|
||||
|
||||
const getDriverUrl = (driverName) => {
|
||||
const driver = drivers.find(driver => driver.name === driverName);
|
||||
|
||||
if (!driver) {
|
||||
throw new Error(`Driver ${driverName} not found in the registry`);
|
||||
}
|
||||
|
||||
const driverUrl = driver.versions[majorVersion] ?? driver.versions.default;
|
||||
|
||||
if (!driverUrl) {
|
||||
throw new Error(`Driver ${driverName} version ${majorVersion} not found in the registry`);
|
||||
}
|
||||
|
||||
return driverUrl;
|
||||
};
|
||||
|
||||
const extraDrivers = {
|
||||
firebolt: getDriverUrl('firebolt'),
|
||||
starburst: getDriverUrl('starburst'),
|
||||
clickhouse: getDriverUrl('clickhouse'),
|
||||
materialize: getDriverUrl('materialize'),
|
||||
};
|
||||
|
||||
console.log(extraDrivers);
|
||||
|
||||
return extraDrivers;
|
||||
- name: Download Firebolt driver
|
||||
run: |
|
||||
curl -OL ${{ fromJson(steps.drivers_registry.outputs.result).firebolt }}
|
||||
working-directory: modules
|
||||
shell: bash
|
||||
- name: Download Starburst driver
|
||||
run: |
|
||||
curl -OL ${{ fromJson(steps.drivers_registry.outputs.result).starburst }}
|
||||
shell: bash
|
||||
working-directory: modules
|
||||
- name: Download Clickhouse driver
|
||||
run: |
|
||||
curl -OL ${{ fromJson(steps.drivers_registry.outputs.result).clickhouse }}
|
||||
shell: bash
|
||||
working-directory: modules
|
||||
- name: Download Materialize driver
|
||||
run: |
|
||||
curl -OL ${{ fromJson(steps.drivers_registry.outputs.result).materialize }}
|
||||
shell: bash
|
||||
working-directory: modules
|
||||
- name: Bundle additional drivers into the Uberjar
|
||||
run: jar uf bin/docker/metabase.jar modules/*.jar
|
||||
shell: bash
|
||||
- name: Launch uberjar
|
||||
run: >-
|
||||
java --add-opens java.base/java.nio=ALL-UNNAMED -jar ./bin/docker/metabase.jar &
|
||||
shell: bash
|
||||
- name: Wait for Metabase to start
|
||||
run: while ! curl 'http://localhost:3000/api/health' | grep '{"status":"ok"}'; do sleep 1; done
|
||||
shell: bash
|
||||
- name: Kill the java process
|
||||
run: pkill -f metabase.jar
|
||||
shell: bash
|
||||
- name: configure aws credentials
|
||||
if: ${{ github.ref_name == 'master' }}
|
||||
uses: aws-actions/configure-aws-credentials@v4
|
||||
with:
|
||||
role-to-assume: ${{ inputs.iam-role }}
|
||||
role-session-name: GitHub_to_AWS_via_FederatedOIDC
|
||||
aws-region: us-east-1
|
||||
- name: Login to Amazon ECR
|
||||
if: ${{ github.ref_name == 'master' }}
|
||||
uses: aws-actions/amazon-ecr-login@v2
|
||||
37
.github/actions/notify-pull-request/action.yml
vendored
@@ -5,11 +5,44 @@ inputs:
|
||||
include-log:
|
||||
required: false
|
||||
default: true
|
||||
remove-previous-comment:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: actions/github-script@v7
|
||||
- name: Remove previous pull-request comment
|
||||
uses: actions/github-script@v7
|
||||
if: inputs.remove-previous-comment == 'true'
|
||||
with:
|
||||
script: |
|
||||
const { owner, repo } = context.repo;
|
||||
|
||||
const { data: comments } = await github.rest.issues.listComments({
|
||||
owner,
|
||||
repo,
|
||||
issue_number: context.issue.number,
|
||||
}).catch(console.error);
|
||||
|
||||
if (!comments) {
|
||||
return;
|
||||
}
|
||||
|
||||
const message = "${{ inputs.message }}";
|
||||
const comment = comments.find((comment) => comment.body.includes(message));
|
||||
|
||||
if (comment) {
|
||||
await github.rest.issues.deleteComment({
|
||||
owner,
|
||||
repo,
|
||||
comment_id: comment.id,
|
||||
});
|
||||
}
|
||||
|
||||
- name: Notify pull-request
|
||||
uses: actions/github-script@v7
|
||||
id: notify-pull-request
|
||||
with:
|
||||
result-encoding: string
|
||||
@@ -21,7 +54,7 @@ runs:
|
||||
return;
|
||||
}
|
||||
|
||||
const message = "${{ inputs.message }}"
|
||||
const message = "${{ inputs.message }}";
|
||||
const shouldIncludeLog = ${{ inputs.include-log }}.toString() === "true";
|
||||
const author = context.payload.sender.login;
|
||||
|
||||
|
||||
3
.github/file-paths.yaml
vendored
@@ -33,13 +33,14 @@ frontend_sources: &frontend_sources
|
||||
- ".nvmrc"
|
||||
|
||||
frontend_embedding_sdk_sources:
|
||||
- "enterprise/frontend/src/embedding-sdk/**"
|
||||
- *frontend_sources
|
||||
|
||||
frontend_specs: &frontend_specs
|
||||
- *shared_specs
|
||||
- "frontend/test/**"
|
||||
- "frontend/**/tests/**"
|
||||
- "frontend/**/*.unit.*"
|
||||
- ".github/**/*.unit.spec.*"
|
||||
- "jest.config.js"
|
||||
- "jest.tz.unit.conf.json"
|
||||
|
||||
|
||||
45
.github/scripts/build-e2e-matrix.js
vendored
Executable file
@@ -0,0 +1,45 @@
|
||||
function buildMatrix(inputSpecs, inputChunks) {
|
||||
const java = 21;
|
||||
const defaultRunner = "ubuntu-22.04";
|
||||
|
||||
const defaultOptions = {
|
||||
"java-version": java,
|
||||
runner: defaultRunner,
|
||||
edition: "ee",
|
||||
};
|
||||
|
||||
const allSpecs = inputSpecs ?? "./e2e/test/scenarios/**/*.cy.spec.*";
|
||||
|
||||
// see config.js function getSplittableSpecs for logic that excludes some tests from auto splitting
|
||||
const specialTests = [
|
||||
{
|
||||
name: "embedding-sdk",
|
||||
specs: "./e2e/test/scenarios/embedding-sdk/**.cy.spec.*",
|
||||
},
|
||||
{
|
||||
name: "oss-subset",
|
||||
edition: "oss",
|
||||
tags: "@OSS @smoke+-@EE",
|
||||
specs: allSpecs,
|
||||
},
|
||||
{ name: "mongo", tags: "@mongo", specs: allSpecs },
|
||||
];
|
||||
|
||||
const regularChunks = inputChunks - specialTests.length;
|
||||
|
||||
const regularTests = new Array(regularChunks).fill(1).map((files, index) => ({
|
||||
name: `e2e-group-${index + 1}`,
|
||||
}));
|
||||
|
||||
// regular chunks need to come before special chunks
|
||||
const testSets = [...regularTests, ...specialTests];
|
||||
|
||||
const config = testSets.map((options) => ({
|
||||
...defaultOptions,
|
||||
...options,
|
||||
}));
|
||||
|
||||
return { config, regularChunks };
|
||||
}
|
||||
|
||||
module.exports = { buildMatrix };
|
||||
43
.github/scripts/build-e2e-matrix.unit.spec.js
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
const { buildMatrix } = require("./build-e2e-matrix");
|
||||
|
||||
describe("buildMatrix", () => {
|
||||
it("should calculate correct regular chunks with default parameters", () => {
|
||||
const result = buildMatrix("./e2e/test/scenarios/**/*.cy.spec.*", 30);
|
||||
|
||||
expect(result.regularChunks).toBe(27);
|
||||
});
|
||||
|
||||
it("should create correct number of configuration objects", () => {
|
||||
const result = buildMatrix("./e2e/test/scenarios/**/*.cy.spec.*", 10);
|
||||
|
||||
expect(result.config.length).toBe(10);
|
||||
});
|
||||
|
||||
it("should apply default specs path when null is provided", () => {
|
||||
const result = buildMatrix(null, 5);
|
||||
|
||||
expect(result.regularChunks).toBe(2);
|
||||
expect(result.config.length).toBe(5);
|
||||
});
|
||||
|
||||
it("should name regular test groups sequentially", () => {
|
||||
const result = buildMatrix("./e2e/test/scenarios/**/*.cy.spec.*", 10);
|
||||
const regularTests = result.config.filter((cfg) =>
|
||||
cfg.name.startsWith("e2e-group-"),
|
||||
);
|
||||
|
||||
regularTests.forEach((test, index) => {
|
||||
expect(test.name).toBe(`e2e-group-${index + 1}`);
|
||||
});
|
||||
});
|
||||
|
||||
it("should handle case when input chunks equals special tests count", () => {
|
||||
const result = buildMatrix("./e2e/test/scenarios/**/*.cy.spec.*", 3);
|
||||
|
||||
expect(result.regularChunks).toBe(0);
|
||||
expect(result.config.length).toBe(3);
|
||||
expect(result.config[0].name).toBe("embedding-sdk");
|
||||
expect(result.config[1].name).toBe("oss-subset");
|
||||
expect(result.config[2].name).toBe("mongo");
|
||||
});
|
||||
});
|
||||
12
.github/scripts/update-pr-with-issues.js
vendored
@@ -75,6 +75,14 @@ async function link_issues(github) {
|
||||
|
||||
console.log('PR Info:\n' + JSON.stringify(prInfo, null, 2) + "\n");
|
||||
|
||||
if (prInfo &&
|
||||
prInfo.data &&
|
||||
prInfo.data.labels &&
|
||||
prInfo.data.labels.some(label => label.name === "no-auto-issue-links")) {
|
||||
console.log('PR has "no-auto-issue-links" label, skipping...');
|
||||
return;
|
||||
}
|
||||
|
||||
const prUrl = prInfo.data.html_url;
|
||||
console.log(`Processing PR: ${prUrl}`);
|
||||
|
||||
@@ -153,7 +161,9 @@ async function link_issues(github) {
|
||||
// Generate closing references
|
||||
const closingRefs = issueNumbersToAdd.map(num => `closes #${num}`).join(' ');
|
||||
|
||||
newBody = `<!-- Added by 'Add Issue References to PR' GitHub Action -->${closingRefs}\n` + newBody;
|
||||
const messagePreamble = "<!-- Added by 'Add Issue References to PR' GitHub Action. To disable linking, add 'no-auto-issue-links' label to your PR. -->"
|
||||
|
||||
newBody = `${messagePreamble} ${closingRefs}\n` + newBody;
|
||||
|
||||
// Update PR body with new closing references
|
||||
await github.rest.issues.update({
|
||||
|
||||
12
.github/team.json
vendored
@@ -86,6 +86,18 @@
|
||||
"camsaul",
|
||||
"escherize"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Metabot",
|
||||
"label": ".Team/Metabot",
|
||||
"members": [
|
||||
"somtom"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Product Growth",
|
||||
"label": ".Team/ProductGrowth",
|
||||
"members": ["nemanjaglumac"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
21
.github/workflows/backend.yml
vendored
@@ -40,27 +40,6 @@ jobs:
|
||||
- run: clojure -X:dev:ee:ee-dev:drivers:drivers-dev:test:eastwood
|
||||
name: Run Eastwood linter
|
||||
|
||||
mage-tests:
|
||||
if: ${{ !inputs.skip }}
|
||||
runs-on: ubuntu-22.04
|
||||
name: Mage
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Prepare back-end environment
|
||||
uses: ./.github/actions/prepare-backend
|
||||
with:
|
||||
m2-cache-key: 'kondo'
|
||||
- name: Setup Babashka
|
||||
uses: turtlequeue/setup-babashka@v1.7.0
|
||||
with:
|
||||
babashka-version: 1.12.197
|
||||
- name: Check bb runs
|
||||
run: bb --version
|
||||
- name: bb task list
|
||||
run: bb tasks
|
||||
- name: Run mage tests
|
||||
run: bb ./test/mage/core_test.clj
|
||||
|
||||
be-tests:
|
||||
if: ${{ !inputs.skip }}
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
name: E2E Cross-version Component Tests for Embedding SDK
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "release-**"
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
branches:
|
||||
- "release-**"
|
||||
workflow_call:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
|
||||
@@ -66,8 +60,7 @@ jobs:
|
||||
build:
|
||||
needs: [files-changed, get-build-requirements]
|
||||
if: |
|
||||
!cancelled() &&
|
||||
github.event.pull_request.draft == false
|
||||
!cancelled()
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 25
|
||||
env:
|
||||
|
||||
@@ -2,6 +2,10 @@ name: E2E Component Tests for Embedding SDK
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
cached-embedding-sdk-dist-artifact-name:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
files-changed:
|
||||
@@ -88,45 +92,11 @@ jobs:
|
||||
with:
|
||||
name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar
|
||||
|
||||
build-embedding-sdk:
|
||||
needs: [files-changed, get-build-requirements]
|
||||
if: |
|
||||
!cancelled() &&
|
||||
needs.files-changed.outputs.e2e_all == 'true'
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 15
|
||||
env:
|
||||
MB_EDITION: ee
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Prepare front-end environment
|
||||
uses: ./.github/actions/prepare-frontend
|
||||
|
||||
- name: Prepare back-end environment
|
||||
uses: ./.github/actions/prepare-backend
|
||||
with:
|
||||
m2-cache-key: "cljs"
|
||||
|
||||
- name: Compile CLJS
|
||||
run: yarn build-pure:cljs
|
||||
shell: bash
|
||||
|
||||
- name: Build Embedding SDK package
|
||||
run: yarn build-embedding-sdk
|
||||
|
||||
- name: Upload Embedding SDK artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: embedding-sdk-build
|
||||
path: resources/embedding-sdk
|
||||
|
||||
e2e-tests:
|
||||
needs: [get-build-requirements, build-uberjar, build-embedding-sdk]
|
||||
needs: [get-build-requirements, build-uberjar]
|
||||
if: |
|
||||
!cancelled() &&
|
||||
needs.build-uberjar.result == 'success' &&
|
||||
needs.build-embedding-sdk.result == 'success'
|
||||
needs.build-uberjar.result == 'success'
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 45
|
||||
strategy:
|
||||
@@ -179,11 +149,11 @@ jobs:
|
||||
with:
|
||||
m2-cache-key: "cljs"
|
||||
|
||||
- name: Download Embedding SDK artifact
|
||||
- name: Retrieve Embedding SDK dist artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: embedding-sdk-build
|
||||
path: resources/embedding-sdk
|
||||
name: ${{ inputs.cached-embedding-sdk-dist-artifact-name }}
|
||||
path: ${{ github.workspace }}/resources/embedding-sdk
|
||||
|
||||
- name: Run Metabase
|
||||
run: node e2e/runner/run_cypress_ci.js start
|
||||
|
||||
69
.github/workflows/e2e-cross-version-for-breaking-changes.yml
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
name: E2E Cross-version Tests
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
fe-ref:
|
||||
description: "Frontend git ref to use"
|
||||
type: string
|
||||
required: true
|
||||
default: "master"
|
||||
be-ref:
|
||||
description: "Backend git ref to use"
|
||||
type: string
|
||||
required: true
|
||||
default: "master"
|
||||
workflow_call:
|
||||
inputs:
|
||||
fe-ref:
|
||||
description: "Frontend git ref to use"
|
||||
type: string
|
||||
required: true
|
||||
be-ref:
|
||||
description: "Backend git ref to use"
|
||||
type: string
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
cross-version-for-breaking-changes:
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 45
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Prepare frontend environment
|
||||
uses: ./.github/actions/prepare-frontend
|
||||
|
||||
- name: Prepare back-end environment
|
||||
uses: ./.github/actions/prepare-backend
|
||||
with:
|
||||
m2-cache-key: cross-version-uberjar
|
||||
|
||||
- name: Build jar with different frontend and backend version
|
||||
env:
|
||||
MB_EDITION: ee
|
||||
CYPRESS_CI: true
|
||||
run: |
|
||||
bash bin/backward-compatibility-test.sh \
|
||||
${{ inputs.fe-ref }} ${{ inputs.be-ref }} \
|
||||
build
|
||||
|
||||
- name: Prepare Cypress environment
|
||||
id: cypress-prep
|
||||
uses: ./.github/actions/prepare-cypress
|
||||
|
||||
- name: Run the tests
|
||||
env:
|
||||
MB_EDITION: ee
|
||||
CYPRESS_ALL_FEATURES_TOKEN: ${{ secrets.ENTERPRISE_TOKEN }}
|
||||
CYPRESS_NO_FEATURES_TOKEN: ${{ secrets.E2E_STARTER_TOKEN }}
|
||||
CYPRESS_CI: true
|
||||
run: |
|
||||
bash bin/backward-compatibility-test.sh \
|
||||
${{ inputs.fe-ref }} ${{ inputs.be-ref }} \
|
||||
start > /dev/null & \
|
||||
bash bin/backward-compatibility-test.sh \
|
||||
${{ inputs.fe-ref }} ${{ inputs.be-ref }} \
|
||||
test
|
||||
45
.github/workflows/e2e-matrix-builder.yml
vendored
@@ -7,6 +7,10 @@ on:
|
||||
required: true
|
||||
type: number
|
||||
default: 30
|
||||
specs:
|
||||
required: false
|
||||
type: string
|
||||
default: "./e2e/test/scenarios/**/*.cy.spec.*"
|
||||
outputs:
|
||||
matrix:
|
||||
value: ${{ jobs.build-matrix.outputs.matrix }}
|
||||
@@ -21,49 +25,20 @@ jobs:
|
||||
matrix: ${{ steps.matrix.outputs.config }}
|
||||
regularChunks: ${{ steps.matrix.outputs.regularChunks }}
|
||||
steps:
|
||||
- uses: actions/setup-node@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22.x'
|
||||
node-version: lts/Jod # 22.x.x
|
||||
- uses: actions/github-script@v7
|
||||
id: matrix
|
||||
env:
|
||||
chunks: ${{ inputs.chunks }}
|
||||
with:
|
||||
script: | # js
|
||||
const java = 21;
|
||||
const defaultRunner = "ubuntu-22.04";
|
||||
|
||||
const defaultOptions = {
|
||||
"java-version": java,
|
||||
runner: defaultRunner,
|
||||
edition: "ee",
|
||||
};
|
||||
|
||||
const allSpecs = "./e2e/test/scenarios/**/*.cy.spec.*";
|
||||
|
||||
// see config.js function getSplittableSpecs for logic that excludes some tests from auto splitting
|
||||
const specialTests = [
|
||||
{ name: "embedding-sdk", specs: "./e2e/test/scenarios/embedding-sdk/**.cy.spec.*" },
|
||||
{ name: "oss-subset", edition: 'oss', tags: "@OSS @smoke+-@EE", specs: allSpecs },
|
||||
{ name: "mongo", tags: "@mongo", specs: allSpecs },
|
||||
];
|
||||
|
||||
const { buildMatrix } = require('${{ github.workspace }}/.github/scripts/build-e2e-matrix.js');
|
||||
const inputSpecs = "${{ inputs.specs }}";
|
||||
const inputChunks = Number(process.env.chunks);
|
||||
const regularChunks = inputChunks - specialTests.length;
|
||||
|
||||
const regularTests = new Array(regularChunks).fill(1)
|
||||
.map((files, index) => ({
|
||||
name: `e2e-group-${index + 1}`,
|
||||
}));
|
||||
|
||||
// regular chunks need to come before special chunks
|
||||
const testSets = [...regularTests, ...specialTests];
|
||||
|
||||
const config = testSets.map((options) => ({
|
||||
...defaultOptions,
|
||||
...options,
|
||||
}));
|
||||
|
||||
const { config, regularChunks } = buildMatrix(inputSpecs, inputChunks);
|
||||
|
||||
core.setOutput("regularChunks", JSON.stringify(regularChunks));
|
||||
core.setOutput("config", JSON.stringify({ include: config }));
|
||||
|
||||
5
.github/workflows/e2e-sample-apps-tests.yml
vendored
@@ -24,8 +24,8 @@ env:
|
||||
[
|
||||
"shoppy-e2e"
|
||||
]
|
||||
SAMPLE_APP_MAIN_BRANCH_NAME: 'main'
|
||||
SAMPLE_APP_STABLE_RELEASE_BRANCH_NAME_SUFFIX: 'stable'
|
||||
SAMPLE_APP_MAIN_BRANCH_NAME: "main"
|
||||
SAMPLE_APP_STABLE_RELEASE_BRANCH_NAME_SUFFIX: "stable"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
|
||||
@@ -150,7 +150,6 @@ jobs:
|
||||
needs: [files-changed, get-build-requirements, get-sample-apps-data]
|
||||
if: |
|
||||
!cancelled() &&
|
||||
github.event.pull_request.draft == false &&
|
||||
needs.files-changed.outputs.e2e_all == 'true' &&
|
||||
fromJSON(needs.get-sample-apps-data.outputs.matrix)[0] != null
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
11
.github/workflows/e2e-stress-test-flake-fix.yml
vendored
@@ -30,6 +30,11 @@ on:
|
||||
- none
|
||||
- sql
|
||||
- mongo
|
||||
enable_network_throttling:
|
||||
description: "Enable network throttling simulation (4g slow like in chrome dev tools)"
|
||||
type: boolean
|
||||
required: false
|
||||
default: true
|
||||
|
||||
jobs:
|
||||
workflow-summary:
|
||||
@@ -46,6 +51,7 @@ jobs:
|
||||
echo '- `burn_in`: ${{ inputs.burn_in }}' >> $GITHUB_STEP_SUMMARY
|
||||
echo '- `grep`: "${{ inputs.grep }}"' >> $GITHUB_STEP_SUMMARY
|
||||
echo '- `qa_db`: "${{ inputs.qa_db }}"' >> $GITHUB_STEP_SUMMARY
|
||||
echo '- `enable_network_throttling`: "${{ inputs.enable_network_throttling }}"' >> $GITHUB_STEP_SUMMARY
|
||||
echo '' >> $GITHUB_STEP_SUMMARY
|
||||
echo 'triggered by: @${{ github.event.sender.login }}' >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
@@ -62,6 +68,7 @@ jobs:
|
||||
MB_SNOWPLOW_AVAILABLE: true
|
||||
MB_SNOWPLOW_URL: "http://localhost:9090" # Snowplow micro
|
||||
MB_EDITION: ${{ inputs.mb_edition }}
|
||||
CYPRESS_ENABLE_NETWORK_THROTTLING: ${{ inputs.enable_network_throttling }}
|
||||
TERM: xterm
|
||||
TZ: US/Pacific # to make node match the instance tz
|
||||
steps:
|
||||
@@ -106,10 +113,12 @@ jobs:
|
||||
# For all options and fine-grained control, take a look at the documentation
|
||||
# https://github.com/cypress-io/cypress/tree/develop/npm/grep
|
||||
- name: Stress-test ${{ github.event.inputs.spec }} ${{ github.event.inputs.burn_in }} times
|
||||
env:
|
||||
GREP: ${{ github.event.inputs.grep }}
|
||||
run: |
|
||||
node e2e/runner/run_cypress_ci.js e2e \
|
||||
--spec '${{ github.event.inputs.spec }}' \
|
||||
--env burn=${{ github.event.inputs.burn_in }},grep='${{ github.event.inputs.grep }}' \
|
||||
--env burn=${{ github.event.inputs.burn_in }} \
|
||||
--config-file e2e/support/cypress-stress-test.config.js \
|
||||
--browser ${{ steps.cypress-prep.outputs.chrome-path }}
|
||||
|
||||
|
||||
1
.github/workflows/e2e-test.yml
vendored
@@ -49,6 +49,7 @@ jobs:
|
||||
CYPRESS_PULL_REQUEST_ID: ${{ github.event.pull_request.number || '' }}
|
||||
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title || github.event.head_commit.message || github.event.head.sha }}
|
||||
MB_EXPERIMENTAL_SEARCH_BLOCK_ON_QUEUE: true
|
||||
MB_SEARCH_ENGINE: appdb
|
||||
MB_SNOWPLOW_AVAILABLE: true
|
||||
MB_SNOWPLOW_URL: "http://localhost:9090" # Snowplow micro
|
||||
TZ: US/Pacific # to make node match the instance tz
|
||||
|
||||
71
.github/workflows/embedding-sdk.yml
vendored
@@ -29,11 +29,14 @@ jobs:
|
||||
token: ${{ github.token }}
|
||||
filters: .github/file-paths.yaml
|
||||
|
||||
embedding-sdk-cli-snippets-type-check:
|
||||
needs: [ files-changed ]
|
||||
if: needs.files-changed.outputs.frontend_embedding_sdk_sources == 'true'
|
||||
build:
|
||||
needs: [files-changed]
|
||||
if: |
|
||||
!cancelled() &&
|
||||
(needs.files-changed.outputs.frontend_embedding_sdk_sources == 'true' ||
|
||||
needs.files-changed.outputs.documentation == 'true')
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 20
|
||||
timeout-minutes: 25
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Prepare front-end environment
|
||||
@@ -42,44 +45,78 @@ jobs:
|
||||
uses: ./.github/actions/prepare-backend
|
||||
with:
|
||||
m2-cache-key: "cljs"
|
||||
- name: Compile CLJS
|
||||
run: yarn build-pure:cljs
|
||||
shell: bash
|
||||
- name: Build Embedding SDK package
|
||||
run: yarn build-embedding-sdk
|
||||
- name: Prepare Embedding SDK artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: embedding-sdk-${{ github.event.pull_request.head.sha || github.sha }}
|
||||
path: resources/embedding-sdk
|
||||
|
||||
embedding-sdk-cli-snippets-type-check:
|
||||
needs: [files-changed, build]
|
||||
if: |
|
||||
needs.files-changed.outputs.frontend_embedding_sdk_sources == 'true' &&
|
||||
needs.build.result == 'success'
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Prepare front-end environment
|
||||
uses: ./.github/actions/prepare-frontend
|
||||
- name: Retrieve Embedding SDK dist artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: embedding-sdk-${{ github.event.pull_request.head.sha || github.sha }}
|
||||
path: ${{ github.workspace }}/resources/embedding-sdk
|
||||
- name: Run frontend embedding SDK snippets type check
|
||||
run: yarn run embedding-sdk:cli-snippets:type-check
|
||||
|
||||
embedding-sdk-docs-snippets-type-check:
|
||||
needs: [ files-changed ]
|
||||
if: needs.files-changed.outputs.documentation == 'true'
|
||||
needs: [files-changed, build]
|
||||
if: |
|
||||
needs.files-changed.outputs.documentation == 'true' &&
|
||||
needs.build.result == 'success'
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Prepare front-end environment
|
||||
uses: ./.github/actions/prepare-frontend
|
||||
- name: Prepare back-end environment
|
||||
uses: ./.github/actions/prepare-backend
|
||||
- name: Retrieve Embedding SDK dist artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
m2-cache-key: "cljs"
|
||||
- name: Compile CLJS
|
||||
run: yarn build-pure:cljs
|
||||
shell: bash
|
||||
- name: Build Embedding SDK package
|
||||
run: yarn build-embedding-sdk
|
||||
name: embedding-sdk-${{ github.event.pull_request.head.sha || github.sha }}
|
||||
path: ${{ github.workspace }}/resources/embedding-sdk
|
||||
- name: Run frontend embedding SDK snippets type check
|
||||
run: yarn run embedding-sdk:docs-snippets:type-check
|
||||
|
||||
sdk-e2e-tests:
|
||||
uses: ./.github/workflows/e2e-component-tests-embedding-sdk.yml
|
||||
needs: [build]
|
||||
secrets: inherit
|
||||
with:
|
||||
cached-embedding-sdk-dist-artifact-name: embedding-sdk-${{ github.event.pull_request.head.sha || github.sha }}
|
||||
|
||||
e2e-component-tests-embedding-sdk-cross-version:
|
||||
if: ${{ startsWith(inputs.branch, 'release-x.') }}
|
||||
uses: ./.github/workflows/e2e-component-tests-embedding-sdk-cross-version.yml
|
||||
secrets: inherit
|
||||
|
||||
cross-version-for-breaking-changes:
|
||||
if: github.event_name == 'pull_request'
|
||||
uses: ./.github/workflows/e2e-cross-version-for-breaking-changes.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
fe-ref: ${{ github.base_ref }}
|
||||
be-ref: ${{ github.head_ref }}
|
||||
|
||||
embedding-sdk-tests-result:
|
||||
needs:
|
||||
- embedding-sdk-cli-snippets-type-check
|
||||
- embedding-sdk-docs-snippets-type-check
|
||||
- sdk-e2e-tests
|
||||
- e2e-component-tests-embedding-sdk-cross-version
|
||||
if: always() && !cancelled()
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
|
||||
22
.github/workflows/fuzzing.yml
vendored
@@ -13,7 +13,7 @@ on:
|
||||
- "frontend/src/metabase-lib/expressions/**"
|
||||
|
||||
jobs:
|
||||
fe-fuzz-tokenizer:
|
||||
fe-fuzz-lexifier:
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
@@ -24,10 +24,10 @@ jobs:
|
||||
uses: ./.github/actions/prepare-backend
|
||||
with:
|
||||
m2-cache-key: "cljs"
|
||||
- run: yarn test-unit frontend/src/metabase-lib/v1/expressions/tokenizer/fuzz.unit.spec.ts
|
||||
- run: yarn test-unit frontend/src/metabase-lib/v1/expressions/pratt/fuzz.lexifier.unit.spec.ts
|
||||
env:
|
||||
MB_FUZZ: 1
|
||||
name: Run fuzz testing on the tokenizer
|
||||
name: Run fuzz testing on the lexifier
|
||||
|
||||
fe-fuzz-compiler:
|
||||
runs-on: ubuntu-22.04
|
||||
@@ -44,3 +44,19 @@ jobs:
|
||||
env:
|
||||
MB_FUZZ: 1
|
||||
name: Run fuzz testing on the custom expression compiler
|
||||
|
||||
fe-fuzz-string-quoting:
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Prepare front-end environment
|
||||
uses: ./.github/actions/prepare-frontend
|
||||
- name: Prepare back-end environment
|
||||
uses: ./.github/actions/prepare-backend
|
||||
with:
|
||||
m2-cache-key: "cljs"
|
||||
- run: yarn test-unit frontend/src/metabase-lib/v1/expressions/fuzz.string.unit.spec.ts
|
||||
env:
|
||||
MB_FUZZ: 1
|
||||
name: Run fuzz testing on the custom expression string quoter
|
||||
|
||||
27
.github/workflows/mage.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
name: Mage Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths: ["mage/**", "test/mage/**"]
|
||||
|
||||
jobs:
|
||||
# run mage tests even if the rest of be isnt needed
|
||||
mage-tests:
|
||||
runs-on: ubuntu-22.04
|
||||
name: Mage
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Prepare back-end environment
|
||||
uses: ./.github/actions/prepare-backend
|
||||
with:
|
||||
m2-cache-key: 'kondo'
|
||||
- name: Setup Babashka
|
||||
uses: turtlequeue/setup-babashka@v1.7.0
|
||||
with:
|
||||
babashka-version: 1.12.197
|
||||
- name: Check bb runs
|
||||
run: bb --version
|
||||
- name: bb task list
|
||||
run: bb tasks
|
||||
- name: Run mage tests
|
||||
run: bb ./test/mage/runtests.clj
|
||||
3
.github/workflows/release-embedding-sdk.yml
vendored
@@ -15,6 +15,7 @@ on:
|
||||
- release-x.52.x
|
||||
- release-x.53.x
|
||||
- release-x.54.x
|
||||
- metabot-v3-main
|
||||
|
||||
concurrency:
|
||||
# We want to ensure only one job is running at a time per branch because
|
||||
@@ -391,7 +392,7 @@ jobs:
|
||||
run: |
|
||||
echo //registry.npmjs.org/:_authToken=${{ secrets.NPM_RELEASE_TOKEN }} > .npmrc
|
||||
# Please keep the value in sync with `inputs.branch`'s release branch
|
||||
npm publish --tag ${{fromJson('{"master": "nightly", "release-x.51.x": "51-stable", "release-x.52.x": "52-stable", "release-x.53.x": "53-stable", "release-x.54.x": "54-stable"}')[inputs.branch]}}
|
||||
npm publish --tag ${{fromJson('{"master": "nightly", "release-x.51.x": "51-stable", "release-x.52.x": "52-stable", "release-x.53.x": "53-stable", "release-x.54.x": "54-stable", "metabot-v3-main": "55-metabot"}')[inputs.branch]}}
|
||||
|
||||
- name: Add `latest` tag to the latest release branch (`release-x.54.x`) deployment
|
||||
if: ${{ inputs.branch == 'release-x.54.x' }}
|
||||
|
||||
50
.github/workflows/release.yml
vendored
@@ -359,6 +359,29 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: release
|
||||
- name: Prepare build scripts
|
||||
run: cd ${{ github.workspace }}/release && yarn && yarn build
|
||||
- name: Find milestone
|
||||
id: find-milestone
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: | # js
|
||||
const { findMilestone } = require('${{ github.workspace }}/release/dist/index.cjs');
|
||||
|
||||
const version = '${{ inputs.version }}';
|
||||
|
||||
const milestone = await findMilestone({
|
||||
github,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
version,
|
||||
}).catch(console.error);
|
||||
|
||||
console.log("Milestone:", milestone.number);
|
||||
core.setOutput('milestone', milestone.number);
|
||||
- uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
|
||||
@@ -372,28 +395,10 @@ jobs:
|
||||
event_type: 'create-release-issues',
|
||||
client_payload: {
|
||||
version: enterpriseVersion,
|
||||
}
|
||||
});
|
||||
|
||||
trigger-ee-extra-pr:
|
||||
needs: verify-s3-download
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
|
||||
script: | # js
|
||||
const version = '${{ inputs.version }}';
|
||||
const enterpriseVersion = version.replace(/^v0\./, "v1.");
|
||||
|
||||
github.rest.repos.createDispatchEvent({
|
||||
owner: '${{ github.repository_owner }}',
|
||||
repo: 'metabase-ee-extra',
|
||||
event_type: 'update-ee-extra-build',
|
||||
client_payload: {
|
||||
version: enterpriseVersion,
|
||||
auto: 'true', // always auto-merge
|
||||
runId: '${{ github.run_id }}',
|
||||
releaseSha: '${{ inputs.commit }}',
|
||||
userName: '${{ github.actor }}',
|
||||
milestone: '${{ steps.find-milestone.outputs.milestone }}',
|
||||
}
|
||||
});
|
||||
|
||||
@@ -416,6 +421,7 @@ jobs:
|
||||
- name: Publish draft release notes to github
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
|
||||
result-encoding: string
|
||||
script: | # js
|
||||
const {
|
||||
|
||||
7
.github/workflows/translation-update.yml
vendored
@@ -24,6 +24,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
|
||||
- name: Prepare front-end environment
|
||||
uses: ./.github/actions/prepare-frontend
|
||||
- name: Prepare back-end environment
|
||||
@@ -53,6 +54,8 @@ jobs:
|
||||
-e=uz
|
||||
|
||||
- name: Prepare translation resources
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
|
||||
run: | # sh
|
||||
git config user.name github-actions
|
||||
git config user.email github-actions@github.com
|
||||
@@ -85,6 +88,8 @@ jobs:
|
||||
|
||||
- name: Open PR
|
||||
id: create_pr
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
|
||||
run: | # sh
|
||||
DATE=$(date +'%Y-%m-%d')
|
||||
|
||||
@@ -103,7 +108,7 @@ jobs:
|
||||
- name: Auto approve PR
|
||||
uses: juliangruber/approve-pull-request-action@v1
|
||||
with:
|
||||
github-token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
number: ${{ steps.create_pr.outputs.pr_number }}
|
||||
|
||||
- name: Enable Pull Request Automerge
|
||||
|
||||
40
.github/workflows/uberjar.yml
vendored
@@ -85,7 +85,7 @@ jobs:
|
||||
needs: check_jar_health
|
||||
strategy:
|
||||
matrix:
|
||||
edition: [ee, oss, ee-extra]
|
||||
edition: [ee, oss]
|
||||
fail-fast: false
|
||||
services:
|
||||
registry:
|
||||
@@ -108,24 +108,12 @@ jobs:
|
||||
with:
|
||||
ref: ${{ github.event.inputs.commit }}
|
||||
- name: Download uploaded artifacts to insert into container
|
||||
if: ${{ matrix.edition != 'ee-extra' }}
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: metabase-${{ matrix.edition }}-${{ github.sha }}-uberjar
|
||||
path: bin/docker/
|
||||
- name: Download uploaded artifacts to insert into container
|
||||
if: ${{ matrix.edition == 'ee-extra' }}
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: metabase-ee-${{ github.sha }}-uberjar
|
||||
path: bin/docker/
|
||||
- name: Move the ${{ matrix.edition }} uberjar to the context dir
|
||||
run: mv bin/docker/target/uberjar/metabase.jar bin/docker/.
|
||||
- name: Add partner drivers to the container
|
||||
if: ${{ matrix.edition == 'ee-extra' }}
|
||||
uses: ./.github/actions/build-ee-extra
|
||||
with:
|
||||
iam-role: ${{ secrets.METABASE_EE_EXTRA_IAM_ROLE }}
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v2.5.0
|
||||
@@ -196,32 +184,6 @@ jobs:
|
||||
no-cache: false
|
||||
push: true
|
||||
|
||||
- name: Retag and push images if master (ee-extra) - should be cached at this point
|
||||
if: ${{ (github.ref_name == 'master') && matrix.edition == 'ee-extra' }}
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: bin/docker/.
|
||||
platforms: linux/amd64,linux/arm64
|
||||
network: host
|
||||
tags: ${{ secrets.METABASE_EE_EXTRA_CONTAINER_REGISTRY }}/metabase-enterprise-head:latest
|
||||
build-args: |
|
||||
GIT_COMMIT_SHA=${{ github.sha }}
|
||||
no-cache: false
|
||||
push: true
|
||||
|
||||
- name: Retag and push images if dev branch - should be cached at this point
|
||||
if: ${{ !(startsWith(github.ref_name,'master') || startsWith(github.ref_name,'backport')) && matrix.edition == 'ee-extra' }}
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: bin/docker/.
|
||||
platforms: linux/amd64,linux/arm64
|
||||
network: host
|
||||
tags: ${{ github.repository_owner }}/metabase-dev:${{ steps.extract_branch.outputs.branch }}
|
||||
build-args: |
|
||||
GIT_COMMIT_SHA=${{ github.sha }}
|
||||
no-cache: false
|
||||
push: true
|
||||
|
||||
- name: Run Trivy vulnerability scanner if master (ee)
|
||||
if: ${{ (github.ref_name == 'master') && matrix.edition == 'ee' }}
|
||||
uses: aquasecurity/trivy-action@0.29.0
|
||||
|
||||
3
.gitignore
vendored
@@ -39,6 +39,7 @@
|
||||
/docs/**/node_modules
|
||||
/docs/**/package.json
|
||||
/docs/**/yarn.lock
|
||||
/docs/embedding/sdk/api/
|
||||
/frontend/test/snapshots/*
|
||||
/e2e/snapshots/*
|
||||
/e2e/tmp/*
|
||||
@@ -70,6 +71,7 @@
|
||||
/storybook-static
|
||||
/target
|
||||
/test-report-*
|
||||
/temp
|
||||
**/cli-snippets-tmp/**
|
||||
\#*\#
|
||||
bin/node_modules/
|
||||
@@ -132,3 +134,4 @@ modules/drivers/*/.lsp/*
|
||||
|
||||
.aider*
|
||||
/config.yml
|
||||
CLAUDE.local.md
|
||||
|
||||
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 133 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 8.0 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 109 KiB |
|
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 109 KiB |
|
Before Width: | Height: | Size: 107 KiB |
BIN
.loki/reference/chrome_laptop_viz_Table_Table_With_Images.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 167 KiB |
94
.typedoc/page-custom-logic.js
Normal file
@@ -0,0 +1,94 @@
|
||||
const GENERATED_DOC_RETURN_URL_LOCAL_STORAGE_KEY = "generatedDocReturnUrl";
|
||||
|
||||
const isEmbeddingSdkApiDocsPage = (href) =>
|
||||
href.includes("/embedding/sdk/api/");
|
||||
|
||||
const storeReturnUrl = () => {
|
||||
const ref = document.referrer;
|
||||
|
||||
const isRefFromNonApiPage = ref && !isEmbeddingSdkApiDocsPage(ref);
|
||||
|
||||
if (isRefFromNonApiPage) {
|
||||
sessionStorage.setItem(GENERATED_DOC_RETURN_URL_LOCAL_STORAGE_KEY, ref);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Called from `navigationLinks` field of `typedoc.config.mjs
|
||||
*/
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const navigateBack = ({ fallbackUrl }) => {
|
||||
const returnUrl = sessionStorage.getItem(
|
||||
GENERATED_DOC_RETURN_URL_LOCAL_STORAGE_KEY,
|
||||
);
|
||||
|
||||
if (returnUrl) {
|
||||
sessionStorage.removeItem(GENERATED_DOC_RETURN_URL_LOCAL_STORAGE_KEY);
|
||||
|
||||
location.href = returnUrl;
|
||||
} else {
|
||||
location.href = fallbackUrl;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Inserts word breaks (<wbr> tags) into the text content of an element
|
||||
*/
|
||||
function insertWordBreaks(textContent) {
|
||||
const regex = /[\s\S]*?(?:[^_-][_-](?=[^_-])|[^A-Z](?=[A-Z][^A-Z]))/g;
|
||||
const result = [];
|
||||
let lastIndex = 0;
|
||||
let match;
|
||||
|
||||
while ((match = regex.exec(textContent)) !== null) {
|
||||
result.push(match[0], "<wbr>");
|
||||
lastIndex += match[0].length;
|
||||
}
|
||||
|
||||
result.push(textContent.slice(lastIndex));
|
||||
|
||||
return result.join("");
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts word breaks (<wbr> tags) into the text content of specific elements
|
||||
* Currently the typedoc automatically adds word breaks to the identifier names in the right column, but does not do
|
||||
* it for the left column and the main content.
|
||||
* This logic fixes it and does it for the left column and the main content.
|
||||
* This fixes unwanted horizontal scrollbars and overflow issues.
|
||||
*
|
||||
* We have to use `MutationObserver` because links are added by the typedoc dynamically, so we need to wait for them to be added to the DOM
|
||||
*/
|
||||
const setupWordBreaks = () => {
|
||||
const apply = () => {
|
||||
const leftNavigationMenuItemElements =
|
||||
document.querySelectorAll("ul > li > a > span");
|
||||
const contentMenuItemElements =
|
||||
document.querySelectorAll("dl > dt > span > a");
|
||||
|
||||
const itemElements = [
|
||||
...leftNavigationMenuItemElements,
|
||||
...contentMenuItemElements,
|
||||
];
|
||||
|
||||
itemElements.forEach((element) => {
|
||||
if (!element.dataset.wordBreakApplied) {
|
||||
element.innerHTML = insertWordBreaks(element.textContent);
|
||||
element.dataset.wordBreakApplied = "true";
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const observer = new MutationObserver(apply);
|
||||
observer.observe(document.body, {
|
||||
childList: true,
|
||||
subtree: true,
|
||||
});
|
||||
};
|
||||
|
||||
const init = () => {
|
||||
storeReturnUrl();
|
||||
setupWordBreaks();
|
||||
};
|
||||
|
||||
document.addEventListener("DOMContentLoaded", init);
|
||||
126
.typedoc/page-custom-styles.css
Normal file
@@ -0,0 +1,126 @@
|
||||
:root {
|
||||
--color-text-aside: #509ee3;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
:root:not([data-theme="dark"]) {
|
||||
--color-background: #fafbfe;
|
||||
--color-background-secondary: #fff;
|
||||
--color-accent: #e8e8e8;
|
||||
}
|
||||
|
||||
:root:not([data-theme="dark"]) .tsd-signature {
|
||||
/**
|
||||
To display code in code-blocks with the same colors both on light and dark themes
|
||||
*/
|
||||
--color-ts-keyword: var(--dark-color-ts-keyword);
|
||||
--color-ts-project: var(--dark-color-ts-project);
|
||||
--color-ts-module: var(--dark-color-ts-module);
|
||||
--color-ts-namespace: var(--dark-color-ts-namespace);
|
||||
--color-ts-enum: var(--dark-color-ts-enum);
|
||||
--color-ts-enum-member: var(--dark-color-ts-enum-member);
|
||||
--color-ts-variable: var(--dark-color-ts-variable);
|
||||
--color-ts-function: var(--dark-color-ts-function);
|
||||
--color-ts-class: var(--dark-color-ts-class);
|
||||
--color-ts-interface: var(--dark-color-ts-interface);
|
||||
--color-ts-constructor: var(--dark-color-ts-constructor);
|
||||
--color-ts-property: var(--dark-color-ts-property);
|
||||
--color-ts-method: var(--dark-color-ts-method);
|
||||
--color-ts-reference: var(--dark-color-ts-reference);
|
||||
--color-ts-call-signature: var(--dark-color-ts-call-signature);
|
||||
--color-ts-index-signature: var(--dark-color-ts-index-signature);
|
||||
--color-ts-constructor-signature: var(
|
||||
--dark-color-ts-constructor-signature
|
||||
);
|
||||
--color-ts-parameter: var(--dark-color-ts-parameter);
|
||||
--color-ts-type-parameter: var(--dark-color-ts-type-parameter);
|
||||
--color-ts-accessor: var(--dark-color-ts-accessor);
|
||||
--color-ts-get-signature: var(--dark-color-ts-get-signature);
|
||||
--color-ts-set-signature: var(--dark-color-ts-set-signature);
|
||||
--color-ts-type-alias: var(--dark-color-ts-type-alias);
|
||||
|
||||
--color-link: var(--dark-color-link);
|
||||
--external-icon: var(--dark-external-icon);
|
||||
}
|
||||
}
|
||||
|
||||
:root[data-theme='light'] {
|
||||
--color-background: #fafbfe;
|
||||
--color-background-secondary: #fff;
|
||||
--color-accent: #e8e8e8;
|
||||
}
|
||||
|
||||
:root[data-theme='light'] .tsd-signature {
|
||||
/**
|
||||
To display code in code-blocks with the same colors both on light and dark themes
|
||||
*/
|
||||
--color-ts-keyword: var(--dark-color-ts-keyword);
|
||||
--color-ts-project: var(--dark-color-ts-project);
|
||||
--color-ts-module: var(--dark-color-ts-module);
|
||||
--color-ts-namespace: var(--dark-color-ts-namespace);
|
||||
--color-ts-enum: var(--dark-color-ts-enum);
|
||||
--color-ts-enum-member: var(--dark-color-ts-enum-member);
|
||||
--color-ts-variable: var(--dark-color-ts-variable);
|
||||
--color-ts-function: var(--dark-color-ts-function);
|
||||
--color-ts-class: var(--dark-color-ts-class);
|
||||
--color-ts-interface: var(--dark-color-ts-interface);
|
||||
--color-ts-constructor: var(--dark-color-ts-constructor);
|
||||
--color-ts-property: var(--dark-color-ts-property);
|
||||
--color-ts-method: var(--dark-color-ts-method);
|
||||
--color-ts-reference: var(--dark-color-ts-reference);
|
||||
--color-ts-call-signature: var(--dark-color-ts-call-signature);
|
||||
--color-ts-index-signature: var(--dark-color-ts-index-signature);
|
||||
--color-ts-constructor-signature: var(
|
||||
--dark-color-ts-constructor-signature
|
||||
);
|
||||
--color-ts-parameter: var(--dark-color-ts-parameter);
|
||||
--color-ts-type-parameter: var(--dark-color-ts-type-parameter);
|
||||
--color-ts-accessor: var(--dark-color-ts-accessor);
|
||||
--color-ts-get-signature: var(--dark-color-ts-get-signature);
|
||||
--color-ts-set-signature: var(--dark-color-ts-set-signature);
|
||||
--color-ts-type-alias: var(--dark-color-ts-type-alias);
|
||||
|
||||
--color-link: var(--dark-color-link);
|
||||
--external-icon: var(--dark-external-icon);
|
||||
}
|
||||
|
||||
.tsd-toolbar-contents > .title::before {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
background-image: url('/images/logo.svg');
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
height: 36px;
|
||||
width: 36px;
|
||||
margin-right: 8px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.tsd-kind-icon ~ span,
|
||||
.tsd-breadcrumb a,
|
||||
.tsd-navigation a,
|
||||
.tsd-page-toolbar a {
|
||||
color: var(--color-text-aside);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.tsd-signature {
|
||||
background: #12436e;
|
||||
border-radius: .75rem;
|
||||
color: #fff;
|
||||
font-family: "Roboto Mono", monospace;
|
||||
padding: 1.5rem;
|
||||
white-space: unset;
|
||||
}
|
||||
|
||||
@media (max-width: 769px) {
|
||||
#tsd-toolbar-menu-trigger {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
4
.typedoc/tsconfig.sdk-docs.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"extends": "../tsconfig.base.json",
|
||||
"files": ["../resources/embedding-sdk/dist/index.d.ts"]
|
||||
}
|
||||
27
.typedoc/typedoc-plugin-frontmatter.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import { ParameterType, PageEvent } from "typedoc";
|
||||
|
||||
/**
|
||||
* Adds frontmatter globals to each page.
|
||||
*/
|
||||
export function load(app) {
|
||||
app.options.addDeclaration({
|
||||
name: "frontmatterGlobals",
|
||||
help: "Frontmatter globals to be added to each page.",
|
||||
type: ParameterType.Object,
|
||||
defaultValue: {},
|
||||
});
|
||||
|
||||
app.renderer.on(PageEvent.END, (page) => {
|
||||
const frontmatterGlobals = app.options.getValue("frontmatterGlobals");
|
||||
|
||||
const model = page.model;
|
||||
|
||||
frontmatterGlobals.title = model.name || frontmatterGlobals.title;
|
||||
|
||||
const yamlItems = Object.entries(frontmatterGlobals)
|
||||
.map(([key, value]) => `${key}: ${value}`)
|
||||
.join("\n");
|
||||
|
||||
page.contents = `---\n${yamlItems}\n---\n\n${page.contents}`;
|
||||
});
|
||||
}
|
||||
22
.typedoc/typedoc-plugin-replace-text.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import { ParameterType, Renderer } from "typedoc";
|
||||
|
||||
export function load(app) {
|
||||
app.options.addDeclaration({
|
||||
name: "replaceText",
|
||||
help: "Text replacements",
|
||||
type: ParameterType.Object,
|
||||
defaultValue: {},
|
||||
});
|
||||
|
||||
app.renderer.on(Renderer.EVENT_END_PAGE, (page) => {
|
||||
const textReplacements = app.options.getValue("replaceText");
|
||||
|
||||
if (page.contents) {
|
||||
page.contents = Object.entries(textReplacements).reduce(
|
||||
(contents, [search, replace]) =>
|
||||
contents.replace(new RegExp(search, "g"), replace),
|
||||
page.contents,
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||