Commit Graph

22 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 9c4c3c5e6c fix(logging): retain IP addresses in logs (#4939)
- necessary to correlate with ingress activity for security
2025-06-16 10:44:41 +01:00
Iain Sproat 70121ca3d7 fixes 2025-05-20 08:46:37 +01:00
Iain Sproat cb7ff5247d Merge branch 'main' into iain/task-id-to-request-context 2025-05-19 14:26:26 +01:00
Iain Sproat 5148cb915f tidy code 2025-05-16 15:33:52 +01:00
Iain Sproat 8c546d0fd3 chore(server/logging): do not log Express if logged by Apollo
- requests to `/graphql` are logged by Apollo middleware, so no need to also log by Express
- Should reduce log volume by around one third
2025-05-16 15:28:31 +01:00
Iain Sproat a5d59a4f38 Fix broken references after merge 2025-04-28 15:02:04 +01:00
Iain Sproat c6e8d1ba77 Merge branch 'main' into iain/task-id-to-request-context 2025-04-26 08:30:20 +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
Kristaps Fabians Geikins 10832655d4 fix(server): all project created subs firing for workspace guests + req ctx cache fix for subs (#4453)
* WIP sub fix

* fix sub resolver caching issue
2025-04-16 11:21:17 +03:00
Gergő Jedlicska a3644a50c5 gergo/web 2931 introduce missing workspace plans (#4323)
* fix(gatekeeper): missing priceId-s should stop the server from booting

* feat(shared): add all new workspace plans

* feat(billing): add new world plans

* feat(ci): use stripe sandbox id-s from test env vars

* chore(ci): remove defunct stripe context

* chore(server-env): fix server env example

* feat(gatekeeper): add missing plans to graphql schema

* test(gatekeeper): update plan upgrade tests to match implementation

* fix(ci): update ci .env source

* fix(ci): we do need some secrets from stripe

* fix(ci): run gql schema introspect with the test env

* fix(frontend): format new plan names

* chore(ci): temp disable gql schema checks

* feat(helm): add unlimited seat prices env vars

* feat(helm): add unlimited seat prices to values

* feat(gatekeeper): do not load priceId-s as a side effect, load with module init
2025-04-07 15:24:57 +02: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 59100b7d08 Merge branch 'main' into iain/task-id-to-request-context 2025-03-11 09:40:59 +00:00
Iain Sproat e795381bd2 fix(server): prometheus summary should be over rolling window
- currently it calculates based on all values from start, and should instead expire old buckets
https://github.com/siimon/prom-client?tab=readme-ov-file#configuration-2
2025-03-10 15:03:50 +00:00
Kristaps Fabians Geikins 954b1a9f11 feat: plan prices accurately read from Stripe (#4104)
* WIP prices + new caching utils

* cached workspace plan prices

* GQL API done

* integrated in frontend

* fixed missing FF

* CR fixes

* integration tests

* removed non-existant team yearly env var
2025-03-05 12:23:38 +02:00
Iain Sproat bce8f8fd5e Merge branch 'main' into iain/task-id-to-request-context 2025-03-04 16:25:49 +00:00
Iain Sproat 5e4a6c5635 fix(server/prometheus): ensure consistent Prometheus registry is used (#4106)
* fix(server/prometheus): ensure consistent Prometheus registry is used
- there was a conflicting dependency between Metrics initialization and Modules initialization; resolved by separating registry initialization from metrics initialization
- pass in the registry to prevent implicit dependency being broken
- when registering a metric, first attempt to remove any of existing metrics with same name to prevent errors
- to prevent sneaky uses of the implicit registry, replace default import with explicit import so it is clearer when prometheusClient.registry is used

* Add tests for registering metrics
2025-03-04 08:41:53 +00:00
Iain Sproat d0d9d22fe2 chore(server): tidy up maybeLoggerWithContext (#4095) 2025-03-03 09:17:55 +00:00
Iain Sproat 193e7d870e chore(server/logging): email logging should include request or task Id in log context
- allows us to better link events to triggering actions
2025-03-01 23:30:57 +00:00
Iain Sproat 7458a25928 chore(server): tidy up maybeLoggerWithContext 2025-03-01 21:53:23 +00:00
Iain Sproat 6f0133a39b chore(server/observability): logging of resolver to create checkout session (#4067) 2025-02-28 15:42:12 +00:00
Iain Sproat ce08e5e02d refactor(server): logging directory renamed to observability (#4077) 2025-02-28 08:43:54 +00:00