* feat(regions): repo functions for copying project branches and commits
* chore(regions): wire up move to resolver
* chore(regions): successful basic test of project region change
* fix(regions): sabrina carpenter please please please
* fix(regions): repair multiregion test setup
* chore(regions): appease ts
* chore(multiregion): update test multiregion config
* chore(multiregion): fix test docker config and test
* chore(multiregion): use transaction
* chore(multiregion): maybe this will work
* fix(multiregion): drop subs synchronously
* chore(multiregion): desperate test logs
* chore(multiregion): somehow that worked?
* chore(multiregion): add load-bearing log statement
* chore(multiregion): move services
* fix(multiregion): test drop waits
* chore(regions): fix import
* chore(regions): make test a bit more thorough for good measure
* fix(regions): speed up inserts
* fix(regions): ignore workspace conflict on move
* chore(server): graceful shutdown
- stop() on the apollo server should be called
* chore(server): gracefully drain apollo server
* Allow grace period to be configured
* Terminus manages the readiness and liveness endpoints
* terminus is responsible for stopping the graphql server
* remove logging on shutdown
* Remove redundant parameter
* move healthchecks out of business modules to top-level directory
- terminus can only handle readiness check, not liveness
- app needs to return readiness handler, so that server terminus can use it
* fix tests
* Fix broken merge
* fix broken merge
* incorporate review comments
* fix invalid merge
* fix readinesscheck not being passed as parameter
* feat(webhooks): multi region webhook resolver
* feat(webhooks): multi region webhook cleanup
* fix(webhooks): DI fixes
* feat(activitystream): region aware save activity
* feat(accessrequests): multi region
* feat(cli): allow multi region project and commit download
* feat(postgres): make docker postgres 0 day multi region ready
* feat(cli): allow multi region project and commit download properly
* fix(cross-server-sync): di fix
* feat(activitystream): non region aware activities, they are not project data
* fix(webhooks): triggers need to be included
* feat(stream/projectCreate): activity save is not needed any more, its all event based
* feat(multiRegion): get all registered db clients
* fix(regions): test equal in any order
* fix(projectDownload): need to await
* fix(file import): server port was broken when localhost was canonical url
- use getServerOrigin() instead of directly calling process.env.CANONICAL_URL
- where server is calling itself, use 127.0.0.1 instead of CANONICAL_URL.
- where server is calling itself (i.e. 127.0.0.1, use the server's listening port and not default for protocol http/80, https/443
- tidy some areas where process.env was called directly; should use envHelper.
* fix tests
* chore(webhooks): fix test failing when running alone
* chore(webhooks): create domain types and repository
* chore(webhooks): create webhook refactor multiregion
* chore(webhooks): triggers field is required in graphql schema
* 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>
* 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.
* 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
* 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
* 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>