31 Commits

Author SHA1 Message Date
Gergő Jedlicska 520e931211 Gergo/web 3685 create new standalone python app for speckleifc based parser (#5051)
* feat(backgroundjobs): add new background jobs module for file imports
queueing

* fix(fileuploads): a merge gone wrong

* feat(backgroundjobs): rename rhino queue env var

* test(backgroundjob): use deep equal claude

* fix(fileuploads): sync PR review

* feat(ifc_importer): initial importer app implementation with a sleeping
worker

* chore(pre-commit): remove black as a formatter, its now handled by ruff

* fix(ifc-importer): better handling of max job attempt

* feat(eslint): ignore package from eslint
2025-07-11 20:12:43 +02:00
Iain Sproat 9604f5d9fb chore(helm test): remove obsolete build args (#4928)
* fix(helm test): pass in env vars at runtime not build time
- we configure the test at runtime, not buildtime
- we were never setting these build args at build time, so they were obsolete

* remove unnecessary build arg from server Dockerfile
2025-06-12 10:28:46 +01:00
Iain Sproat ec98f8d4cb chore(fe1): remove deprecated frontend (#3998)
---------

Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
2025-02-18 12:36:52 +00:00
Iain Sproat e6adceda6c chore(Dockerfile): use COPY --link flag (#3869) 2025-01-22 15:03:13 +00:00
Iain Sproat d32e3c0a71 chore(CI): temporarily disable docker compose deployment test & other fixes for race condition in docker compose deployment test (#2553) 2024-08-01 12:15:35 +01:00
github-actions[bot] a79680da00 Update image digests (#2203)
Signed-off-by: specklebot <devops@speckle.systems>
Co-authored-by: specklebot <devops@speckle.systems>
2024-06-18 10:18:46 +01:00
dependabot[bot] 458ab11682 chore(deps): bump requests in /utils/test-deployment (#2386)
Bumps [requests](https://github.com/psf/requests) from 2.31.0 to 2.32.2.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.31.0...v2.32.2)

---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 10:03:34 +01:00
github-actions[bot] 11b62f3824 Update image digests (#2189)
Signed-off-by: specklebot <devops@speckle.systems>
Co-authored-by: specklebot <devops@speckle.systems>
2024-04-09 10:05:32 +01:00
github-actions[bot] bbe48effd0 Update image digests (#2139)
Signed-off-by: specklebot <devops@speckle.systems>
Co-authored-by: specklebot <devops@speckle.systems>
2024-03-15 16:42:10 +00:00
github-actions[bot] 4418932832 Update image digests (#2040)
Signed-off-by: specklebot <devops@speckle.systems>
Co-authored-by: specklebot <devops@speckle.systems>
2024-02-23 12:42:29 +00:00
github-actions[bot] 8185683b4a Update image digests (#1966)
Signed-off-by: specklebot <devops@speckle.systems>
Co-authored-by: specklebot <devops@speckle.systems>
2024-02-09 01:13:48 +00:00
Iain Sproat c979c97879 chore(helm chart test): tests can be run in environment with self-signed certificate (#1997)
- introduces a VERIFY_CERTIFICATE environment variable
2024-01-26 16:28:27 +00:00
github-actions[bot] 36f749b24a chore(deps): bump image digests (#1939)
* fix(github action): use correct format for author & committer git signing

* Update image digests

Signed-off-by: specklebot <devops@speckle.systems>

---------

Signed-off-by: specklebot <devops@speckle.systems>
Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
Co-authored-by: specklebot <devops@speckle.systems>
2024-01-05 15:57:25 +00:00
Iain Sproat b396029cf6 chore(Dockerfile): bump images to debian bookworm, pin images by digest, and github action to auto-bump (#1937)
* chore(Dockerfile): pin images by digest this ensures consistent builds with images pinned by SHA
* introduces a GitHub Action will create a PR to update the images when there is a new version, and will pin to that newer version SHA.

* Bump debian to 12 'bookworm'
* Bump pypi libraries
  * except frontend-1, as only debian 11 is currently supported by openresty
* Bump debian packages
2024-01-05 11:51:04 +00:00
Iain Sproat 54829ec257 fix(helm test): works with frontend2 (#1693) 2023-07-13 13:02:03 +01:00
dependabot[bot] c878cddee2 build(deps): bump requests in /utils/test-deployment (#1588)
Bumps [requests](https://github.com/psf/requests) from 2.28.1 to 2.31.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.28.1...v2.31.0)

---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 11:47:46 +01:00
Iain Sproat 96bed71022 fix(logging): Improves error logging and pretty-prints logs during dev & test (#1255)
* Improves error logging
- use pino error logger correctly by passing in error as first argument

* monitor deployment: Filter logging at INFO level and above
* Use structured logging to create parameters for monitoring results
* Add structured logging to obj fileimport service
* Fileimport service, fix and improve logging
    - use child logger with additional context where possible
    - select appropriate logging level
- fix duplicated context in log statement
* REST endpoints, add context to structured logging and remove same context from message
* Webhook service provides context to bound logger to properly use structured logging
    - Pass bound logger containing context to `makeNetworkRequest`
    - do not log url, as it may contain a secret (like Discord's webhook urls), instead log the webhook Id
     - log error message when network call fails
* upload: make better use of structured logging when recording data
* pino-pretty when in dev or test mode
    - pino-pretty configured to send to stderr
* LOG_PRETTY env var
* Silence structured logging during testing
     - can not rely on determining the port number by reading from stdout/stderr
     - instead we determine which port is free, then create our server on that port
     - we then poll that port until the server is ready before commencing tests
* Allow puppeteer to install chromium
* Do not need to install chromium separately
2022-12-13 09:18:28 +00:00
Iain Sproat d0828693ff Enable python linting/formatting in pre-commit (#1257)
- fix all the linting/formatting issues
2022-12-09 11:20:45 +00:00
Iain Sproat d09bce7267 feat(docker images): Distroless (#935)
* Moves speckle-server, webhook-service, fileimport-service, monitoring-deployment, and test-deployment images to Distroless.

Partially addresses https://github.com/specklesystems/speckle-server/issues/883

* preview-service uses similar image for building and production stages
* explicitly include chromium-common dependency to prevent error in preview service
* Bump chromium packages due to package versions not being found
* Handle machine-id in distroless
    - distroless has no shell, so node-machine-id will result in an error
    - this commit introduces error handling and defaults to a uuid v4 in the case of an error
* Update binary location for readiness and liveness checks to match the binary location in Distroless
* Allow node binary path to be set as environment variable in fileimport service
2022-12-07 12:07:42 +00:00
Iain Sproat 3d4b3b6979 Pin python requirements and bump to latest versions (#1140)
* Pin python requirements and bump to latest versions
* fix(fileimports): add exception printing to file imports

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2022-11-01 11:17:03 +00:00
Kristaps Fabians Geikins 029aabf432 chore: getting rid of unnecessary deployment test (#1083) 2022-10-06 11:45:44 +03:00
Gergő Jedlicska 2aefbd27e1 fix(test-deployment container): fix frontend readiness tests with new vite bundling changes (#1078) 2022-10-05 17:11:13 +02:00
Iain Sproat b61f0ffabe Cilium network policies (#954)
* feat(helm chart): deployes Cilium Network Policies when configured

Cilium Network Policies provide more features over regular Kubernetes Network Policies, but Cilium
is not available everywhere.  When selected by an operator, Cilium Network Policies will be deployed
instead of Kubernetes Network Policies.

Fixes https://github.com/specklesystems/speckle-server/issues/913

* Cilium Network Policy for fileimport service.
* tested only for external host.
* Still to test internal pod and external IP.

* Cilium network policy for file import service restricts DNS

* allows egress to service instead of endpoint
* file import service uses service url of speckle-server
* helper functions for server and dns

* DRY the prometheus selector

* CiliumNetworkPolicy for frontend

* CiliumNetworkPolicy for monitoring service

* CiliumNetworkPolicy for preview service

* CiliumNetworkPolicy for test

* CiliumNetworkPolicy for webhook_service

* CiliumNetworkPolicy for Server

* Test should egress to domain, not internally

* Test should be in tests directory to match Helm convention for tests
* Test should explicitly deny ingress from everywhere

* Server needs to egress to canonical domain (i.e. itself)

- DNS and egress for canonical domain added to Server
- As Test also egresses via canonical domain to access Server, we do not require the intra-cluster ingress to the server from the test pod
- Explicitly deny all egress from frontend

* WIP update to schema.json

* Breaking Change: inCluster network policies supported for cilium

* Breaking change: kubernetes network policy podSelector and namespaceSelector are now at a different level
* Updates schema.json

* add notes to remove egress once bug is fixed
2022-08-24 17:25:08 +02:00
Iain Sproat 44bd5919f8 Revert "perf(Docker images): production images are based on distroless (#899)" (#934)
This reverts commit 7fe41b1fb2.
2022-08-16 16:42:59 +01:00
Iain Sproat 7fe41b1fb2 perf(Docker images): production images are based on distroless (#899)
- perf(server, webhook-service): production images are based on distroless

Reduces image file size by >40% for images which can use distroless base image.  As
well as improving boot-up & restart time (via smaller download & load size), Distroless reduces the
attack surface area by removing almost all binaries & packages (e.g. shell, chown) that are not
necessary to run node.

- ensures distroless node images run tini
- removes fonts-dejavu-core and fontconfig from speckle-server
- Remove man and doc files if they exist
- args hoisted to top of Dockerfile and consolidated
- env vars consolidated to prevent additional layers

address https://github.com/specklesystems/speckle-server/issues/883
2022-08-16 16:17:07 +01:00
Iain Sproat 1c5964fc41 Add Hadolint to pre-commit (#848)
* Adds hadolint as pre-commit step
* Addresses all hadolint comments
  * Use noninteractive apt-get frontend and clean after install
  * dockerfile RUN statements are consolidated to prevent additional layers
  * installed packages have pinned versions
* build(circleci): use speckle pre-commit runner with built-in hadolint
* Integrate pre-commit with husky bash script for git pre-commit hooks
  * catches errors in bash
  * if pre-commit is installed, it is run
  * if optional additional binaries are installed, further pre-commit steps are run
* Update README with revised developer instructions
* Adds a pre-commit yarn script
2022-08-09 13:47:02 +01:00
Iain Sproat 81bed0c760 style: at newlines at end of files (#893) 2022-08-08 11:06:56 +02:00
Gergő Jedlicska b037a65aa9 refactor(test-deployment): dockerfile and test script cleanup 2022-01-14 11:07:35 +01:00
Gergő Jedlicska 1f52fd2f8a fix test-deplyoment container build context 2022-01-13 20:04:45 +01:00
Gergő Jedlicska 12fcf99425 build(test-deployment): add Dockerfile and CI to test deployment script
For Helm test operations, a test container is needed, this add a container definition and ci steps
2022-01-13 19:44:25 +01:00
Cristian Balas 2172a06e4f Scripts for DigitalOcean oneclick image (#209) 2021-05-03 15:21:37 +03:00