1
0
Fork 0
mirror of synced 2024-09-20 03:08:18 +12:00
Commit graph

51 commits

Author SHA1 Message Date
Adria Navarro
ef0888fcad Read package name 2023-07-11 10:44:09 +02:00
Michael Drury
a3f9759a47 Reverting ioredis-mock removal for test cases - will come back to this in future as it currently breaks pro tests. 2023-06-01 00:02:55 +01:00
mike12345567
249625ad1a Updating backend tests to actually utilise the redis container which is spun up as part of the tests, doing away with the somewhat problematic ioredis-mock which was breaking some tests due to the addition of the changes for multi-dev collab. 2023-05-31 17:18:01 +01:00
mike12345567
1aad88adc8 Fix for CLI startup complaining about version not being found. 2023-05-15 15:52:59 +01:00
Martin McKeaveney
b387f969d9 allow passwordless redis 2023-05-08 15:59:12 +01:00
Martin McKeaveney
50de32a8a0 Merge pull request #10452 from Budibase/feature/clustering-support
attaching clustered mode to an env var
2023-05-04 14:25:23 +01:00
mike12345567
552499b781 Re-writing the disabling of pino/logging - it seems that the pino logger is causing a variety of issues in the built CLI version - easier to offer an environment variable for backend-core which completely removes the logger. 2023-05-02 16:22:43 +01:00
Martin McKeaveney
e75e91e248 control all redis clustering through env var 2023-04-28 19:53:15 +01:00
Martin McKeaveney
f73af919a7 attaching clustered mode to an env var 2023-04-28 19:09:22 +01:00
adrinr
8e95121ac8 Implement find version 2023-04-17 14:07:49 +01:00
adrinr
e5227febd8 Use version from environment 2023-04-17 14:02:50 +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
Michael Drury
34e8009f08 Merge pull request #9949 from Budibase/fix/blacklist
Blacklisting
2023-03-20 10:33:11 +00:00
Rory Powell
e116941750 Rotatable secrets (#9982)
* Rotatable secrets

* Set new api encryption key var

* Lint

* Use fallback keys instead of array

* Point api encryption key to dedicated value

* Add API_ENCRYPTION_KEY to cli

* Lint + add api encryption key to env files
2023-03-13 15:02:59 +00:00
mike12345567
564c724be1 Provides the option for blacklisting IPs. 2023-03-08 16:30:26 +00:00
mike12345567
04ef7eeb9c Minor fixes - after removing axios altogether and adding a start script to make life easier for running from ts. 2023-03-03 10:03:33 +00:00
mike12345567
2fb33e2cf3 Merge branch 'develop' of github.com:Budibase/budibase into feature/audit-logs 2023-02-27 14:51:33 +00:00
Rory Powell
2c46109e7d Enforceable SSO (#9787)
* Add ENFORCEABLE_SSO feature flag

* First draft of enforce sso configuration / show single sign on url

* Reading and writing isSSOEnforced + integration with login page

* Enable CI + lint

* Set correct base branch for CI

* Test fix for expected string changed

* Use tenant aware platform url as SSO link

* Bring in latest pro changes

* Lint

* Add useEnforceableSSO mock helper function

* Update configs.spec.ts with coverage for public settings

* Update users.spec.ts with additional tests for isPreventPasswordActions

* Lint

* Update refresh OAuthToken to use correct enum and add case statement
2023-02-27 13:42:51 +00:00
mike12345567
0fa984f26f Moving is audited and adding in env var for ip address/user agent auditing. 2023-02-27 11:42:52 +00:00
Rory Powell
d3a7286711 Configs updates: remove circular deps, dedicated module, typing improvements, reduce db reads 2023-02-23 13:41:35 +00:00
Rory Powell
cc7eb64a3b Rename LOG_4XX to ENABLE_4XX_HTTP_LOGGING and enable by default 2023-02-13 14:39:24 +00:00
Rory Powell
0e3a17ab18 Merge pull request #9669 from Budibase/budi-6558-configurable-test-log-levels-and-common
Configurable test log levels and common error handling
2023-02-13 14:31:43 +00:00
Rory Powell
f53faff7ad Add LOG_4XX to environment 2023-02-13 12:27:49 +00:00
Rory Powell
07e5598538 Enable use of redis container in worker tests 2023-02-13 12:09:16 +00:00
mike12345567
c645a9bc21 Some type updates and an improvement to encryption to allow selecting the secret from an option list. 2023-01-16 18:15:43 +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
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
f935f05509 Offline license POC (#9046) 2022-12-14 21:48:48 +00:00
Peter Clement
9d841bc947 Server and Worker tests (#8928)
* automation unit tests

* row processor tests

* update executeQuery test

* update groups assertion

* some more worker tests

* plugin tests and tidying up

* linting

* temporarily disable group tests

* more tests

* fix import

* fix backup tests

* add pro mocks to worker

* check for app existence in import test

* test new tsconfig

* testing changes

* Pro test utils (#9020)

* Pro test utils changes

* Add test fixes

* Remove ts-ignore

Co-authored-by: mike12345567 <me@michaeldrury.co.uk>
Co-authored-by: Rory Powell <rory.codes@gmail.com>
2022-12-12 22:02:32 +00:00
mike12345567
a02e9017ec Final fixes after re-running all test suites. 2022-11-28 19:12:23 +00:00
mike12345567
d6e9380c06 General work after running some tests in CI - general refactoring as well. 2022-11-28 17:54:04 +00:00
mike12345567
a3bb2e0d77 Automation overhaul to Typescript, plus type updates. 2022-11-25 19:57:07 +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
mike12345567
e235073cc5 Adding tenancy awareness for plugin bucket. 2022-09-23 16:30:45 +01:00
Rory Powell
8cfd6a9faa Merge branch 'develop' into feature/day-pass-pricing 2022-09-15 08:55:33 +01:00
mike12345567
5c5e1b10b4 Fixing CLI build - prebuilds required for hashing can be disabled via environment variable. 2022-09-13 18:00:10 +01:00
Rory Powell
884f446671 Merge branch 'develop' into feature/day-pass-pricing-temp 2022-09-12 11:33:02 +01:00
Rory Powell
f4963db294 Add buttonText to InlineAlert, export TooltipWrapper, update Account type with license key activate time, convert error package to TS 2022-09-12 10:43:26 +01:00
mike12345567
a683665a99 Adding plugin upload API - takes a file form-data and then extracts, uploads to minio and stores data about the plugin to CouchDB. 2022-08-10 20:01:48 +01:00
mike12345567
52d16d1099 Updating sessions to TS, adding env var to set the session update length, adding reasons for invalidation, making sure errors are never considered authenticated. 2022-08-05 17:13:03 +01:00
mike12345567
cfe3db835b Updating pino logging to remove health check spam. 2022-08-04 20:23:45 +01:00
mike12345567
fcfe1341a1 PR comments. 2022-07-14 19:02:00 +01:00
Rory Powell
c40d80a3f3 Re-apply quota restrictions 2022-07-08 10:52:23 +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
a4eef3daab Add awareness of deployment environment 2022-06-01 14:10:00 +01:00
Rory Powell
2a00f6498d Merge branch 'feature/posthog-v2' into feature/event-backfill 2022-05-29 00:25:40 +01:00
Rory Powell
c0d6fa34a4 Identity tenant and installation groups, property updates 2022-05-28 21:38:22 +01:00
Rory Powell
28b48a88fe Event identification 2022-05-23 22:14:44 +01:00
Rory Powell
4841c84861 Merge branch 'feature/posthog-v2' into feature/event-backfill 2022-05-23 10:29:33 +01:00
Rory Powell
77cb7c480c Merge branch 'feature/posthog-v2' into feature/event-backfill 2022-05-05 09:22:01 +01:00