Commit Graph

39 Commits

Author SHA1 Message Date
Iain Sproat 4d01e13a84 feat(structured logging) (#1242)
* Revert "Revert structured logging 2 (#1240)"
This reverts commit 78ecaeffcb.
* Logging should not be bundled into core shared directory
* making sure observability stuff isnt bundled into frontend


Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
2022-12-06 11:51:18 +00:00
Iain Sproat 78ecaeffcb Revert structured logging 2 (#1240)
* Revert "'@' shortcut must come after it is configured in bootstrap (#1239)"

This reverts commit 967329473f.

* Revert "Structured logging (attempt 2) (#1234)"

This reverts commit 444d2ca7dd.
2022-12-05 15:46:09 +00:00
Iain Sproat 444d2ca7dd Structured logging (attempt 2) (#1234)
* Revert "Revert "feat(structured logging): implements structured logging for backend (#1217)" (#1227)"

This reverts commit 63e6581162.

* Use pino-http instead of express pino logger
* Use correct reference to knex and do not instantiate HttpLogger prematurely
* Adds missing dependency for pino to webhook-service
* Do not instantiate middleware when passed to express
* Refactor to move logging into shared
* Copy shared packages into dockerfiles
* Build shared workspace in docker build-stage for fileimport & webhook
2022-12-05 14:49:52 +00:00
Iain Sproat 63e6581162 Revert "feat(structured logging): implements structured logging for backend (#1217)" (#1227)
This reverts commit 84cb74e8b3.
2022-11-25 16:57:28 +00:00
Iain Sproat 84cb74e8b3 feat(structured logging): implements structured logging for backend (#1217)
* each log line is a json object
* structured logging allows logs to be ingested by machines and the logs to be indexed and queried addresses #1105
* structured logging allows arbitrary properties to be appended to each log line, and ingestion of logs to remain robust
* Structured logging provided by `pino` library
* Add `express-pino-logger` dependency
* Remove `debug`, `morgan`, and `morgan-debug` and replace with structured logging
* `console.log` & `console.error` replaced with structured logging in backend
* Remove `DEBUG` environment variable and replace with `LOG_LEVEL`
- Note that there is a test which reads from a logged line on `stdout`. This is not robust, it would be better to use the childProcess.pid to look up the port number.
* Log errors at points we explicitly send error to Sentry
* Amend indentation of a couple of log messages to align indentation with others
2022-11-25 16:05:05 +00:00
Gergő Jedlicska 3d6653f73b hotfix/2.9.2 (#1175)
* Update to new specklepy (#1173)

* Publish images for all branches but limit tagging
* only tag 'latest' and '2' when 'SHOULD_PUBLISH' variable is 'true'

* Publishing helm chart should check for `SHOULD_PUBLISH`

* Move blocking step to publish-helm chart, and allow images to be published

* Pin python requirements and bump to latest versions

* Fix EOL whitespace

* use valid version for psycopg2-binary (the clue is in the 2!)

* fix(fileimports): add exception printing to file imports

* fix(fileimports): bump specklepy version

move to a specklepy version that contains a fix for send without writing to disk

Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>

* Fixes liveness and readiness checks to prevent CSRF error message (#1169)

- provides content-type header
- check that status code is 200

* Fixes broken helm template by adding quotation marks around liveness probe command (#1171)

* fix(server activities): make sure the stream events are properly dispatched

* feat(server webhooks): add scheduled orphaned webhook cleanup

* test(server webhooks): add test to webhook cleanup service

* feat(server webhooks): drop foreign key reference for webhooks schema to streams

* refactor(server req context): refactor req context to have the ip attribute for all requests

* feat(server objects rest api): add ratelimits to objects rest api endpoints

* fix(server rest api): properly handle returning 419

Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
2022-11-09 13:23:32 +01:00
Kristaps Fabians Geikins db6a3e9367 refactor(server): apollo server v2 -> v3 migration (#1071) 2022-10-06 11:12:16 +03:00
Kristaps Fabians Geikins b966f20fdb refactor(server): typescript support (#874)
Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2022-08-04 14:21:39 +02:00
Kristaps Fabians Geikins da9224a069 feat: server & stream invites rework
feat: server & stream invites rework

Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-07-19 13:01:19 +03:00
Gergő Jedlicska 0ac118e05c (refactor) server for less app-root-path 2022-05-03 13:10:00 +02:00
Fabians 1c7436e7ff extra prefer-const & object-shorthand 2022-04-04 19:00:24 +03:00
Gergő Jedlicska d53df11f77 style(server): fix all eslint errors and break the tests 2022-03-31 14:18:44 +02:00
Gergő Jedlicska 569b4688fa style(all): reformat with print width 88 2022-03-29 19:46:49 +02:00
Fabians aa5e94d640 chore: reformatting everything with prettier 2022-03-29 17:12:31 +03:00
Kristaps Fabians Geikins 8010bf3c4c feat: Standardized & cleaned up formatting & linting across repo #617 (#618)
* feat: Standardized & cleaned up formatting & linting across repo

Co-authored-by: Kristaps Fabians Geikins <fabians@speckle.systems>
Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2022-03-16 10:10:30 +02:00
Gergő Jedlicska 799589b5fe Merge pull request #575 from specklesystems/unittestRefactor
Rework test hooks
2022-02-08 12:29:24 +01:00
Cristian Balas 9329265708 Upgrade dependencies (#577) 2022-02-07 14:04:26 +02:00
Gergő Jedlicska 68a4a95d90 refactor(server): rework test hooks
drop db migration before and after hooks, add helpers and root hooks

fix #531
2022-02-05 15:05:17 +01:00
Gergő Jedlicska 8050c30d6d test((server) archival tests): add archived user scope tests
also i'm trying to fix flaky tests
2021-11-04 13:33:22 +01:00
cristi8 30416effe9 Merge branch 'webhooks' of github.com:specklesystems/speckle-server into webhooks 2021-07-21 21:03:04 +03:00
cristi8 d629133e41 fixed tests 2021-07-21 21:02:53 +03:00
izzy lyseggen 706889f537 Merge pull request #350 from specklesystems/izzy/webhooks
fix(server): webhooks mutations tests
2021-07-21 18:46:35 +01:00
cristi8 157db23f45 Added server info and user info to webhook payload 2021-07-21 20:45:57 +03:00
izzy lyseggen 1adb39f02b fix(server): webhooks mutations tests
forgot to push this commit before merge ah sorry!!!
2021-07-21 18:44:09 +01:00
izzy lyseggen eb829d9ded fix(server): webhook permissions fixes 2021-07-20 16:39:22 +01:00
cristi8 4f17a66866 added id field on commit_create events, improved webhooks migration 2021-07-20 11:10:27 +03:00
izzy lyseggen 32808437e5 feat(frontend): webhooks / settings ui 2021-07-16 12:54:00 +01:00
izzy lyseggen 26cb15251d fix(webhooks): remove unuse field 2021-07-13 09:38:15 +01:00
izzy lyseggen e7a48adbb2 test(webhooks): try a diff port? 2021-07-13 09:32:00 +01:00
izzy lyseggen 259c0b8e5d test(webhooks): integrate changes 2021-07-13 09:21:34 +01:00
izzy lyseggen 9a37942138 test(webhooks): add gql tests 2021-07-13 09:18:42 +01:00
cristi8 2bb27524a4 renamed webhooks_config:events column to triggers 2021-07-13 11:16:15 +03:00
cristi8 46565605fd webhook events should be presented as a list of strings 2021-07-13 10:25:00 +03:00
izzy lyseggen 7e47ef1bc5 Merge pull request #331 from specklesystems/izzy/webhooks
feat(webhooks): initial gql queries & mutations
2021-07-12 09:36:29 +01:00
cristi8 ddc86eb157 Webhooks - microservice + hooks into activityStreams 2021-07-12 11:32:54 +03:00
izzy lyseggen 8ebc87419a feat(webhooks): add event history to gql query 2021-07-09 16:06:24 +01:00
izzy lyseggen 0141385adf feat(webhooks): remove secret from query 2021-07-09 15:35:08 +01:00
izzy lyseggen 8577d6a7a9 feat(webhooks): initial gql queries & mutations 2021-07-09 15:09:49 +01:00
cristi8 942cee1023 webhooks server component: db migration, service, tests 2021-07-07 13:27:35 +03:00