Michael Drury
99607ca06e
Reverting try twice change to writethrough.
2023-05-30 20:45:10 +01:00
Michael Drury
5249148d6c
Updating writethrough test to be aware of the double attempt locks.
2023-05-30 20:20:22 +01:00
mike12345567
7c7bd4d5cb
Fix for debugging with webstorm the old way (if desired), updating the builder middleware to be more multi-dev capable, ignoring 409s when attempting to update the last updated at for apps (if multiple devs hit at same time, only use one) also updating writethrough cache to retry once, with the extended TTL on locks, plus the multi-dev collab it can take a minute to update usage quota doc when a lot of updates occur at once.
2023-05-30 17:41:20 +01:00
Rory Powell
e1a147e823
Merge branch 'master' into develop
2023-05-03 16:06:42 +01:00
adrinr
b128306262
Increase writethrough cache timeout
2023-04-19 16:47:48 +01:00
mike12345567
ada052e043
Merging in develop - fixing some test cases which broke in the process.
2023-04-12 10:56:21 +01:00
Rory Powell
976b3a55ca
Update logging to support dd trace attributes ( #10086 )
...
* Update logging middleware to integrate with pino for console logging
* Remove elastic apm references, use updated core middlewares
* Remove redundant LOG_LEVEL definitions
* Remove no longer needed jest logging overrides
* lint
* Backwards compat between console log helpers and pino
* Configurable DISABLE_HTTP_LOGGING
* Don't log 4xx as errors
* Remove redundant ENABLE_4XX_HTTP_LOGGING
* Cleanup migrations and event logging
* Improve bb-alert logging
* Add DISABLE_HTTP_LOGGING to helm chart
* Add ops endpoints for testing
* Disable http logging in dev
* Backwards compatible tracing implementation
* Naming update on http logging env var
* lint
* Update packages/backend-core/src/environment.ts
Co-authored-by: Adria Navarro <adria@revityapp.com>
* Merge
* Lint
* Fix console.warn failing mock by replacing with alerts mock instead
* Lint
---------
Co-authored-by: Adria Navarro <adria@revityapp.com>
2023-04-04 15:08:46 +01:00
mike12345567
24fc72657d
Fixing all broken test cases after breaking out context fully from jestSetup/backend-core jest loading.
2023-03-30 16:35:25 +01:00
adrinr
84d450a931
Renames
2023-03-07 12:47:27 +01:00
adrinr
49493d80be
Use name suffix instead of complex key object
2023-03-07 12:45:20 +01:00
adrinr
4d854ea5a7
Merge remote-tracking branch 'origin/develop' into bug/budi-5901-usage-quota-document-conflicts-can-cause
2023-03-07 12:41:58 +01:00
mike12345567
2335932978
Some updates to core types - used in pro update.
2023-03-02 10:20:49 +00:00
adrinr
dded8beaeb
Fix writethrough falling behind
2023-03-01 13:16:57 +01:00
adrinr
b922fc3b00
Improve testing
2023-02-28 15:03:18 +01:00
adrinr
c1462a7c9c
Clean code
2023-02-28 14:54:43 +01:00
adrinr
c254c565e4
Use redlock for writethrough
2023-02-28 14:54:34 +01:00
Rory Powell
ae9979929a
Enable higher concurrency and resiliency in worker tests
2023-02-13 11:57:30 +00:00
adrinr
11a7742d90
Cleanup
2023-02-03 19:23:36 +00:00
adrinr
6dab44a569
Clean code
2023-02-03 09:37:34 +00:00
adrinr
11fa2313f1
Undone user cache changes
2023-02-01 17:20:48 +00:00
adrinr
c7d0a077be
Replace faker for chance
2023-02-01 17:11:50 +00:00
adrinr
e4c898c327
Use test-containers for backend-core tests
2023-01-27 11:43:36 +00:00
Adria Navarro Redo
b94546b1a1
Fix user test
2023-01-26 18:20:21 +00:00
Adria Navarro Redo
9242470f6f
Fix snapshots test
2023-01-26 18:20:21 +00:00
Rory Powell
fba7ef26ad
Replace ts-jest with swc/jest ( #9289 )
...
- Add swc dependencies
- Add transform change to jest.config.ts
- Replace `export =` with `export default` in src code to enable code coverage to work with swc transformer
- Restructure backend-core errors package to allow for exporting error classes with ESM syntax
- Update backend-core to no longer use `export =`, export individual packages instead of replacing with `export default` for backwards compatibility
- Update event publishers to use `export default` - this was required for the `jest.spyOn` usage inside backend-core common mocks
- Restructure some jest.mock usages where declaring the jest.fn as a variable outside of the package mock threw an error
2023-01-11 09:37:37 +00:00
mike12345567
90362b65c1
Disabling js interop in Typescript build of backend-core and worker, fixing build issues.
2022-11-26 14:46:01 +00:00
mike12345567
d3c4c99e16
Complete conversion of backend-core to Typescript.
2022-11-24 18:48:51 +00:00
mike12345567
58e59bfacc
Updating PouchLike to be an interface in types, with its impl stored in backend-core, now called Database.
2022-11-17 14:35:03 +00:00
mike12345567
e7e2d91fef
Merge branch 'develop' of github.com:Budibase/budibase into feature/replace-pouch
2022-11-15 16:45:25 +00:00
Rory Powell
9973f2e161
Bump jest and ts-jest to be consistent across backend packages to fix CI issue, test config updates
2022-11-14 22:55:47 +00:00
mike12345567
b4b471e054
Re-jigging things a bit, hiding as much of the couch/pouch stuff away.
2022-11-11 12:46:32 +00:00
mike12345567
c744d23832
Major update - removing the use of context for PouchDB instances, swapping knowledge of PouchDB to the PouchLike structure that replaces it.
2022-11-09 16:53:42 +00:00
Rory Powell
9face50a07
Fix build failure around PouchDB type
2022-10-25 09:02:55 +01:00
mike12345567
b803a3fd93
Replacing all plural TS enumerations with singular - this involves a major rename of the DocumentTypes.
2022-08-11 13:50:05 +01:00
Rory Powell
3b5abda2cf
Rate limit served:X events
2022-08-08 15:44:29 +01:00
Andrew Kingston
d9dacbc901
Use warn rather than info when notifying about ignored conflicts
2022-07-25 12:23:30 +01:00
Andrew Kingston
f82b407f30
Ignore 409s in write-through cache
2022-07-25 12:17:40 +01:00
mike12345567
0bf9072cd1
Fixing an issue where periodically the cache state of the couch revision gets out of sync and need to update it for cache to be able to write again.
2022-06-24 17:41:17 +01:00
mike12345567
b5f0d7c4fd
Adding case to handle multi-DB setups, to confirm store same doc ID to different databases and they run in different cache keys.
2022-06-24 14:28:45 +01:00
mike12345567
389856795d
Updating writethrough cache a bit to make sure it implements the PouchDB API properly.
2022-06-24 13:34:00 +01:00
mike12345567
cd6a92994b
Fixing test case and review comments.
2022-06-24 12:08:29 +01:00
mike12345567
56956dba4f
Adding a class wrapper incase using get/put functions multiple times, functions like the PouchDB constructor.
2022-06-23 20:27:20 +01:00
mike12345567
b4bed6c0ce
Updating redis to use typescript and adding the option of a writethrough cache which can be used, by passing a DB and a value to be written + a delay for writes.
2022-06-23 20:22:51 +01:00
Rory Powell
7ebfaf8a31
Failover protection with event cache
2022-05-31 21:04:41 +01:00
Rory Powell
a9ab8b2629
Lots of failure handling and caching
2022-05-30 21:46:08 +01:00
mike12345567
8fbbba16ee
Updating cache to 1 hour.
2022-05-23 16:06:47 +01:00
mike12345567
76f19def26
Moving the withCache function to backend-core so that it can be shared, as well as adding a cache busting function which can be used when one of the checklist configs changes.
2022-05-23 15:03:52 +01:00
mike12345567
192fb1307e
Initial version of memory leak protection, making sure that PouchDB databases are closed correctly after use, using a combination of closures wrapping DB gets (this replaces the getDB, leaving only a dangerousGetDB function which can be used in very very specific scenarios) and then closing the DB as part of CLS hooked functions finishing. Also moving the GlobalDB init to the tenancy middleware as this is used everywhere in the worker/app services - means that not all getGlobalDB calls require an async closure around them.
2022-04-19 19:42:52 +01:00
Rory Powell
41144db055
Remove remaining direct usage of CouchDB. Add common pouch config to backend-core
2022-04-19 16:45:27 +01:00
mike12345567
8f6e55e65b
Adding controllers for row, query and applications public APIs.
2022-02-23 18:31:32 +00:00