Skip to content

Commit f3e7275

Browse files
authored
Fix dbtool in built docker image and remove CI caching (#8072)
* temporarily disable ci * disable sbt and target caches * move commander into new tools/postgres/package.json; copy node_modules in dockerfile * don't copy node_modules in dockerfile because assetsGenerationTask copies whole postgres folder anyway * undo changes to docker ignore * remove last circleci caching as it did more harm than good (reproducibility and performance) * re-enable ci
1 parent 520e787 commit f3e7275

File tree

7 files changed

+32
-30
lines changed

7 files changed

+32
-30
lines changed

.circleci/cache_version

Lines changed: 0 additions & 1 deletion
This file was deleted.

.circleci/config.yml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,6 @@ jobs:
4040
- run:
4141
name: Prepare dependency folders
4242
command: mkdir -p project/target target ~/.ivy2 ~/.cache/coursier
43-
- restore_cache:
44-
name: Restore target cache
45-
keys:
46-
- target-cache-{{ checksum ".circleci/cache_version" }}-{{ .Branch }}
47-
- target-cache-{{ checksum ".circleci/cache_version" }}-master
48-
- restore_cache:
49-
name: Restore sbt cache
50-
keys:
51-
- sbt-cache-{{ checksum ".circleci/cache_version" }}-{{ checksum "project/Dependencies.scala" }}
52-
- sbt-cache-{{ checksum ".circleci/cache_version" }}-
5343
- run:
5444
name: Install frontend dependencies
5545
command: docker-compose run -e PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true base yarn install --immutable
@@ -91,20 +81,6 @@ jobs:
9181
name: Checksum App Dirs
9282
command: find app webknossos-datastore/app webknossos-tracingstore/app -type f -exec md5sum {} \; | sort -k 2 | md5sum > app_checksum.txt
9383

94-
- save_cache:
95-
name: Save target cache
96-
key: target-cache-{{ checksum ".circleci/cache_version" }}-{{ .Branch }}-{{ checksum "app_checksum.txt" }}
97-
paths:
98-
- "project/target"
99-
- "target"
100-
101-
- save_cache:
102-
name: Save sbt cache
103-
key: sbt-cache-{{ checksum ".circleci/cache_version" }}-{{ checksum "project/Dependencies.scala" }}
104-
paths:
105-
- "~/.ivy2"
106-
- "~/.cache/coursier"
107-
10884
- run:
10985
name: Build webknossos docker image
11086
command: |

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ WORKDIR /webknossos
1010

1111
COPY target/universal/stage .
1212

13-
1413
RUN addgroup --system --gid 999 webknossos \
1514
&& adduser --system --uid 999 --ingroup webknossos webknossos \
1615
&& mkdir disk \

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
"ava": "^6.1.3",
3737
"browserslist-to-esbuild": "^1.2.0",
3838
"c8": "^9.1.0",
39-
"commander": "^10.0.0",
4039
"copy-webpack-plugin": "^11.0.0",
4140
"coveralls": "^3.0.2",
4241
"css-loader": "^6.5.1",
@@ -117,7 +116,7 @@
117116
"coverage-local": "c8 report --reporter=html && echo Success! Open coverage/index.html",
118117
"coverage": "c8 report --reporter=text-lcov | coveralls",
119118
"apply-evolutions": "tools/postgres/dbtool.js apply-evolutions",
120-
"postinstall": "cd tools/proxy && yarn install",
119+
"postinstall": "cd tools/proxy && yarn install && cd ../postgres && yarn install",
121120
"typecheck": "yarn tsc",
122121
"ts": "yarn tsc",
123122
"ts-watch": "yarn tsc --watch",

tools/postgres/package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "dbtool",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "dbtool.js",
6+
"dependencies": {
7+
"commander": "^10.0.0"
8+
}
9+
}

tools/postgres/yarn.lock

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# This file is generated by running "yarn install" inside your project.
2+
# Manual changes might be lost - proceed with caution!
3+
4+
__metadata:
5+
version: 8
6+
cacheKey: 10c0
7+
8+
"commander@npm:^10.0.0":
9+
version: 10.0.1
10+
resolution: "commander@npm:10.0.1"
11+
checksum: 10c0/53f33d8927758a911094adadda4b2cbac111a5b377d8706700587650fd8f45b0bbe336de4b5c3fe47fd61f420a3d9bd452b6e0e6e5600a7e74d7bf0174f6efe3
12+
languageName: node
13+
linkType: hard
14+
15+
"dbtool@workspace:.":
16+
version: 0.0.0-use.local
17+
resolution: "dbtool@workspace:."
18+
dependencies:
19+
commander: "npm:^10.0.0"
20+
languageName: unknown
21+
linkType: soft

yarn.lock

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4299,7 +4299,7 @@ __metadata:
42994299
languageName: node
43004300
linkType: hard
43014301

4302-
"commander@npm:^10.0.0, commander@npm:^10.0.1":
4302+
"commander@npm:^10.0.1":
43034303
version: 10.0.1
43044304
resolution: "commander@npm:10.0.1"
43054305
checksum: 10c0/53f33d8927758a911094adadda4b2cbac111a5b377d8706700587650fd8f45b0bbe336de4b5c3fe47fd61f420a3d9bd452b6e0e6e5600a7e74d7bf0174f6efe3
@@ -13841,7 +13841,6 @@ __metadata:
1384113841
classnames: "npm:^2.2.5"
1384213842
color-hash: "npm:^2.0.1"
1384313843
comlink: "npm:^4.3.0"
13844-
commander: "npm:^10.0.0"
1384513844
copy-webpack-plugin: "npm:^11.0.0"
1384613845
coveralls: "npm:^3.0.2"
1384713846
css-loader: "npm:^6.5.1"

0 commit comments

Comments
 (0)