Commit Graph

133 Commits

Author SHA1 Message Date
Iain Sproat 43b0190720 Merge branch 'main' into iain/ratelimiter-should-respect-configuration 2025-05-19 13:37:26 +01:00
Iain Sproat 5cf56a3a24 remove irrelevant nesting 2025-05-13 08:46:12 +01:00
Iain Sproat 965d6b3fb6 User errors should be info, not error level 2025-05-13 08:42:40 +01:00
Iain Sproat 163928d9b4 fix(server): log errors at appropriate level
- some objects endpoints were logging user-related errors at an incorrect log level
2025-05-13 08:32:11 +01:00
Iain Sproat 413937c0fa Merge branch 'main' into iain/ratelimiter-should-respect-configuration 2025-04-28 08:16:19 +01:00
Iain Sproat 920099c39f chore(readable code): use TIME_MS for readable durations
- we recently added TIME_MS helper; this applies it to existing durations
2025-04-18 17:51:43 +01:00
Iain Sproat fb95dd3bdd Merge branch 'main' into iain/ratelimiter-should-respect-configuration 2025-02-28 09:23:48 +00:00
Iain Sproat ce08e5e02d refactor(server): logging directory renamed to observability (#4077) 2025-02-28 08:43:54 +00:00
Iain Sproat 8d1aceb7fc incorporate PR review comment - set rate limit enabled once 2025-02-25 11:37:51 +00:00
Iain Sproat c593990b22 Move ratelimiter from services to utils 2025-02-25 09:27:24 +00:00
Iain Sproat 62b65bb566 wrap the logic into a callable function and add tests 2025-02-24 12:26:34 +00:00
Iain Sproat f42a3f1eef Use the same logic as the default error handler 2025-02-23 13:43:24 +00:00
Iain Sproat aecc16f04f handle rate limit error when registering users 2025-02-23 13:16:45 +00:00
Iain Sproat d2436e3a4d fix(ratelimiter): do not check rates if rate limiter disabled 2025-02-21 17:45:31 +00:00
Kristaps Fabians Geikins 1d2a594f0a chore: upgrade TS 5.2 -> 5.7.3 & ESLint to 9.20.1 (#4032)
* chore: upgrade TS 5.2 -> 5.7.3

* vite dts fix

* lint fix

* resolutions fix

* ui comp build fix

* precommit fix?

* latest eslint version

* autoloader fix

* undo unnecessary viewer change

* eslint fixes fe2 + trying disabled type linting

* lint fixes
2025-02-20 14:18:18 +02:00
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