Commit Graph

134 Commits

Author SHA1 Message Date
mike12345567 0734e5d0d5 Minor fix for automations, the wrong function had the environment variables being added to environment, this is very minor, it simply makes sure that environment variables are in context for the whole of the automation runner - e.g. if utilising many datasources each of them doesn't need to re-retrieve the environment variables, instead they will be available based on the env vars retrieved at the start of the execution. 2023-02-10 14:14:43 +00:00
Martin McKeaveney f94dd598c4 merge 2023-02-05 22:11:37 +00:00
Rory Powell be5b8347ef Merge branch 'develop' into feature/environment-variables 2023-01-27 11:27:11 +00:00
mike12345567 b138d86318 Quick updates for #8989 - this issue appeared to be fixed already but just adding a few extra bits of security to make sure that looping only occurs when valid data is found in the binding. 2023-01-24 19:09:36 +00:00
mike12345567 4bc47c1563 Minor updates to the context system and also adding env vars to automation context. 2023-01-16 16:47:59 +00:00
Martin McKeaveney 47b6dc86da
allow all user bindings in SQL queries (#9354) 2023-01-16 12:24:32 +00:00
mike12345567 186aeeec2d Adding the ability to store environment variables to context, to make them more easily available/re-usable, as well as exposing them to queries. 2023-01-13 19:53:46 +00:00
mike12345567 2c87844e93 Small update to properly support environments with environment variables, making sure that datasources correctly select based on app ID. 2023-01-12 14:38:12 +00:00
mike12345567 da2b921156 Replacing some require statements with imports. 2023-01-11 19:07:01 +00:00
mike12345567 73884a9a6f Merge branch 'develop' of github.com:Budibase/budibase into feature/environment-variables 2023-01-11 18:08:49 +00:00
mike12345567 a7bcfe387c Adding in basic implementation of variable usage, getting from pro and enriching through new datasource SDK. 2023-01-11 17:57:51 +00:00
Rory Powell 0b2a445a9a
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
Peter Clement 38ccf20357 assign wasLoopStep correctly 2023-01-05 12:16:45 +00:00
Peter Clement 7083b00f97 fix for looping issue wher output was incorrect 2023-01-05 10:52:50 +00:00
Peter Clement 9bf37b34ae
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
Michael Drury 1f0570907a Merge branch 'master' of github.com:Budibase/budibase into develop 2022-11-29 11:13:54 +00:00
mike12345567 4868083208 Fixes based on server build so far. 2022-11-26 15:10:41 +00:00
Dean 821cff392c User/Auth context now being passed to dynamic variable request updates 2022-11-24 10:16:05 +00:00
mike12345567 6f6d000cb8 Finally removing all usages of backend-core/ type imports from server, including some further typescript conversions. 2022-11-22 19:49:59 +00:00
mike12345567 8b2cfd9dfa Converting further DB layers to TS - fixing mocks. 2022-11-15 18:33:24 +00:00
mike12345567 3507704680 Fixes for cronjob stop - correctly handle this without stalled job handle. 2022-10-14 13:26:42 +01:00
Peter Clement a289d06301 one more log 2022-10-05 10:01:11 +01:00
Peter Clement 0f0040bc8a remove logs 2022-10-05 09:53:47 +01:00
Peter Clement 523e770db4 fix looping issues in automations 2022-10-05 09:20:59 +01:00
Rory Powell 6644a20d2f Merge branch 'master' into develop 2022-09-12 14:05:36 +01:00
mike12345567 dcada36111 Fix for #7431 - reboot didn't work at all previously which is why apps couldn't be published with it enabled, this is now a self host only feature, I've removed the ability to enable a reboot cron in the Cloud and it will not run the lookup/execution. 2022-09-07 17:05:17 +01:00
mike12345567 5411f3c8e3 Merge branch 'develop' of github.com:Budibase/budibase into plugins-dev-experience 2022-08-31 15:53:32 +01:00
Rory Powell ae3e4a7d6e Update shutdown logging 2022-08-31 10:47:41 +01:00
Rory Powell 96c110abe6 enable stalled job disabling 2022-08-20 11:02:22 +01:00
Rory Powell b9c16331ce Add logging to all event listeners for automations + stalled handling stub 2022-08-19 23:14:19 +01:00
mike12345567 3388008f0b Adding custom datasources to UI. 2022-08-15 18:38:09 +01:00
mike12345567 b920f8cb05 Replacing all plural TS enumerations with singular - this involves a major rename of the DocumentTypes. 2022-08-11 13:50:05 +01:00
mike12345567 c3dbeb9d04 Merge branch 'develop' of github.com:Budibase/budibase into feature/automation-error-stop 2022-07-26 17:28:57 +01:00
mike12345567 cfde86a996 Adding UI for displaying when the CRON job has been stopped and alert the user to next steps. 2022-07-26 13:59:22 +01:00
mike12345567 caaf5dc3c9 Main body of updates to support disabling the cron, some cleanup of metadata at deployment to make sure they can be re-ran. 2022-07-25 20:45:29 +01:00
Michael Drury 1682cfdb90 Main bulk of logic around detecting cron recurring failure, still need to disable. 2022-07-20 22:38:06 +01:00
mike12345567 1848f85475 Converting main automation thread to typescript. 2022-07-20 19:05:54 +01:00
mike12345567 0a7ceda807 Fixing an issue with automations being unable to access app databases due to new context stack up. 2022-07-18 17:38:58 +01:00
Peter Clement 8dfcb12cdf Ensure a binding exists before continuing with loop 2022-07-18 13:10:18 +01:00
Dean 41d8fa8340 Updated query tests to remove altered datasource. Updated messaging for refresh failure messaging 2022-07-08 11:19:41 +01:00
Dean dfc21184cf Fixed issue where mutation was causing expression bindings to be lost. Request retries will now have them intact for re-enrichment 2022-07-08 09:29:16 +01:00
Dean 36d69a0b81 Linting commit 2022-07-06 13:09:13 +01:00
Dean 457a671831 Surface refresh process error messaging 2022-07-06 13:03:25 +01:00
Dean bceff77e35 Properly invalidate the cached user ensuring up-to-date credentials are always used 2022-07-06 11:51:48 +01:00
Dean 7152125667 Merge remote-tracking branch 'origin/develop' into sso-rest-requests 2022-07-05 09:28:56 +01:00
deanhannigan 9b98c617bf
Merge pull request #6315 from Budibase/feature/current-user-rest-bindings
REST query bindings for Current User
2022-07-05 09:22:03 +01:00
Dean f14b1c008c Merge remote-tracking branch 'origin/develop' into sso-rest-requests 2022-07-05 09:07:33 +01:00
Dean 2ea4a9d225 Refresh the OAuth tokens automatically when making rest calls. Fix to remove the password from the api token authentication. 2022-07-03 21:13:15 +01:00
Dean 87c44701d8 Ignore authconfigs for datasources if they are empty 2022-07-03 18:55:44 +01:00
Dean 94496abe85 Fixes for datasource authentication parsing. Mapping UX updates 2022-07-01 17:27:24 +01:00