Commit Graph

82 Commits

Author SHA1 Message Date
Kristaps Fabians Geikins bde148f286 chore(server): migrating fully to ESM (#5042)
* wip

* some extra fixes

* stuff kinda works?

* need to figure out mocks

* need to figure out mocks

* fix db listener

* gqlgen fix

* minor gqlgen watch adjustment

* lint fixes

* delete old codegen file

* converting migrations to ESM

* getModuleDIrectory

* vitest sort of works

* added back ts-vitest

* resolve gql double load

* fixing test timeout configs

* TSC lint fix

* fix automate tests

* moar debugging

* debugging

* more debugging

* codegen update

* server works

* yargs migrated

* chore(server): getting rid of global mocks for Server ESM (#5046)

* got rid of email mock

* got rid of comment mocks

* got rid of multi region mocks

* got rid of stripe mock

* admin override mock updated

* removed final mock

* fixing import.meta.resolve calls

* another import.meta.resolve fix

* added requested test

* nyc ESM fix

* removed unneeded deps + linting

* yarn lock forgot to commit

* tryna fix flakyness

* email capture util fix

* sendEmail fix

* fix TSX check

* sender transporter fix + CR comments

* merge main fix

* test fixx

* circleci fix

* gqlgen bigint fix

* error formatter fix

* more error formatting improvements

* esmloader added to Dockerfile

* more dockerfile fixes

* bg jobs fix
2025-07-14 10:26:19 +03:00
Iain Sproat 1f8e1a522d fix(automate): better handle trigger definition errors (#4845) 2025-05-29 10:08:43 +01:00
Iain Sproat cb7ff5247d Merge branch 'main' into iain/task-id-to-request-context 2025-05-19 14:26:26 +01:00
Chuck Driesler 848f04d861 feat(automate): create test automations without functions (#4657)
* feat(automate): test automations without functions (almost)

* fix(automate): drop function select from test automation creation

* fix(automate): partial test automation panel

* feat(automate): environment configuration in test automation

* fix(automate): closer fit rows

* fix(automate): create test automation runs without functions
2025-05-06 10:48:21 +01:00
Iain Sproat a5d59a4f38 Fix broken references after merge 2025-04-28 15:02:04 +01:00
Iain Sproat fccd2a0ad9 fix(server/logging): use appropriate log level for automate errors 2025-04-24 16:28:02 +01:00
Chuck Driesler 603e47bc92 fix(automate): do not trigger deleted automations (#4551) 2025-04-23 08:28:07 +01:00
Chuck Driesler 5c68f8a1da feat(automate): ability to delete automations (#4228)
* feat(automate): delete automation be

* feat(automate): delete automations fe

* fix(automate): delete modal, update cache

* chore(automate): minor formatting

* fix(automate): delete blobs w automations

* chore(automate): repair blob test

* fix(automate): make sure to return

* fix(automate): do soft delete

* fix(automate): include deleted filter in project automation queries
2025-04-22 20:22:44 +01:00
Chuck Driesler d7aa0196fc feat(authz): automate policies (#4491) 2025-04-18 11:03:54 +02:00
Iain Sproat a50e053096 chore(server/logging): add operation logging to automate module
- tidy up some passing of loggers to automate
- do not use console.log, instead use @/observability/logging
2025-04-15 11:37:06 +01:00
Kristaps Fabians Geikins 820a1e2ebf feat(server): workspace roles taken into account in project queries (#4319)
* Workspace.projects fixed

* Query.project tested & fixed

* personalOnly flag added

* withProjectRoleOnly flag

* authorizeResolver implicit workspace roles

* minor cleanup

* reorg + support for throwing auth errors

* global error mapping

* undo special borkage

* CR fixes

* more CR fixes

* shared tests fix

* minor adjustment

* tests fix

* see if removing cached roles fixes it?

* more fixes

* clean up debugging garbage
2025-04-07 12:52:07 +03:00
Chuck Driesler fd93d69a19 chore(automate): improve error message (#4260)
* chore(automate): improve error message

* fix(automate): better writing
2025-04-01 12:25:16 +01:00
Kristaps Fabians Geikins f76a2c34d3 chore: add no floating promises lint rule (#4249)
* chore: add no floating promises lint rule

* minor cleanup

* fix test by only running if node 22 or greater

---------

Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
2025-03-25 13:36:49 +02:00
Iain Sproat 04f84c31f3 fix(server/automate): logger should have request context and request ID sent to execution engine (#4092)
* fix(server/automate): logger should have request context

* WIP - pass in request Id

* WIP

* fix(automate): better logging for automate processes

* chore(automate): slight log improvement

* fix(automate): just in case

---------

Co-authored-by: Charles Driesler <chuck@speckle.systems>
2025-02-28 18:22:00 +00:00
Chuck Driesler 3cc68bb0e2 feat(automate): use updated hybrid function search (#4085)
* fix(automate): use new function query for workspace functions

* fix(automate): include workspace resource claims in auth flow

* chore(automate): do not use btoa
2025-02-28 16:03:34 +00:00
Iain Sproat ce08e5e02d refactor(server): logging directory renamed to observability (#4077) 2025-02-28 08:43:54 +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
Chuck Driesler 86c113b29b feat(regions): move project automations (#3925)
* 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): move project objects

* chore(regions): add tests for object move

* feat(regions): move project automations

* chore(regions): add tests for moving automations

* chore(regions): more tests for moving automate data

* fix(regions): speed up inserts

* fix(regions): simplify postgres usage

* chore(regions): repair build

* fix(regions): improve queries

* chore(regions): again
2025-02-18 15:48:00 +00:00
Chuck Driesler f2ce7d8f17 chore(automate): track usage of test automations (#3992)
* chore(automate): track usage of test automations

* fix(automate): consolidate mixpanel event
2025-02-18 11:37:56 +00:00
Iain Sproat c59e6043bb fix(server/errors): derive errors from BaseError (#3918) 2025-01-30 18:15:56 +01:00
Chuck Driesler 4cbeeef0d0 Automate API Circuit breaker (#3914)
* fix(automate): invokeSafeJsonRequest

* fix(automate): correct fallback values
2025-01-30 15:26:12 +00:00
Kristaps Fabians Geikins 8df7eb714b chore(server): getting rid of module-scoped eventBuses - batch #5 - automations & runs [final] (#3818)
* chore(server): getting rid of module-scoped eventBuses - batch #4 - comments

* chore(server): getting rid of module-scoped eventBuses - batch #5 - automations

* chore(server): getting rid of module-scoped eventBuses - batch #5 - automation runs
2025-01-15 11:00:33 +02:00
Chuck Driesler 02be49f71f fix(automate): redirect github auth flow to workspace if possible (#3632)
* fix(automate): redirect to workspace after auth if possible

* fix(automate): include session in github auth flow

* chore(automate): update props after merge

* fix(automate): pick => fragment

* fix(automate): use fragments correctly
2024-12-06 08:24:23 +00:00
Iain Sproat cdf9c4858a refactor(env vars): rename AUTOMATE_ENCRTYPTION_KEYS_PATH with ENCRYPTION_KEYS_PATH (#3616) 2024-12-04 10:29:35 +00:00
Chuck Driesler 4e37a0eae7 chore(automate): drop specklecon templates (#3587) 2024-12-02 10:15:03 +00:00
Chuck Driesler e312110933 Automate Public Beta (#3472)
* feat(automate): query active user functions

* fix(automate): show automations to non-stream-owners

* feat(automate): associate function with workspace

* fix(automate): split functions page between user and example functions

* fix(automate): ugh

* fix(functions): use correct query type in different places

* fix(automate): workspace functions page

* feat(automate): query specific categories of functions

* fix(automate): checkpoint

* fix(workspaces): successful queries w local env

* fix(automate): createFunctionWithoutVersion

* fix(automate): successful associate function with workspace

* fix(automate): query and return workspaces on functions

* fix(automate): show current function workspace

* fix(automate): query functions in automation create dialog

* fix(automate): audit non-owner automation access

* 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): successful usage of multiregion results

* 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

* fix(automate): inject projectid correctly

* fix(automate): drop user-source functions

* fix(automate): owners edit, others can view

* fix(automate): simplify queries, auto workspace association

* chore(automate): appease

* chore(automate): fix function types

* fix(automate): get to workspace functions from empty state

* chore(automate): death to all slugs

* fix(automate): no create automation from function

* fix(automate): hide workspace change, tweak role access

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2024-11-29 17:33:14 +01: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
Chuck Driesler 566bec59a5 Revert "fix(automate): drop specklecon function templates (#3503)" (#3504)
This reverts commit adeb529826.
2024-11-16 19:57:04 +00:00
Chuck Driesler adeb529826 fix(automate): drop specklecon function templates (#3503) 2024-11-16 13:06:51 +00:00
Chuck Driesler be08246d4d SpeckleCon Templates (#3497)
* fix(specklecon): add specklecon function templates

* fix(specklecon): more templates

* Update executionEngine.ts

* Update functionManagement.ts
2024-11-14 14:47:51 +00:00
Chuck Driesler 4159a2277a fix(specklecon): add specklecon function templates (#3491) 2024-11-13 16:13:02 +01:00
Chuck Driesler e4a005f5da fix(automate): fix possible auth error (#3470) 2024-11-08 16:59:48 +00:00
Kristaps Fabians Geikins 8abc801bae chore(server): core IoC #71 - createAppTokenFactory 2024-10-16 16:59:54 +03:00
Kristaps Fabians Geikins c7c897d08f chore(server): core IoC #54 - deleting getUserById (duplicate) 2024-10-15 10:57:20 +03:00
Kristaps Fabians Geikins 1cb27e6fdd chore(server): core IoC #51 - getUser(s)Factory 2024-10-14 17:24:11 +03:00
Kristaps Fabians Geikins 6cb5022ac4 chore(server): IoC 35 - updateStreamRoleAndNotify 2024-10-09 16:31:20 +03:00
Kristaps Fabians Geikins 972af78fce chore(server): core IoC 13 - getCommit(s)Factory 2024-09-27 14:02:29 +03:00
Kristaps Fabians Geikins b2459e84e9 chore(server): core IoC 5 - getBranchLatestCommitsFactory 2024-09-26 15:48:07 +03:00
Kristaps Fabians Geikins 168a22a9ac chore(server): core IoC 3 - getBranch(es)byIdFactory 2024-09-26 14:43:55 +03:00
Kristaps Fabians Geikins 7f222cdc0f chore(server): automate IoC 14 - dataloaders 2024-09-20 16:00:05 +03:00
Kristaps Fabians Geikins b47338b50c chore(server): automate IoC 12 - createTestAutomationRunFactory 2024-09-20 15:41:09 +03:00
Kristaps Fabians Geikins 0368f9b792 fixx 2024-09-20 15:31:34 +03:00
Kristaps Fabians Geikins ad41264764 chore(server): automate IoC 11 - manuallyTriggerAutomationFactory 2024-09-20 15:29:23 +03:00
Kristaps Fabians Geikins 9fe2033051 chore(server): automate IoC 10 - onModelVersionCreateFactory 2024-09-20 15:19:15 +03:00
Kristaps Fabians Geikins ba198afe7d lint fix 2024-09-20 15:00:25 +03:00
Kristaps Fabians Geikins 20292cc5c1 chore(server): automate IoC 9 - setupRunFinishedTrackingFactory 2024-09-20 14:58:03 +03:00
Kristaps Fabians Geikins aede93d72c rename 2024-09-20 14:57:31 +03:00
Kristaps Fabians Geikins 17d7a49011 chore(server): automate IoC 8 - subscriptions service 2024-09-20 14:08:17 +03:00
Kristaps Fabians Geikins 6121893fe9 chore(server): automate IoC 7 - reportFunctionRunStatusFactory 2024-09-20 13:55:11 +03:00
Kristaps Fabians Geikins aad7128296 chore(server): automate IoC 6 - functionManagement cleanup 2024-09-20 13:42:29 +03:00