Skip to content

Commit a0705cb

Browse files
committed
Merge branch 'main' into iain/web-3479-reduce-yarn-postinstall-steps-cache
2 parents 0c15962 + 3e9f871 commit a0705cb

File tree

270 files changed

+7922
-3250
lines changed

Some content is hidden

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

270 files changed

+7922
-3250
lines changed

.circleci/config.yml

Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,11 @@ workflows:
262262
requires:
263263
- install-dependencies
264264

265+
- lint-and-prettier:
266+
filters: *filters-allow-all
267+
requires:
268+
- install-dependencies
269+
265270
- docker-build-server:
266271
context: &build-context
267272
- github-readonly-public-repos
@@ -336,6 +341,7 @@ workflows:
336341
- docker-build-server
337342
- get-version
338343
- pre-commit
344+
- lint-and-prettier
339345
- publish-approval
340346
- test-frontend-2
341347
- test-viewer
@@ -352,6 +358,7 @@ workflows:
352358
- docker-build-frontend-2
353359
- get-version
354360
- pre-commit
361+
- lint-and-prettier
355362
- publish-approval
356363
- test-frontend-2
357364
- test-viewer
@@ -377,6 +384,7 @@ workflows:
377384
- docker-build-webhooks
378385
- get-version
379386
- pre-commit
387+
- lint-and-prettier
380388
- publish-approval
381389
- test-frontend-2
382390
- test-viewer
@@ -393,6 +401,7 @@ workflows:
393401
- docker-build-file-imports
394402
- get-version
395403
- pre-commit
404+
- lint-and-prettier
396405
- publish-approval
397406
- test-frontend-2
398407
- test-viewer
@@ -409,6 +418,7 @@ workflows:
409418
- docker-build-previews
410419
- get-version
411420
- pre-commit
421+
- lint-and-prettier
412422
- publish-approval
413423
- test-frontend-2
414424
- test-viewer
@@ -425,6 +435,7 @@ workflows:
425435
- docker-build-test-container
426436
- get-version
427437
- pre-commit
438+
- lint-and-prettier
428439
- publish-approval
429440
- test-frontend-2
430441
- test-viewer
@@ -453,6 +464,7 @@ workflows:
453464
- docker-build-monitor-container
454465
- get-version
455466
- pre-commit
467+
- lint-and-prettier
456468
- publish-approval
457469
- test-frontend-2
458470
- test-viewer
@@ -498,11 +510,6 @@ workflows:
498510
- get-version
499511
- publish-approval
500512

501-
- update-helm-documentation:
502-
filters: *filters-publish
503-
requires:
504-
- publish-helm-chart
505-
506513
- publish-npm:
507514
filters:
508515
tags:
@@ -568,44 +575,53 @@ jobs:
568575
- *pull-npm-global # workaround
569576
- *push-yarn-cache # to circleci cache storage
570577

578+
lint-and-prettier:
579+
<<: *docker-node-image
580+
resource_class: xlarge
581+
steps:
582+
- checkout
583+
- *pull-yarn-cache # from circleci cache storage
584+
- *pull-npm-global # workaround
585+
- *yarn
586+
- *restore-build-public
587+
- run:
588+
name: Lint everything
589+
command: yarn eslint:projectwide
590+
- run:
591+
name: Run prettier check
592+
command: yarn prettier:check
593+
- run:
594+
name: Check JSON Schema is up to date
595+
command: |
596+
yarn helm:jsonschema:generate
597+
git diff --exit-code
598+
571599
pre-commit:
572600
parameters:
573601
config_file:
574602
default: ./.pre-commit-config.yaml
575603
description: Optional, path to pre-commit config file.
576604
type: string
577-
deployment_config_file:
578-
default: ./.pre-commit-config.deployment.yaml
579-
description: Optional, path to additional pre-commit config file.
580-
type: string
581-
cache_prefix:
582-
default: ''
583-
description: |
584-
Optional cache prefix to be used on CircleCI. Can be used for cache busting or to ensure multiple jobs use different caches.
585-
type: string
586605
docker:
587606
- image: speckle/pre-commit-runner:latest
588607
resource_class: xlarge
608+
working_directory: *default-working-dir
589609
steps:
590610
- checkout
591611
- restore_cache:
592-
name: Restore pre-commit & Yarn Package cache
612+
name: Restore pre-commit
593613
keys:
594-
- cache-pre-commit-<<parameters.cache_prefix>>-{{ checksum "<<parameters.config_file>>" }}
614+
- cache-pre-commit-{{ checksum "<<parameters.config_file>>" }}
595615
- run:
596616
name: Install pre-commit hooks
597617
command: pre-commit install-hooks --config <<parameters.config_file>>
598618
- save_cache:
599-
key: cache-pre-commit-<<parameters.cache_prefix>>-{{ checksum "<<parameters.config_file>>" }}
619+
key: cache-pre-commit--{{ checksum "<<parameters.config_file>>" }}
600620
paths:
601621
- ~/.cache/pre-commit
602-
- *restore-yarn-cache
603-
- *pull-npm-global # workaround
604-
- *yarn-from-cache
605-
- *restore-build-public
606622
- run:
607623
name: Run pre-commit
608-
command: ./.husky/pre-commit
624+
command: pre-commit run --all-files --config <<parameters.config_file>>
609625
- run:
610626
command: git --no-pager diff
611627
name: git diff
@@ -1214,19 +1230,6 @@ jobs:
12141230
name: Publish Helm Chart
12151231
command: ./.circleci/publish_helm_chart.sh
12161232

1217-
update-helm-documentation:
1218-
<<: *docker-node-image
1219-
steps:
1220-
- checkout
1221-
- *restore_workspace
1222-
- *restore_env_vars
1223-
- add_ssh_keys:
1224-
fingerprints:
1225-
- '4d:68:70:66:49:97:ba:8b:8c:55:96:df:3d:be:6e:05'
1226-
- run:
1227-
name: Update Helm Documentation
1228-
command: ./.circleci/update_helm_documentation.sh
1229-
12301233
publish-viewer-sandbox-cloudflare-pages:
12311234
<<: *docker-node-image
12321235
resource_class: xlarge

.circleci/deployment/Tiltfile.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def speckle_image(package,original_package_name=None):
66
original_package_name = package
77

88
package_dir = 'packages/{}'.format(original_package_name)
9-
if package == 'test-deployment' or package == 'monitor-deployment' or package == 'docker-compose-ingress':
9+
if package == 'test-deployment' or package == 'docker-compose-ingress':
1010
package_dir = 'utils/{}'.format(package)
1111
docker_build('speckle/speckle-{}'.format(package),
1212
context='../..',

.circleci/deployment/Tiltfile.helm

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@ helm_resource('minio',
6666
deps=['./values/minio.values.yaml'],
6767
labels=['speckle-dependencies'])
6868

69-
helm_resource('redis',
70-
release_name='redis',
71-
namespace='redis',
72-
chart='oci://registry-1.docker.io/bitnamicharts/redis',
73-
flags=['--version=18.7.1',
74-
'--values=./values/redis.values.yaml',
69+
helm_resource('valkey',
70+
release_name='valkey',
71+
namespace='valkey',
72+
chart='oci://registry-1.docker.io/bitnamicharts/valkey',
73+
flags=['--version=3.0.8',
74+
'--values=./values/valkey.values.yaml',
7575
'--kube-context=kind-speckle-server'],
76-
deps=['./values/redis.values.yaml'],
76+
deps=['./values/valkey.values.yaml'],
7777
labels=['speckle-dependencies'])
7878

7979
#FIXME this helm chart does not deploy any containers, so tilt incorrectly believes it never gets to a final state
@@ -98,11 +98,11 @@ helm_resource('ingress-nginx',
9898
release_name='ingress-nginx',
9999
namespace='ingress-nginx',
100100
chart='ingress-nginx-repo/ingress-nginx',
101-
flags=['--version=^4.8.0',
101+
flags=['--version=4.8.0',
102102
'--values=./values/nginx.values.yaml',
103103
'--kube-context=kind-speckle-server'],
104104
deps=['./values/nginx.values.yaml'],
105-
resource_deps=['postgresql', 'minio', 'redis', 'ingress-nginx-repo'],
105+
resource_deps=['postgresql', 'minio', 'valkey', 'ingress-nginx-repo'],
106106
labels=['speckle-dependencies'])
107107

108108
# Uncomment the below, and comment out the other helm_resource('speckle-server'...) to use the speckle-server helm chart
@@ -113,7 +113,7 @@ helm_resource('ingress-nginx',
113113
# namespace='speckle-server',
114114
# chart='speckle-server-repo/speckle-server',
115115
# deps=['./values/speckle-server.values.yaml'],
116-
# resource_deps=['postgresql', 'minio', 'redis', 'ingress-nginx','speckle-server-repo'],
116+
# resource_deps=['postgresql', 'minio', 'valkey', 'ingress-nginx','speckle-server-repo'],
117117
# flags=['--values=./values/speckle-server.values.yaml', '--devel'],
118118
# labels=['speckle-server'])
119119

@@ -144,7 +144,7 @@ helm_resource('speckle-server',
144144
'webhook_service.image',
145145
],
146146
deps=['../../utils/helm', './values/speckle-server.values.yaml'],
147-
resource_deps=['postgresql', 'minio', 'redis', 'ingress-nginx'],
147+
resource_deps=['postgresql', 'minio', 'valkey', 'ingress-nginx'],
148148
labels=['speckle-server'])
149149

150150
# TODO this is not yet working as it is expecting the updated version of the test container which is not yet released as of 2.17.16

.circleci/deployment/manifests/speckle-server.secret.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v1
22
data:
33
s3_secret_key: 'bWluaW9hZG1pbg=='
44
session_secret: 'c3BvcmtsZXNzcHJlY2tsZXNzcGVrbGU='
5-
redis_url: 'cmVkaXM6Ly86cmVkaXNAcmVkaXMtbWFzdGVyLnJlZGlzLnN2Yy5jbHVzdGVyLmxvY2FsOjYzNzk='
5+
redis_url: 'cmVkaXM6Ly86dmFsa2V5QHZhbGtleS1wcmltYXJ5LnZhbGtleS5zdmMuY2x1c3Rlci5sb2NhbDo2Mzc5Cg=='
66
postgres_url: 'cG9zdGdyZXNxbDovL3NwZWNrbGU6c3BlY2tsZUBwb3N0Z3Jlc3FsLnBvc3RncmVzLnN2Yy5jbHVzdGVyLmxvY2FsOjU0MzIvc3BlY2tsZQo='
77
kind: Secret
88
metadata:
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
apiVersion: v1
22
kind: Namespace
33
metadata:
4-
name: 'redis'
4+
name: 'valkey'

.circleci/deployment/values/nginx.values.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ controller:
33
hostNetwork: true
44
admissionWebhooks:
55
enabled: false
6+
# progressDeadlineSeconds: 600 #HACK helm chart was complaining that this was less than minReadySeconds https://github.com/kubernetes/ingress-nginx/blob/c72441585e1ab1a32df86e760613d36fa804315d/charts/ingress-nginx/templates/controller-deployment.yaml#L26
67
tcp:
78
5433: 'postgres/postgresql:5432'
8-
6380: 'redis/redis-master:6379'
9+
6380: 'valkey/valkey-primary:6379'
910
9002: 'minio/minio:9000'
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
architecture: standalone
22
auth:
3-
password: redis
3+
password: valkey

.circleci/update_helm_documentation.sh

Lines changed: 0 additions & 71 deletions
This file was deleted.

.husky/pre-commit

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,27 @@
22
# shellcheck disable=SC1091
33
set -e
44

5-
if [ -n "$CI" ]
6-
then
7-
echo "running eslint"
8-
yarn eslint:projectwide
9-
echo "...eslint done"
10-
echo "running prettier"
11-
yarn prettier:check
12-
echo "...prettier done"
13-
else
145
# shellcheck disable=SC1090
15-
. "$(dirname "$0")/_/husky.sh"
16-
yarn lint-staged
17-
fi
18-
19-
echo "🔍 looking for additional linter dependencies"
6+
. "$(dirname "$0")/_/husky.sh"
7+
yarn lint-staged
208

219
check_dependencies_available() {
10+
echo "🔍 looking for additional linter dependencies"
2211
for i in "${@}"
2312
do
2413
if ! command -v "${i}"; then
2514
echo "No ${i} executable found skipping additional checks" >&2
2615
exit 0
2716
fi
2817
done
18+
echo "✅ All additional dependencies found"
2919
}
3020

31-
additional_dependencies=""
32-
if [ -z "${CI}" ]; then
33-
additional_dependencies=" ggshield"
34-
fi
35-
3621
# shellcheck disable=SC2086
37-
check_dependencies_available pre-commit hadolint helm shellcheck circleci${additional_dependencies}
22+
check_dependencies_available pre-commit hadolint helm shellcheck circleci ggshield
23+
24+
echo "🍵 Updating JSON schema for Helm chart"
25+
yarn helm:jsonschema:generate
3826

39-
echo "All systems functional, running additional pre-commit checks..."
27+
echo "▶️ Running pre-commit hooks"
4028
pre-commit run --all-files

0 commit comments

Comments
 (0)