Commit Graph

118 Commits

Author SHA1 Message Date
Iain Sproat 1c0b6e228d chore(server/middleware): allow CORS to be configurable (#4018)
- renames corsMiddleware to corsMiddlewareFactory to follow naming convention
- optionally allow cors middleware to be configured
- amend direct calls of `cors` package to now use middleware factory
2025-02-18 13:50:34 +00:00
Iain Sproat 0c83919ca2 chore(server): one error handler for logging the other for metrics (#4005) 2025-02-17 16:55:48 +00:00
Gergő Jedlicska c4a6da410b feat(core): drop the closure table pls (#3900)
* feat(core): drop the closure table pls

* feat(core): remove closures feature flag

* feat(core): remove more closure stuff

* feat(core): only drop closure table if it exists
2025-02-07 14:06:53 +01:00
Iain Sproat 947f8fd4fa fix(server/database streams): remove event listener on batch completion (#3938) 2025-02-05 15:16:22 +00:00
Iain Sproat a4521d46a1 fix(logging): user-input issues should not be logged as error level (#3935)
* fix(logging): reduce user-input issues being logged as error

* error logging middleware should better handle caught errors
2025-02-05 15:08:10 +00:00
Iain Sproat 752041dba6 fix(server & preview-service): apply fix #3921 to all db streams (#3929) 2025-02-04 11:40:00 +00:00
Iain Sproat 55315feb59 fix(server/diffdownload): fix the bug where client connection close events were not propogated to the database stream connection (#3921)
* WIP: trying to catch a bug

* great success

* reinstate gzip

* Remove feature flag

* remove stream-chain dependency

* remove superfluous logging lines

* re-align with original where possible

* re-align package.json

* More re-alignment with main branch before the previous 'fix'

* A smaller failing example
2025-02-04 11:09:53 +01:00
Iain Sproat c59e6043bb fix(server/errors): derive errors from BaseError (#3918) 2025-01-30 18:15:56 +01:00
Iain Sproat 32c310f849 fix(server/objects): solves database connection resource leak when client connections are prematurely closed (#3889) 2025-01-28 15:56:21 +01:00
Gergő Jedlicska 678e31d046 feat(server): ping endpoint (#3816) 2025-01-15 13:00:20 +01:00
Iain Sproat ce9f154e80 fix(server): diff upload and download can handle JSON parsing errors (#3759) 2025-01-03 07:59:33 +00:00
Iain Sproat 35eb2090bc fix(POST /api/file): REST API endpoint returns json content-type (#3463) 2025-01-02 10:15:39 +00:00
Alessandro Magionami 11beefeada feat(gatekeeper): readOnly validation logic 2024-12-16 10:17:16 +01:00
Kristaps Fabians Geikins 8d0cbad8b6 feat(server): multi region blob support (#3653)
Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
2024-12-10 09:05:18 +00:00
Iain Sproat 083999da46 chore(server/logging): use message template instead of runtime formatting (#3638)
- reduce the cardinality of messages, to allow filtering by message template
2024-12-05 12:02:48 +00:00
Gergő Jedlicska 2e3e8bed1d gergo/sendReceiveMultiRegion (#3461)
* 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

* feat(objects): use project region for send and receive
2024-11-08 14:46:36 +01:00
Iain Sproat de4235a9d0 chore(healthchecks): refactor out of modules (#3465) 2024-11-08 13:36:02 +00:00
Kristaps Fabians Geikins 913696cb0c chore(server): core IoC #105 - remaining js rest to ts 2024-10-22 12:52:14 +03:00
Kristaps Fabians Geikins 284d94f8ca chore(server): core IoC #104 - validatePermissionsWriteStreamFactory 2024-10-22 12:22:36 +03:00
Kristaps Fabians Geikins b128d13dbe chore(server): core IoC #103 - validatePermissionsReadStream 2024-10-22 12:16:04 +03:00
Kristaps Fabians Geikins 9d90451d1c chore(server): core IoC #98 - hasObjectsFactory 2024-10-21 17:49:31 +03:00
Kristaps Fabians Geikins b373e446b3 chore(server): core IoC #97 - getObjectsStreamFactory 2024-10-21 17:49:14 +03:00
Kristaps Fabians Geikins 35ddd6501e chore(server): core IoC #93 - getObjectChildrenStreamFactory 2024-10-18 16:43:02 +03:00
Kristaps Fabians Geikins 4cf520be06 chore(server): core IoC #92 - getFormattedObjectFactory 2024-10-18 16:14:45 +03:00
Kristaps Fabians Geikins 368961c0dd chore(server): core IoC #90 - createObjectsBatchedAndNoClosuresFactory 2024-10-18 16:13:44 +03:00
Kristaps Fabians Geikins 0b0a3dca87 chore(server): core IoC #89 - createObjectsBatchedFactory 2024-10-18 16:13:25 +03:00
Alessandro Magionami bcc3e56e65 Merge pull request #3316 from specklesystems/fabians/core-ioc-78
chore(server): core IoC #78 - getServerInfoFactory
2024-10-17 12:14:12 +02:00
Kristaps Fabians Geikins f27f289dc6 chore(server): core IoC #78 - getServerInfoFactory 2024-10-17 12:37:43 +03:00
Adam Hathcock 86f5c3da2b Add stream destroy where db streams are used on download (#3300) 2024-10-17 11:35:39 +02:00
Iain Sproat 1245068590 fix(logging): log errors thrown before request context is present (#3165) 2024-10-10 10:25:29 +01:00
Kristaps Fabians Geikins 5b5dd201e2 chore(server): IoC 29 - getStream(s)Factory 2024-10-09 10:39:00 +03:00
Gergő Jedlicska 7fbda629b7 feat(sso): early sso testing
* feat(workspaces): add workspace sso feature flag

* feat(workspaceSso): wip validate sso

* feat(workspaces): validate and add sso provider to the workspace with user sso sessions

* feat(workspaces): validate and add sso provider to the workspace with user sso sessions
2024-10-01 17:15:25 +01:00
Iain Sproat 0c9aba691e fix(server): properly log thrown errors (#3072) 2024-09-25 11:10:43 +02:00
Iain Sproat 3c9d9f8e3c chore(server): log graphql websocket connection, disconnection, and subscription events (#2690) 2024-09-06 12:17:46 +01:00
Iain Sproat 81d072a865 chore(server): convert some files to typescript with minimal changes (#2738) 2024-08-23 13:07:22 +02:00
Iain Sproat 6715a030ec fix(server/auth): database errors result in 500 status code (#2731)
* fix(server/auth): database errors result in 500 status code
- previously 401 were returned which resulted in connectors not retrying

* log as info, not error. Handle errors while validating read

* Unknown errors should continue to be bubbled up the stack
2024-08-22 15:39:37 +02:00
Iain Sproat 8ed98d8404 chore(diff download): close stream as recommended by knex (#2723) 2024-08-22 10:23:35 +01:00
Iain Sproat 4d82e1f575 fix(/api/diff): fix debug log pollution (#2704) 2024-08-20 12:52:50 +01:00
Iain Sproat 9b09114b2e fix(logging): premature stream close should be info (#2673)
- we want to be able to correlate this behaviour with free connections for the meantime
2024-08-16 12:48:43 +01:00
Iain Sproat 6d6d37b007 fix(server/api/getobjects): handle closing of client stream (#2669) 2024-08-16 09:16:03 +01:00
Iain Sproat a262d7d126 chore(liveness): fail liveness if db conns saturated for 10min (#2648)
* chore(liveness): fail liveness if db conns saturated for 2min

* Increase to 10min timeout
2024-08-13 18:41:04 +02:00
Iain Sproat 60251e45cb Revert "fix(server): revert 55cad9662a (#2633)" (#2650)
This reverts commit f2c5677b4a.
2024-08-13 11:48:20 +01:00
Iain Sproat f2c5677b4a fix(server): revert 55cad9662a (#2633)
* Revert "refactor(server/upload): convert js to ts (#2618)"

This reverts commit e9f7286f67.

* Revert "feat(logging): pass request logger to core/services/objects (#2599)"

This reverts commit ee3e9af78d.

* Revert "feat(server): configurable maximum objects POST size and improved logging (#2594)"

This reverts commit 55cad9662a.
2024-08-12 10:26:53 +01:00
Iain Sproat e9f7286f67 refactor(server/upload): convert js to ts (#2618) 2024-08-09 10:00:46 +01:00
Iain Sproat ee3e9af78d feat(logging): pass request logger to core/services/objects (#2599)
* chore(logging): include additional detail on object upload logs

* allow max file size to be configurable

* feat(logging): add logger to core/services/objects

* fix log line

* fix tests

* typo

* fix variable name

* convert values to megabytes

* calculating memory was causing the system to freeze

* calculating memory was causing the system to freeze

* DRY the logging metadata

* all required variables should be passed to calculateLogMetadata

* fix many things with the logging
2024-08-09 10:15:37 +02:00
Iain Sproat 55cad9662a feat(server): configurable maximum objects POST size and improved logging (#2594) 2024-08-08 16:19:25 +01:00
Iain Sproat d9f9da77f4 chore(readiness): server pods are not ready if no free db connections (#2552)
- adds high frequency metrics for knex connections
2024-08-07 11:07:34 +01:00
Iain Sproat b002df6cd4 feat(server/logs): add request ID to objects retrieval log messages (#2550) 2024-08-01 12:21:05 +01:00
Gergő Jedlicska 4ab1afc190 fix(objects): proper log templating (#2398) 2024-06-20 11:41:52 +02:00
Iain Sproat c10ec8708d fix(healthcheck): close redis client after request is complete (#2394) 2024-06-18 16:37:19 +01:00