Commit Graph

88 Commits

Author SHA1 Message Date
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 207889f095 Updating dependencies. 2023-03-02 19:30:24 +00:00
Rory Powell ae9979929a Enable higher concurrency and resiliency in worker tests 2023-02-13 11:57:30 +00:00
mike12345567 464ab7a1bb Merge branch 'develop' of github.com:Budibase/budibase into fix/cli-memory-issues 2023-02-07 09:56:49 +00:00
mike12345567 4d86df057b Some fixes for #8770 - the CLI was very memory intensive when working with large databases, that contained many revisions. We don't need the revisions for app exports/backups, therefore I've updated our export systems to drop the revision history as it compacts the database significantly and speeds up exports/reduces memory usage. 2023-02-06 17:54:40 +00:00
Adria Navarro c78038f059 Dont close server on tests 2023-02-04 18:51:10 +00:00
adrinr 60beb4f982 Merge branch 'develop' into feature/dependencies-image 2023-02-02 13:49:45 +00:00
dependabot[bot] 9eaa7b787a Bump http-cache-semantics from 4.1.0 to 4.1.1 in /packages/backend-core
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/commits)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-02 09:45:20 +00:00
adrinr c7d0a077be Replace faker for chance 2023-02-01 17:11:50 +00:00
adrinr d871492187 yarn.lock 2023-01-31 10:00:20 +00:00
adrinr 1dabf71f68 Run conflicting tests in sequential mode 2023-01-30 13:35:09 +00:00
adrinr e4c898c327 Use test-containers for backend-core tests 2023-01-27 11:43:36 +00:00
Adria Navarro 422d4e92cc Yarn bootstrap 2023-01-23 18:23:11 +00:00
Gerard Burns 48e1695318 JSON import changes (#9288)
* JSON import changes

* Fix lockfiles

* PR Feedback, fix tests

* fix tests

* pr feedback
2023-01-17 15:07:52 +00:00
Rory Powell 92ba282ee5 Logging type updates to fix account portal build (#9317) 2023-01-12 08:37:41 +00:00
Rory Powell e5e767f18d Correlation id's and log context (#7232)
* Correlation id's and log context

* fix build

* Remove redundant fields from LoggingProcessor.ts

* Only log correlation id when present e.g. this is not present on startup / shutdown / automations
2023-01-11 20:39:33 +00:00
mike12345567 75df57c3d1 Merge branch 'develop' of github.com:Budibase/budibase into feature/test-image 2023-01-11 10:31:57 +00:00
Rory Powell e95222c0f4 Prefer app url resolution over referer (#9218)
* Prefer app url resolution over referer

* Update lockfiles
2023-01-11 10:24:57 +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
dependabot[bot] 5de138ae67 Bump luxon from 3.0.4 to 3.2.1 in /packages/backend-core
Bumps [luxon](https://github.com/moment/luxon) from 3.0.4 to 3.2.1.
- [Release notes](https://github.com/moment/luxon/releases)
- [Changelog](https://github.com/moment/luxon/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moment/luxon/compare/3.0.4...3.2.1)

---
updated-dependencies:
- dependency-name: luxon
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-09 14:37:39 +00:00
dependabot[bot] a4a088583c Bump json5 from 2.2.1 to 2.2.3 in /packages/backend-core
Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.1...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-05 09:08:11 +00:00
mike12345567 a83eb00872 Merge branch 'develop' of github.com:Budibase/budibase into feature/test-image 2023-01-04 16:09:04 +00:00
dependabot[bot] 1aa08b1b63 Bump jsonwebtoken from 8.5.1 to 9.0.0 in /packages/backend-core
Bumps [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken) from 8.5.1 to 9.0.0.
- [Release notes](https://github.com/auth0/node-jsonwebtoken/releases)
- [Changelog](https://github.com/auth0/node-jsonwebtoken/blob/master/CHANGELOG.md)
- [Commits](https://github.com/auth0/node-jsonwebtoken/compare/v8.5.1...v9.0.0)

---
updated-dependencies:
- dependency-name: jsonwebtoken
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-22 16:37:01 +00:00
mike12345567 2c2f08339c Adding library to configure test containers at Jest startup. 2022-12-15 21:06:30 +00:00
Andrew Kingston 090ae5df49 Master => Develop (#9049)
* v2.1.46

* Update pro version to 2.1.46

* v2.2.0

* Update pro version to 2.2.0

* Fix for budibase plugin skeleton, which utilises the old import style.

* Fix side nav styles

* v2.2.1

* Update pro version to 2.2.1

* using dist folder to allow importing constants for openAPI specs

* v2.2.2

* Update pro version to 2.2.2

* Fix for user enrichment call (updating to @budibase/nano fork) (#9038)

* Fix for #9029 - this should fix the issue users have been experiencing with user enrichment calls in apps, essentially it utilises a fork of the nano library we use to interact with CouchDB, which has been updated to use a POST request rather than a GET request as it supports a larger set of data being sent as query parameters.

* Incrementing Nano version to attempt to fix yarn registry issues.

* v2.2.3

* Update pro version to 2.2.3

* Fix SQL table `_id` filtering (#9030)

* Re-add support for filtering on _id using external SQL tables and fix filter key prefixes not working with _id field

* Remove like operator from internal tables and only allow basic operators on SQL table _id column

* Update data section filtering to respect new rules

* Update automation section filtering to respect new rules

* Update dynamic filter component to respect new rules

Co-authored-by: Martin McKeaveney <martin@budibase.com>
Co-authored-by: Budibase Release Bot <>
Co-authored-by: mike12345567 <me@michaeldrury.co.uk>
Co-authored-by: Martin McKeaveney <martinmckeaveney@gmail.com>
2022-12-15 12:13:42 +00:00
Rory Powell 786039055e File authentication using presigned URLs (#8883)
* file auth wip

* Private plugin bucket wip

* Add etag to logo request, fix circular dependency

* Resolve cyclic dependency

* Ensure browser doesn't cache custom component

* Global file fixes

* File fixes / remove permaUrl

* Add ctx local storage

* Enable presigned url to work from any host

* Test fix

* Self hosting w/ S3 + other fixes

* Fix for serving dev app in multi tenant

* Fix backup restore and import attachment url processing, never store attachment urls

* Test fixes

* Unit tests WIP

* Replace file path with base64 encoded private key

* Multi tenancy tests for files

* Environment files fixes

* Post-merge build and test fixes

* Add debug conditional to all jest logging and revert/fix prod minio proxy_pass

* Re-add default '/' minio route :(

* Rename iconFile -> iconFileName

* Add cloudfront vars to k8s templates

* Remove public bucket policy

* Remove duplicated test
2022-12-15 11:35:22 +00:00
Rory Powell 7a7bbd1857 Merge branch 'master' into develop 2022-12-01 14:39:05 +00:00
mike12345567 29dd98a7fc Merge branch 'develop' of github.com:Budibase/budibase into feature/replace-pouch 2022-11-16 18:12:31 +00:00
Rory Powell 9c169087e6 Add copy button to sso callback urls, e2e unit testing for OIDC, stub out other auth tests 2022-11-16 11:34:16 +00:00
mike12345567 b5472f882b Some updates for currentapp.spec.js test case. 2022-11-15 17:35:17 +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
Rory Powell 5da699e27c Fail pro scripts on error, unify TS versions, update test and coverage configs, use pro source mappings 2022-11-14 13:29:46 +00:00
mike12345567 2426123686 First version of pouch-like system, a wrapper for Couch nano. 2022-11-07 18:27:39 +00:00
mike12345567 4daf9c2615 Addressing majority of PR comments. 2022-10-24 10:04:14 +01:00
mike12345567 0bd2a18e46 Main types and work for the CRUD operations of app backup backend in pro + the listeners to handle exporting apps from the server. 2022-10-14 19:24:03 +01:00
mike12345567 b6ca14aa85 Renaming some queue to automationQueue, getting build working. 2022-10-13 17:39:26 +01:00
mike12345567 35525bfedd Moving queue implementation into backend-core - so that pro can access. 2022-10-13 17:27:04 +01:00
Rory Powell aff6e5cbbb Process quota emails in account-portal 2022-10-06 16:03:47 +01:00
Rory Powell 0f98f2fcaa Merge branch 'master' into develop 2022-09-15 10:19:56 +01:00
mike12345567 2cbdb12cd4 Updating backend-core lockfile. 2022-09-05 14:06:35 +01:00
Rory Powell 09127df617 Add updatedAt and createdAt as optional to all joi middleware 2022-08-02 09:39:30 +01:00
mike12345567 3b4d7950d0 Merge branch 'master' of github.com:Budibase/budibase into fix/memory-leak 2022-07-14 16:40:23 +01:00
Rory Powell 1c4473ba30 WIP: Memory leak fix 2022-07-13 08:22:21 -04:00
mike12345567 48975be041 Merge branch 'master' of github.com:Budibase/budibase into develop 2022-07-05 17:37:04 +01:00
Dean 9301f2ac5b Merge remote-tracking branch 'origin/develop' into sso-rest-requests 2022-06-27 09:14:40 +01:00
mike12345567 cd6a92994b Fixing test case and review comments. 2022-06-24 12:08:29 +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
Dean 5fd385ab30 Merge commit 2022-06-23 14:29:19 +01:00
Rory Powell 5c6ea05b8c Update locks 2022-06-09 13:33:31 +01:00