Commit Graph

103 Commits

Author SHA1 Message Date
Daniel Gak Anagrov 1bf7075ae6 fix(fileimport): nextGen fileimport improvements (#4746) 2025-05-15 13:17:38 +02:00
Daniel Gak Anagrov 82547b1411 feat(fileuploads): nexGenFileUpload populates messages to new job queue (#4702)
* add file import job to nextGen import endpoint

*  moved queue, organized code

* add tests, minor refactoring
2025-05-14 12:32:54 +02:00
Kristaps Fabians Geikins b406d0e32d chore(server): node16 & export maps support for server (#4698)
* chore(server): node16 & export maps support for server

* moar cleanup

* lint fixc
2025-05-12 14:27:34 +03:00
Daniel Gak Anagrov b15d5b836c feat(fileupload): create new endpoint for file upload (#4693)
* fix(server): remove redundant code from bad merge

* wrong router

* WIP: http api for receiving file import results

* Lints

* fix

* WIP: tests

* test fix

* auth middleware has implicit requirement for param named streamId

* complete tests and fixes

* can run the old way alongside the existing, no conflicts

* tidying

* correct error thrown

* feat(fileUploads): new upload endpoint skeleton

* feat(fileUploads): added coverage for new file importer endpoint

* fix(workspaces): added tests, fix bugged on handling after stream

* refactor: removed useless file

* fix: comments, added tests

* feat: added modelId to file upload table

* fix: ensureError log

---------

Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
2025-05-09 00:16:29 +02:00
Iain Sproat 8a74d9cbe3 feat(file importer): server has REST API to receive results about a file import (#4688)
* fix(server): remove redundant code from bad merge

* wrong router

* WIP: http api for receiving file import results

* Lints

* fix

* WIP: tests

* test fix

* auth middleware has implicit requirement for param named streamId

* complete tests and fixes

* can run the old way alongside the existing, no conflicts

* tidying

* correct error thrown

* incorporate review comments
2025-05-08 19:12:15 +02:00
Iain Sproat 15d67ba589 Merge pull request #4121 from specklesystems/iain/refactor-blob-storage
refactor(server/file upload): avoid extra http call
2025-05-07 15:11:15 +01:00
Kristaps Fabians Geikins c6dcf18bdb feat(server): workspace project invite auto-accept (for existing wp members) (#4622)
* WIP ts

* DI fix & tests moved to TS

* auto-accept seems to work

* CR comments
2025-04-30 17:39:07 +03:00
Iain Sproat 65f9a8e9ca Merge changes from main correctly 2025-04-28 15:25:37 +01:00
Iain Sproat 62c8b571f9 Merge branch 'main' into iain/refactor-blob-storage 2025-04-28 15:06:30 +01:00
Iain Sproat baec1e9156 tests(integration/blobs): can anonymously get blob from public project (#4614)
* tests(integration/blobs): can anonymously get blob from public project

* fix public access

* more fixes

---------

Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
2025-04-28 12:26:50 +03:00
Iain Sproat 4529b6b37b Merge branch 'main' into iain/refactor-blob-storage 2025-04-26 08:19:21 +01:00
Kristaps Fabians Geikins eef0a37042 fix: blob upload should use auth policies (#4594)
* fix: blob upload should use auth policies

* tests fix
2025-04-25 09:13:22 +03: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 3c51f89bdb chore(server/logging): add operations logging to fileuploads module 2025-04-14 20:29:43 +01:00
Iain Sproat 74f54bde13 Address review comments 2025-03-31 13:43:49 +01:00
Iain Sproat f75b77e899 push work on to database, simplify application logic 2025-03-31 12:03:43 +01:00
Iain Sproat 3af5ad16fe Add another test 2025-03-31 10:27:28 +01:00
Iain Sproat 5960788da1 add test 2025-03-31 09:53:36 +01:00
Iain Sproat 7376eb4298 Use constant for event name 2025-03-28 15:19:50 +00:00
Iain Sproat c19c7892f4 Refactor REST to different directory and register router 2025-03-28 15:13:59 +00:00
Iain Sproat d8ec2f12c4 feat(file import): expire failed file imports if taking too long 2025-03-28 15:05:44 +00:00
Iain Sproat dd806b0730 Revert "prefer pipeline over .pipe"
This reverts commit 16049b6a92.
2025-03-11 09:46:55 +00:00
Iain Sproat 16049b6a92 prefer pipeline over .pipe 2025-03-10 10:57:54 +00:00
Iain Sproat 3c132f8098 type the busboy event 2025-03-06 21:51:53 +00:00
Iain Sproat c261e39191 tidy 2025-03-06 21:18:26 +00:00
Iain Sproat 6499a11d02 Merge branch 'main' into iain/refactor-blob-storage 2025-03-06 09:12:20 +00:00
Iain Sproat b5201fe8d5 Restore incorrectly deleted db listener 2025-03-06 08:45:32 +00:00
Iain Sproat 5655b3e758 fix(metrics): pass registry in to modules (#4113)
- ensure metrics are added to the correct registry
2025-03-06 08:37:05 +00:00
Iain Sproat 89d61eedc0 misunderstood this event listener, reverted 2025-03-05 21:20:56 +00:00
Iain Sproat 7c6ebc95dc refactor fileuploads to avoid http request 2025-03-05 16:39:23 +00:00
Iain Sproat 6afad05430 refactor(blobstorage): separate REST components and services 2025-03-05 14:21:50 +00:00
Iain Sproat ce08e5e02d refactor(server): logging directory renamed to observability (#4077) 2025-02-28 08:43:54 +00:00
Mike 2ecb98146a Feat: prevent non work emails (#3993) 2025-02-26 10:55:02 +01: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
Kristaps Fabians Geikins 4dcfbb251b chore(server): moving out branch sub reporting to separate listeners 2025-02-17 13:56:02 +02:00
Kristaps Fabians Geikins fe3982b6cf undo ts check 2025-02-17 13:55:43 +02:00
Kristaps Fabians Geikins 4278e20467 chore(server): refactor activityStream invocations - batch #3 - branches 2025-02-17 13:55:43 +02:00
Iain Sproat e75c3a523c chore(logging): adds a log line for notifications of file upload status change (#3964) 2025-02-12 11:34:14 +01:00
Kristaps Fabians Geikins aee14edc5b chore(server): getting rid of module-scoped event emitters - batch #1 (#3766)
* got rid of models emitter + added tests

* got rid of projects emitter + added tests

* replaced user event bus

* test migrate
2025-01-13 11:39:46 +02:00
Iain Sproat f8072faf01 fix(server/blobstorage): handles errors with missing content-type header (#3758) 2025-01-03 08:03:39 +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
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
Chuck Driesler fd5f316af0 fix(automate): automate module multi region (#3531)
* refactor(automate): logs api can get the projectId from the path

* fix(automate): multiregion gql resolvers

* fix(automate): multiregion event listeners

* fix(automate): drop automationCount

* fix(automate): multiregion run status

* fix(automate): correctness

* fix(automate): actually finish event listeners

* chore(automate): fix tests fix tests

* fix(automate): fix tests but make it multiregion flavor

* fix(automate): logs endpoint

* chore(automate): globalDb to db

* fix(automate): inject projectid correctly

* fix(automate): debug log fetch failure

* chore(automate): fix tests for new message

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2024-11-27 15:26:09 +00:00
Gergő Jedlicska ef043ee234 gergo/web 2158 previews module multi region (#3492)
* feat(previews): multi region previews module

* feat(preview-service): talk multi region

* fix(preview-service): test helper await

* fix(preview-service): remove linting issue, this prob makes it worse
2024-11-19 16:35:39 +01:00
Iain Sproat a1ee8a89a7 chore(server): graceful shutdown (#3125)
* 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
2024-11-19 11:08:38 +01:00
Kristaps Fabians Geikins f961a6da81 chore(server): various useful multiregion changes from comments pr (#3499)
* chore(server): various useful multiregion changes from comments pr

* hopefully fixing CI?

* test fix

* more test fixes??

* more test fixes..

* plz work ;((((

* revert multiregion on by default
2024-11-15 15:49:34 +02:00
Gergő Jedlicska 68b8341945 gergo/multiRegionFileImport (#3474)
* feat(webhook-service): learn to speak multi region

* feat(fileimport-service): talk multi region to me

* feat(fileuploads, blobs): multi region

* feat(fileimport-service): multi region fixes

* feat(branchesAndCommits): multi region resolvers

* fix(fileimports): no need for ts ignore

* fix(fileimports): fix pr comments
2024-11-13 14:20:25 +01:00
Kristaps Fabians Geikins 2d0aea90cf linter fixes 2024-11-11 16:00:37 +02:00
Gergő Jedlicska 73cc7e67d3 gergo/webhookRegions (#3459)
* 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
2024-11-08 10:45:39 +01:00
Iain Sproat 0ec4a87c7c fix(file import): server port was broken when localhost was canonical url (#3360)
* 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
2024-10-22 21:12:18 +02:00