Skip to content

Commit 0eef225

Browse files
authored
Switch to tools.deps (metabase#16749)
1 parent 39e8760 commit 0eef225

File tree

144 files changed

+1975
-2240
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+1975
-2240
lines changed

.circleci/config.yml

Lines changed: 91 additions & 94 deletions
Large diffs are not rendered by default.

.dir-locals.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
(let-404)
2222
(macros/case 0)
2323
(match 1)
24+
(c/step 1)
2425
(mbql.match/match 1)
2526
(mt/test-drivers 1)
2627
(mt/query 1)
@@ -39,11 +40,12 @@
3940
(qp.streaming/streaming-response 1)
4041
(prop/for-all 1)
4142
(tools.macro/macrolet '(1 (:defn))))))
43+
(cider-clojure-cli-aliases . "dev:drivers:drivers-dev:ee:ee-dev:build:user")
4244
(clojure-indent-style . always-align)
4345
;; if you're using clj-refactor (highly recommended!)
4446
(cljr-favor-prefix-notation . nil)
4547
;; prefer keeping source width about ~118, GitHub seems to cut off stuff at either 119 or 120 and
4648
;; it's nicer to look at code in GH when you don't have to scroll back and forth
4749
(fill-column . 118)
4850
(clojure-docstring-fill-column . 118)
49-
(cider-preferred-build-tool . lein))))
51+
(cider-preferred-build-tool . clojure-cli))))

.dockerignore

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
1-
.babel_cache/*
1+
.babel_cache
22
docs/*
33
OSX/*
44
target/*
5+
.circleci
6+
.cpcache
7+
.devcontainer
8+
.github
9+
.husky
10+
.lsp
11+
.shadow-cljs
12+
.github
13+
.git
14+
.vscode
15+
hooks/*
16+
test/*
17+
test_config/*
18+
test_modules/*
19+
test_resources/*
20+
node_modules
521

6-
**node_modules
722
**metabase.jar
823

924
*.db
1025

11-
.dockerignore
1226
Dockerfile
27+
.dockerignore

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
### Tests
66

77
- [ ] Run the frontend and Cypress end-to-end tests with `yarn lint && yarn test`)
8-
- [ ] If there are changes to the backend codebase, run the backend tests with `lein test && lein lint`
8+
- [ ] If there are changes to the backend codebase, run the backend tests with `clojure -X:dev:test`
99
- [ ] Sign the [Contributor License Agreement](https://docs.google.com/a/metabase.com/forms/d/1oV38o7b9ONFSwuzwmERRMi9SYrhYeOrkbmNaq9pOJ_E/viewform)
1010
(unless it's a tiny documentation change).

.github/workflows/backend.yml

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,9 @@ on:
44
pull_request:
55
push:
66
branches:
7-
- master
8-
- 'release**'
9-
- 'feature**'
10-
tags:
117
- '**'
128
paths:
13-
- '**.clj'
9+
- '**.clj*'
1410
- '**.edn'
1511
- '**.java'
1612
- '**/metabase-plugin.yaml'
@@ -35,12 +31,22 @@ jobs:
3531
uses: actions/setup-java@v1
3632
with:
3733
java-version: 11
34+
- name: Install Clojure CLI
35+
run: |
36+
curl -O https://download.clojure.org/install/linux-install-1.10.3.933.sh &&
37+
sudo bash ./linux-install-1.10.3.933.sh
3838
- name: Get M2 cache
3939
uses: actions/cache@v2
4040
with:
41-
path: ~/.m2
42-
key: ${{ runner.os }}-eastwood-${{ hashFiles('**/project.clj') }}
43-
- run: lein with-profile +ci eastwood
41+
path: |
42+
~/.m2
43+
~/.gitlibs
44+
key: ${{ runner.os }}-eastwood-${{ hashFiles('**/deps.edn') }}
45+
- name: Compile Java & AOT Sources
46+
run: |
47+
source ./bin/prep.sh && prep_deps
48+
- run: clojure -X:dev:ee:ee-dev:drivers:drivers-dev:eastwood
49+
name: Run Eastwood linter
4450

4551
be-linter-namespace-decls:
4652
runs-on: ubuntu-20.04
@@ -51,9 +57,19 @@ jobs:
5157
uses: actions/setup-java@v1
5258
with:
5359
java-version: 11
60+
- name: Install Clojure CLI
61+
run: |
62+
curl -O https://download.clojure.org/install/linux-install-1.10.3.933.sh &&
63+
sudo bash ./linux-install-1.10.3.933.sh
5464
- name: Get M2 cache
5565
uses: actions/cache@v2
5666
with:
57-
path: ~/.m2
58-
key: ${{ runner.os }}-namespace-decls-${{ hashFiles('**/project.clj') }}
59-
- run: lein with-profile +ci check-namespace-decls
67+
path: |
68+
~/.m2
69+
~/.gitlibs
70+
key: ${{ runner.os }}-namespace-decls-${{ hashFiles('**/deps.edn') }}
71+
- name: Compile Java & AOT Sources
72+
run: |
73+
source ./bin/prep.sh && prep_deps
74+
- run: clojure -X:dev:ee:ee-dev:drivers:drivers-dev:namespace-checker
75+
name: Check ns forms

.github/workflows/frontend.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ on:
44
pull_request:
55
push:
66
branches:
7-
- master
8-
- 'release**'
9-
- 'feature**'
10-
- 'fix**'
11-
- 'ci**'
12-
tags:
137
- '**'
148
paths:
159
- 'frontend/**'

.github/workflows/i18n.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,9 @@ on:
44
pull_request:
55
push:
66
branches:
7-
- master
8-
- 'release**'
9-
- 'feature**'
10-
tags:
117
- '**'
128
paths:
13-
- '**.clj'
9+
- '**.clj*'
1410
- '**.js'
1511
- '**.jsx'
1612
- '.github/workflows/**'
@@ -38,8 +34,8 @@ jobs:
3834

3935
- name: Install Clojure CLI
4036
run: |
41-
curl -O https://download.clojure.org/install/linux-install-1.10.1.708.sh &&
42-
sudo bash ./linux-install-1.10.1.708.sh
37+
curl -O https://download.clojure.org/install/linux-install-1.10.3.933.sh &&
38+
sudo bash ./linux-install-1.10.3.933.sh
4339
4440
- run: ./bin/i18n/update-translation-template
4541
name: Check i18n tags/make sure template can be built

.github/workflows/percy-issue-comment.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ jobs:
6262
echo "yarn `yarn --version`"
6363
java -version
6464
echo "Clojure `clojure -e "(println (clojure-version))"`"
65-
lein --version
6665
6766
- name: Get yarn cache
6867
uses: actions/cache@v2
@@ -76,7 +75,6 @@ jobs:
7675
key: ${{ runner.os }}-m2-${{ hashFiles('**/project.clj') }}-${{ hashFiles('**/deps.edn') }}
7776

7877
- run: yarn install --frozen-lockfile --prefer-offline
79-
- run: lein with-profile +include-all-drivers,+cloverage,+junit,+${{ matrix.edition }} deps
8078
- run: ./bin/build
8179

8280
- name: Mark with the commit hash

.github/workflows/percy.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,14 @@ jobs:
3535
java-version: 8
3636
- name: Install Clojure CLI
3737
run: |
38-
curl -O https://download.clojure.org/install/linux-install-1.10.1.708.sh &&
39-
sudo bash ./linux-install-1.10.1.708.sh
38+
curl -O https://download.clojure.org/install/linux-install-1.10.3.933.sh &&
39+
sudo bash ./linux-install-1.10.3.933.sh
4040
- name: Check versions
4141
run: |
4242
echo "Node.js `node --version`"
4343
echo "yarn `yarn --version`"
4444
java -version
4545
echo "Clojure `clojure -e "(println (clojure-version))"`"
46-
lein --version
4746
4847
- name: Get yarn cache
4948
uses: actions/cache@v2
@@ -57,7 +56,6 @@ jobs:
5756
key: ${{ runner.os }}-m2-${{ hashFiles('**/project.clj') }}-${{ hashFiles('**/deps.edn') }}
5857

5958
- run: yarn install --frozen-lockfile --prefer-offline
60-
- run: lein with-profile +include-all-drivers,+cloverage,+junit,+${{ matrix.edition }} deps
6159
- run: ./bin/build
6260

6361
- name: Mark with the commit hash
@@ -89,8 +87,8 @@ jobs:
8987
java-version: 8
9088
- name: Install Clojure CLI
9189
run: |
92-
curl -O https://download.clojure.org/install/linux-install-1.10.1.708.sh &&
93-
sudo bash ./linux-install-1.10.1.708.sh
90+
curl -O https://download.clojure.org/install/linux-install-1.10.3.933.sh &&
91+
sudo bash ./linux-install-1.10.3.933.sh
9492
- name: Check versions
9593
run: |
9694
echo "Node.js `node --version`"

.github/workflows/uberjar.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ name: Uberjar
33
on:
44
push:
55
branches:
6-
- master
7-
- 'release-**'
8-
tags:
96
- '**'
107
paths-ignore:
118
- 'docs/**'
@@ -35,15 +32,15 @@ jobs:
3532
java-version: 8
3633
- name: Install Clojure CLI
3734
run: |
38-
curl -O https://download.clojure.org/install/linux-install-1.10.1.708.sh &&
39-
sudo bash ./linux-install-1.10.1.708.sh
35+
curl -O https://download.clojure.org/install/linux-install-1.10.3.933.sh &&
36+
sudo bash ./linux-install-1.10.3.933.sh
4037
- name: Check versions
4138
run: |
4239
echo "Node.js `node --version`"
4340
echo "yarn `yarn --version`"
4441
java -version
4542
echo "Clojure `clojure -e "(println (clojure-version))"`"
46-
lein --version
43+
clojure --help | grep Version
4744
4845
- name: Get yarn cache
4946
uses: actions/cache@v2
@@ -53,12 +50,13 @@ jobs:
5350
- name: Get M2 cache
5451
uses: actions/cache@v2
5552
with:
56-
path: ~/.m2
57-
key: ${{ runner.os }}-m2-${{ hashFiles('**/project.clj') }}-${{ hashFiles('**/deps.edn') }}
53+
path: |
54+
~/.m2
55+
~/.gitlibs
56+
key: ${{ runner.os }}-m2-${{ hashFiles('**/deps.edn') }}
5857

5958
- run: yarn install --frozen-lockfile --prefer-offline
60-
- run: lein with-profile +include-all-drivers,+cloverage,+junit,+${{ matrix.edition }} deps
61-
- run: ./bin/build
59+
- run: MB_EDITION=${{ matrix.edition }} ./bin/build
6260

6361
- name: Mark with the commit hash
6462
run: git rev-parse --short HEAD > COMMIT-ID

.github/workflows/yaml.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ on:
44
pull_request:
55
push:
66
branches:
7-
- master
8-
- 'release**'
9-
- 'feature**'
10-
tags:
117
- '**'
128
paths:
139
- '**.yml'

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@
5050
/resources/frontend_client/index.html
5151
/resources/frontend_client/public.html
5252
/resources/i18n/*.edn
53+
/resources/license-backend-third-party.txt
54+
/resources/license-frontend-third-party.txt
5355
/resources/namespaces.edn
5456
/resources/sample-dataset.db.trace.db
5557
/resources/version.properties

Dockerfile

Lines changed: 9 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2,65 +2,31 @@
22
# STAGE 1.1: builder frontend
33
###################
44

5-
FROM metabase/ci:java-11-lein-2.9.6-clj-1.10.3.822-04-22-2021 as frontend
5+
FROM metabase/ci:circleci-java-11-clj-1.10.3.929-07-27-2021-node-browsers as frontend
66

77
ARG MB_EDITION=oss
88

9-
WORKDIR /app/source
9+
WORKDIR /home/circleci
1010

11-
COPY . .
11+
COPY --chown=circleci . .
1212
RUN NODE_ENV=production MB_EDITION=$MB_EDITION yarn --frozen-lockfile && yarn build && bin/i18n/build-translation-resources
1313

14-
###################
15-
# STAGE 1.2: backend deps
16-
###################
17-
18-
FROM metabase/ci:java-11-lein-2.9.6-clj-1.10.3.822-04-22-2021 as backend
19-
20-
WORKDIR /app/source
21-
22-
# backend dependencies
23-
COPY project.clj .
24-
RUN lein deps :tree
25-
26-
###################
27-
# STAGE 1.3: drivers
28-
###################
29-
30-
FROM metabase/ci:java-11-lein-2.9.6-clj-1.10.3.822-04-22-2021 as drivers
31-
32-
ARG MB_EDITION=oss
33-
34-
WORKDIR /app/source
35-
36-
COPY --from=backend /root/.m2/repository/. /root/.m2/repository/.
37-
38-
# add the rest of the source
39-
COPY . .
40-
41-
# build the app
42-
RUN INTERACTIVE=false MB_EDITION=$MB_EDITION sh bin/build-drivers.sh
43-
4414
###################
4515
# STAGE 1.4: main builder
4616
###################
4717

48-
FROM metabase/ci:java-11-lein-2.9.6-clj-1.10.3.822-04-22-2021 as builder
18+
FROM metabase/ci:circleci-java-11-clj-1.10.3.929-07-27-2021-node-browsers as builder
4919

5020
ARG MB_EDITION=oss
5121

52-
WORKDIR /app/source
22+
WORKDIR /home/circleci
5323

5424
# try to reuse caching as much as possible
55-
COPY --from=frontend /root/.m2/repository/. /root/.m2/repository/.
56-
COPY --from=frontend /app/source/. .
57-
COPY --from=backend /root/.m2/repository/. /root/.m2/repository/.
58-
COPY --from=backend /app/source/. .
59-
COPY --from=drivers /root/.m2/repository/. /root/.m2/repository/.
60-
COPY --from=drivers /app/source/. .
25+
COPY --from=frontend /home/circleci/.m2/repository/. /home/circleci/.m2/repository/.
26+
COPY --from=frontend /home/circleci/. .
6127

6228
# build the app
63-
RUN INTERACTIVE=false MB_EDITION=$MB_EDITION bin/build version uberjar
29+
RUN INTERACTIVE=false MB_EDITION=$MB_EDITION bin/build version drivers uberjar
6430

6531
# ###################
6632
# # STAGE 2: runner
@@ -83,7 +49,7 @@ RUN apk upgrade && apk add --update-cache --no-cache bash ttf-dejavu fontconfig
8349
mkdir -p /plugins && chmod a+rwx /plugins
8450

8551
# add Metabase script and uberjar
86-
COPY --from=builder /app/source/target/uberjar/metabase.jar /app/
52+
COPY --from=builder /home/circleci/target/uberjar/metabase.jar /app/
8753
COPY bin/docker/run_metabase.sh /app/
8854

8955
# expose our default runtime port

0 commit comments

Comments
 (0)