Commit Graph

10703 Commits

Author SHA1 Message Date
Michael Drury 74957725dd
Revert "Fix updating users via cross-service comms (public API)" 2024-02-15 13:44:43 +00:00
Michael Drury 4bd361921b
Merge branch 'master' into fix/cluster-mode 2024-02-15 13:43:52 +00:00
Michael Drury d1da8ad49f
Merge branch 'master' into fix/cluster-mode 2024-02-15 13:31:18 +00:00
Michael Drury e03cd4af56
Merge branch 'master' into fix/budi-8010 2024-02-15 13:28:07 +00:00
Michael Drury a3086d8d80
Merge branch 'master' into fix/cluster-mode 2024-02-15 13:06:00 +00:00
Michael Drury 60bcf6ae87
Merge branch 'master' into fix/updating-users-via-public-api 2024-02-15 13:05:50 +00:00
melohagan 649dafba47
n8n automation action integration (#12992)
* Add n8n automation action

* Add authorization header support

* add unit tests

* Replace test.com with example.com

* Add HttpMethod enum to types

* fix unit test

* Add required field label asterisk
2024-02-15 13:05:03 +00:00
mike12345567 05d19c92c7 Fixing bug found by test. 2024-02-15 12:59:41 +00:00
mike12345567 d3bb8b2fa4 There was an issue where extra headers were being carried over to the worker instance when performing cross-service comms - these headers were causing the request to be rejected without consideration. Cleaning up to only include the headers Budibase really cares about in request, let fetch work out the generic ones. 2024-02-15 12:49:39 +00:00
mike12345567 e9bb17dd8a Fixing cluster mode in docker-compose setups, we weren't copying across the pm2 config that was needed to achieve this. 2024-02-15 12:47:27 +00:00
Sam Rose ad8d1e2598
Make the MySQL healthcheck stricter. 2024-02-15 09:44:01 +00:00
mike12345567 ea5d04e1d3 Addressing PR comments. 2024-02-14 17:15:42 +00:00
Sam Rose d42ce6ac09
Merge branch 'master' into postgres-query-tests 2024-02-14 16:26:22 +00:00
mike12345567 77225e6eb9 Updating how default environment variables are handled, so that the defaults are easier to access. 2024-02-14 15:04:08 +00:00
Adria Navarro 85aeaff891 Shave time on release 2024-02-14 12:52:20 +01:00
mike12345567 cfd1c98c85 Updating timeouts for automations, making it easier to manage/find the various timeout limits. Also adding a new environment variable AUTOMATION_THREAD_TIMEOUT which can be used to control how long automations can run for. 2024-02-14 11:44:07 +00:00
Adria Navarro bb6500cc91 Avoid crossing results 2024-02-14 11:47:34 +01:00
Adria Navarro 7d6e49f8ca Inject only on init 2024-02-14 11:44:24 +01:00
Adria Navarro a6c50500fe Release script 2024-02-13 23:49:17 +01:00
Adria Navarro f733d293da Simplify loading 2024-02-13 23:44:24 +01:00
Adria Navarro 2d2d88f988 Attempt quicker loading 2024-02-13 23:37:30 +01:00
Adria Navarro 0902854bb0 Fix requires 2024-02-13 23:10:55 +01:00
Adria Navarro 9ed6502681 Fix ts-node and other runners 2024-02-13 23:10:55 +01:00
Adria Navarro 0bf94bcd7b Fix helpers 2024-02-13 23:10:55 +01:00
Adria Navarro fa2fbb4253 Update command 2024-02-13 23:10:55 +01:00
Adria Navarro be69edffd7 Fix bson 2024-02-13 23:10:55 +01:00
Adria Navarro f03d9a0178 Clean 2024-02-13 23:10:55 +01:00
Adria Navarro 53d4fc2fa0 Replace ivm.module for script 2024-02-13 23:10:55 +01:00
Adria Navarro 7e43fff018 Execute sloppy code test 2024-02-13 23:10:55 +01:00
Adria Navarro 81035f6d03
Merge branch 'master' into reenable-isolatedvm 2024-02-13 21:41:41 +01:00
mike12345567 169fec29c6 Some quick fixes, making sure that automation queries respect timeout, they will timeout within the usual range. 2024-02-13 18:21:41 +00:00
mike12345567 43671f1aa3 Enable threading in development for queries and automations. 2024-02-13 17:41:55 +00:00
Peter Clement aaf476ca25 Merge remote-tracking branch 'refs/remotes/origin/fix/add-cron-validation' into fix/add-cron-validation 2024-02-13 15:14:28 +00:00
Peter Clement 2660149fea move constant to shared-core 2024-02-13 15:14:03 +00:00
Michael Drury b9265679d9
Merge branch 'master' into fix/add-cron-validation 2024-02-13 13:45:10 +00:00
Adria Navarro f0a149984d Update tests 2024-02-13 09:48:31 +01:00
Adria Navarro 6f6100e7a2 Use isolated-vm 2024-02-12 18:07:17 +01:00
Adria Navarro 6823b23ac4 Init jsrunners on threads 2024-02-12 16:59:14 +01:00
Adria Navarro 36ea9b9df1 Use existing version 2024-02-12 16:20:01 +01:00
Adria Navarro e3f803ef6b Install package 2024-02-12 16:04:31 +01:00
Adria Navarro cd2922308f Properly stringify errors 2024-02-12 16:01:02 +01:00
Michael Drury dfe9b61812
Merge branch 'master' into fix/add-cron-validation 2024-02-12 13:27:14 +00:00
Adria Navarro 165cf9c832
Merge branch 'master' into chore/allow-logging-js-execution-errors 2024-02-12 14:05:41 +01:00
Adria Navarro 93eb9fc9c8 Setup error logging 2024-02-12 14:01:00 +01:00
Adria Navarro 3ee555e72a Fix js tests 2024-02-12 12:50:23 +01:00
Adria Navarro 6cdfd4b621 Lint 2024-02-12 12:36:29 +01:00
Adria Navarro 8651a836a5 Fix exports 2024-02-12 12:34:39 +01:00
Adria Navarro 231c8ccaab Make code more readable 2024-02-12 12:33:16 +01:00
Adria Navarro ffdfb731fb Fix tests 2024-02-12 12:25:56 +01:00
Adria Navarro 2c26b55a7c Handle view creation on new table requests 2024-02-12 11:59:05 +01:00
Adria Navarro f1a75b84b4 Add test 2024-02-12 11:03:08 +01:00
Adria Navarro f1b31b4119 Export type 2024-02-12 11:03:08 +01:00
Adria Navarro c18a3d4abb Add creation tests 2024-02-12 11:03:08 +01:00
mike12345567 8bf79c5f10 Adding some basic cron validation to publishing, currently the error is not explained if it is hit - still need some frontend for this, but this now means that an error is provided to users when attempting to publish, and we can re-use this validation in the automation UI. Need to have both backend and frontend validation as invalid CRONs will already exist, backend makes sure these are error'd on. 2024-02-09 18:04:40 +00:00
Adria Navarro 0e5fea0932 Fix tests 2024-02-09 17:06:33 +01:00
Adria Navarro c42a8969c8 Fix build 2024-02-09 16:55:58 +01:00
Adria Navarro cc715b7722 Revert scriptRunner changes to use vm2 2024-02-09 16:37:37 +01:00
Adria Navarro 7ce9756d8c Revert jsRunner changes to vm 2024-02-09 16:36:43 +01:00
Adria Navarro e39bd1869e Install vm2 2024-02-09 16:21:38 +01:00
Adria Navarro 72802961ad
Merge branch 'master' into remove-vm2-from-stringtemplates 2024-02-09 13:41:15 +01:00
Adria Navarro 3d936069cd
Merge branch 'master' into remove-vm2-from-stringtemplates 2024-02-09 13:22:00 +01:00
Adria Navarro f7583b2431 Add options 2024-02-09 13:20:21 +01:00
Adria Navarro a67885d112
Merge branch 'master' into chore/trace-js 2024-02-09 13:17:51 +01:00
Adria Navarro 10c59e1ff6 Remove events 2024-02-09 13:17:28 +01:00
Sam Rose 77b3d479a0
Update dd-trace to 5.2.0. 2024-02-09 12:01:37 +00:00
Adria Navarro bbab639e27
Merge branch 'master' into chore/trace-js 2024-02-09 12:52:42 +01:00
Adria Navarro 32723d7121 Trace scriptRunner 2024-02-09 12:51:57 +01:00
Adria Navarro 790d8fcf09 Trace scriptRunner.execute 2024-02-09 12:41:00 +01:00
Sam Rose 51280b5526
Make import/export fs calls as async as possible. 2024-02-09 10:49:24 +00:00
Adria Navarro 0db98f7fb1 Move sandbox escape test to server 2024-02-09 10:35:58 +01:00
Adria Navarro 573096e869
Merge branch 'master' into revert-12934-revert-12930-revert-12929-revert-12769-isolated-vm 2024-02-08 18:15:36 +01:00
Sam Rose 8e9db069e5
Remove all uses of test.com in the code, replace them with example.com and create a lint rule to prevent this in future. 2024-02-08 16:32:14 +00:00
Adria Navarro ce483e8c12
Merge pull request #12964 from Budibase/fix-bson
Fix BSON usage for isolated-vm
2024-02-08 16:33:43 +01:00
Sam Rose 75c2392b60
Flesh out Postgres tests, add MySQL tests. 2024-02-08 15:32:38 +00:00
Adria Navarro 411dd55259 Update types 2024-02-08 16:27:48 +01:00
Adria Navarro 5bc9eb884a Make timeout per request more specific 2024-02-08 16:23:27 +01:00
Adria Navarro 1e101744de Make timeout per invocation more specific 2024-02-08 16:20:33 +01:00
Adria Navarro a55e75ae18 Merge branch 'isolated-vm-wrapper' into fix-bson 2024-02-08 13:54:25 +01:00
Adria Navarro c57ccbc046 Fix adding to context 2024-02-08 13:51:36 +01:00
Adria Navarro 2ffe3d7153 Remove debugger 2024-02-08 13:47:27 +01:00
Adria Navarro 57952131ac Replace # for privates 2024-02-08 13:44:07 +01:00
Adria Navarro 168a546dd1 Clean 2024-02-08 13:32:24 +01:00
Adria Navarro fb57cb15ac Fix parsing utf8 results 2024-02-08 13:22:28 +01:00
Adria Navarro 2bcf7f5fd7 Remove bson knowledge from execute 2024-02-08 13:13:09 +01:00
Adria Navarro abe09509f0 Fix bson 2024-02-08 12:32:07 +01:00
Adria Navarro d1d005dbbc DRY 2024-02-08 11:26:51 +01:00
Adria Navarro d293abc8e8 Merge branch 'isolated-vm-wrapper' into fix-bson 2024-02-08 10:58:12 +01:00
Adria Navarro 72c122105f Clean code 2024-02-08 10:51:42 +01:00
Adria Navarro 7972f19cd1 Merge isolated-vm-wrapper 2024-02-08 10:45:00 +01:00
Adria Navarro 9d335b7fb1 Fix perRequestLimit 2024-02-08 09:38:09 +01:00
Adria Navarro 008b39abf4 Use wrapper for scripts 2024-02-08 09:38:09 +01:00
Adria Navarro e4285e30f1 Use wrapper for queries 2024-02-08 09:38:09 +01:00
Adria Navarro 7693a1fc69 Fix imports 2024-02-08 09:38:09 +01:00
Adria Navarro c44119b3f9 Callbacks 2024-02-08 09:38:09 +01:00
Adria Navarro 0d0171fa08 Move cpulimits responsability 2024-02-08 09:38:09 +01:00
Adria Navarro 3b8b60aa03 Use wrapper 2024-02-08 09:38:09 +01:00
Adria Navarro c5abb4f846 Create wrapper 2024-02-08 09:38:09 +01:00
Adria Navarro 0ea7a515de Use bson library to parse to json 2024-02-07 16:14:56 +01:00
Adria Navarro b8ebeff71c Add comments 2024-02-07 15:18:17 +01:00
Adria Navarro a7859f7fd8 Fix test 2024-02-07 14:09:19 +01:00
Adria Navarro 6cafbbf036 Instantiate module 2024-02-07 13:47:43 +01:00
Adria Navarro 456edfa7b4 Fix mongo findOneAndUpdate 2024-02-07 13:37:06 +01:00
Adria Navarro e2a1d8c880 Refactor 2024-02-07 10:58:43 +01:00
Adria Navarro 1ee20b0464 Fields as private 2024-02-07 10:58:43 +01:00
Adria Navarro 599860b558 Use bson only for mongo 2024-02-07 10:58:43 +01:00
Adria Navarro 716e642d08 Types 2024-02-07 10:58:43 +01:00
Adria Navarro 0b0b6ddb13 Memory limit via env 2024-02-07 10:58:43 +01:00
Adria Navarro 9a45017532 Update docker-compose 2024-02-07 10:58:42 +01:00
Adria Navarro 7a9187d4dc Use new loadBundle function 2024-02-07 10:58:42 +01:00
Adria Navarro a273276bd3 Use bson in isolated-vm 2024-02-07 10:58:42 +01:00
Adria Navarro 2c95920f65 Add mongo docker-compose integration 2024-02-07 10:58:42 +01:00
Adria Navarro e72e7c614a
Merge branch 'master' into revert-12934-revert-12930-revert-12929-revert-12769-isolated-vm 2024-02-07 10:57:28 +01:00
Adria Navarro 8e85f9e444 Replace expect.anything for type checks 2024-02-07 10:49:38 +01:00
Adria Navarro b8d22d6ef1 Lint 2024-02-07 00:01:09 +01:00
Adria Navarro 2c4601440f Merge branch 'master' into revert-12934-revert-12930-revert-12929-revert-12769-isolated-vm 2024-02-06 17:53:22 +01:00
Sam Rose 3be9ad7d78
Disable schema dumping for Postgres in Budicloud. 2024-02-06 15:47:47 +00:00
Martin McKeaveney f089a0fdf5
Merge pull request #12632 from Budibase/security/patches
Security/patches
2024-02-06 17:42:53 +02:00
Sam Rose 0a30fb3364
Merge branch 'master' of github.com:budibase/budibase into mongo-tests 2024-02-06 10:51:18 +00:00
Sam Rose 8bb25c4715
More MongoDB query tests. 2024-02-06 10:47:47 +00:00
Adria Navarro fde2af9a28 Add helpers in order to fix tests 2024-02-06 11:30:44 +01:00
Adria Navarro 4df738acb7 Fix tests 2024-02-06 10:49:11 +01:00
Adria Navarro 6bc5bf5be1 Clean 2024-02-06 10:42:44 +01:00
Adria Navarro 1dbcaf60d8 Lint 2024-02-06 10:28:06 +01:00
Adria Navarro 792283d8b5 Add readme 2024-02-06 10:18:58 +01:00
Adria Navarro 719062ab2f Remove bundles from string-templates 2024-02-06 10:06:26 +01:00
Adria Navarro f7c16f632b Bundle via esbuild 2024-02-06 10:05:17 +01:00
Adria Navarro b28890b401 Load 2024-02-06 10:04:54 +01:00
Adria Navarro 40ae4d1852 Rebuild bundle 2024-02-06 10:04:24 +01:00
mike12345567 9a8c31a2a4 Handling deletion of rows that violate constraints, this has been an issue in Budibase for some time and causes some confusion, attempting to resolve this when deleting rows. 2024-02-05 18:57:16 +00:00
Sam Rose 4d1b13f754
Flesh out MongoDB query tests a bit more. 2024-02-05 17:45:38 +00:00
Adria Navarro 221ac36ff1 Bundle as txt 2024-02-05 18:26:55 +01:00
Adria Navarro f28417a776 Move bundle for ivm to server 2024-02-05 18:26:39 +01:00
Sam Rose 7a012f1f4b
Add tests for create queries. 2024-02-05 16:49:21 +00:00
mike12345567 e8e7eea47a Adding some test cases for aliasing. 2024-02-05 15:23:24 +00:00
Sam Rose a773841518
Improve error messages relating to failing to connect to datasources. 2024-02-05 14:53:05 +00:00
Sam Rose 1573242031
Respond to PR feedback. 2024-02-05 14:26:19 +00:00
mike12345567 c4f4a46d70 Quick fix based on testing. 2024-02-05 12:45:19 +00:00
Sam Rose 871e1f3806
Remove empty file. 2024-02-05 11:54:33 +00:00
Sam Rose bb1c5c93d2
Remove shorter timeout on MongoDB tests. 2024-02-05 11:45:50 +00:00
Sam Rose 7cceb04ca2
Basic Postgres and Mongo query testcases. 2024-02-05 11:43:40 +00:00
mike12345567 f73f78c67c Merge branch 'master' of github.com:Budibase/budibase into feature/sql-query-aliasing 2024-02-05 10:04:07 +00:00
Adria Navarro 62994c2026 Lint 2024-02-05 10:20:12 +01:00
Adria Navarro 75f8b40cc4 Clean code 2024-02-05 10:18:49 +01:00
Martin McKeaveney b17bd4d8fd merge 2024-02-02 17:00:09 -03:00
melohagan be0ff766f3
Chore/fix worker request error message (#12943)
* Revert "Surface email error (#12837)"

This reverts commit 2a24c85378.

* Improve workerRequest error handling

* update account portal

* Fix typing

* lint
2024-02-02 15:25:18 +00:00
Adria Navarro 8dfcc3aeb1
Revert "Revert "Migrate from `vm` to `isolated-vm`"" 2024-02-02 12:02:09 +01:00
Sam Rose 332a201ae7
Revert "Migrate from `vm` to `isolated-vm`" 2024-02-02 09:51:46 +00:00
mike12345567 2ec4fd5d67 Fixing executeScript test cases to cover the issue we experienced, make sure context is correctly accessible. 2024-02-01 16:11:44 +00:00
mike12345567 6cad0e758f Quick fix for automation JS scripting, make sure context is passed through correctly. 2024-02-01 16:00:58 +00:00
Adria Navarro 87501bf25e
Merge branch 'master' into isolated-vm 2024-02-01 13:15:47 +01:00
Adria Navarro 2ea70e1010
Merge pull request #12922 from Budibase/test-isolated-vm
Test isolated vm
2024-02-01 13:15:33 +01:00
Michael Drury 8576a71128
Merge branch 'master' into fix/very-large-backups 2024-02-01 11:45:19 +00:00
Adria Navarro 3aff1004c8
Merge branch 'master' into isolated-vm 2024-02-01 12:42:48 +01:00
Adria Navarro 3808718004 Fix tests 2024-02-01 12:42:23 +01:00
Adria Navarro 843d95c3bb Lint 2024-02-01 12:30:59 +01:00
Adria Navarro 1439eb9b27 Fix stripProtocol 2024-02-01 12:20:31 +01:00
mike12345567 c4eae33b67 Fixing mock to cover getReadStream in object store. 2024-02-01 11:09:28 +00:00
Adria Navarro d1cf13707d Fix url.escape 2024-02-01 11:57:22 +01:00
Adria Navarro 1b88700d02 Test random helper 2024-02-01 11:17:55 +01:00
Adria Navarro 2899c4f7f8 Test uuid helper 2024-02-01 11:15:36 +01:00
Adria Navarro 181d462cdf Update uuid 2024-02-01 11:15:21 +01:00
Adria Navarro 4461c49f48 Allow skipping tests 2024-02-01 10:58:20 +01:00
Adria Navarro 82db76627f Better typing 2024-02-01 10:56:59 +01:00
mike12345567 010f160fa5 Cleaning up files after import is finished (with large files this saves on tmp space) as well as fixing an issue where menu would appear next to a restore despite having no options. 2024-01-31 18:22:18 +00:00
Adria Navarro e6ae364918 Register server helpers 2024-01-31 17:49:55 +01:00
Adria Navarro b96ca1cf54 Run hbs on server tests 2024-01-31 17:49:55 +01:00
Adria Navarro 786acaa121 Add basic test 2024-01-31 17:49:55 +01:00
Adria Navarro ed7b89f2f9 Move jsRunner to folder 2024-01-31 17:49:55 +01:00
Adria Navarro 507aa8af93 Simplify and remove magic strings 2024-01-31 17:05:20 +01:00
Adria Navarro 805b24975b Allow configuring memory limits 2024-01-31 16:55:59 +01:00
Adria Navarro 60dc6822cf Run only once 2024-01-31 12:41:34 +01:00
Adria Navarro 623b4f5dab
Merge branch 'master' into isolated-vm 2024-01-31 10:47:08 +01:00
mike12345567 bb0b776684 Updating how aliasing is handled. 2024-01-30 17:57:10 +00:00
Peter Clement c915442a9e
Merge branch 'master' into fix/pc-fixes 2024-01-30 16:53:38 +00:00
Peter Clement 9c47671032 fix issue with automation setting sync 2024-01-30 15:39:12 +00:00
mike12345567 09a0d00aa7 Fixing some test cases. 2024-01-30 13:50:36 +00:00
mike12345567 5d2ba68fae Adding test case based on capture of real failing query. 2024-01-30 13:35:45 +00:00
mike12345567 e0d2ec6630 Merge branch 'master' of github.com:Budibase/budibase into feature/sql-query-aliasing 2024-01-30 12:58:22 +00:00
Michael Drury b69559566a
Merge branch 'master' into string-split-check 2024-01-30 11:38:03 +00:00
mike12345567 7245ceb58f Merge branch 'master' of github.com:Budibase/budibase into feature/sql-query-aliasing 2024-01-30 11:32:09 +00:00
Sam Rose b3c949b091
Fix case where if a binding returned an int it would throw an error. 2024-01-30 11:06:09 +00:00
Sam Rose 72d63d0c00
Rename executeSynchronously to be a bit less confusing, as it does not execute synchronously. 2024-01-30 10:57:25 +00:00
Sam Rose 456817ee7b
More loop step typing improvements. 2024-01-30 10:37:23 +00:00
Sam Rose 67a848bb86
Fix tests. 2024-01-30 10:23:11 +00:00
Sam Rose 669b0743ac
Typing improvements around automation loop tests. 2024-01-30 10:00:44 +00:00
Adria Navarro 1024bd1dbf Lint 2024-01-30 09:23:28 +01:00
Adria Navarro 9da9935c95 Types 2024-01-29 23:25:12 +01:00
Adria Navarro 7394a7cd64 Smart typing 2024-01-29 23:19:07 +01:00
Adria Navarro ff75fbf99e Convert query.sec.spec.ts to ts 2024-01-29 22:57:20 +01:00
Adria Navarro 9e4a2542e1 Fix test 2024-01-29 19:17:07 +01:00
Sam Rose 2bfa4c6f91
Mild refactor of stringSplit to make it easier to understand. 2024-01-29 17:43:08 +00:00
Sam Rose b5672d676f
Add a check to stringSplit that gives a nicer error message is a non-string is passed. 2024-01-29 17:38:52 +00:00
Adria Navarro 51406a80da Fix test 2024-01-29 16:18:34 +01:00
Adria Navarro f3f6e0c41b Fix tests 2024-01-29 15:43:35 +01:00
Adria Navarro aca7b50dc5 Fix tests 2024-01-29 15:27:09 +01:00
Adria Navarro d806029075
Merge branch 'master' into remove_test_flakiness 2024-01-29 15:21:24 +01:00
mike12345567 6964e2d146 Fixing update aliasing. 2024-01-29 13:43:51 +00:00
mike12345567 fcf8cf61da Merge branch 'master' of github.com:Budibase/budibase into feature/sql-query-aliasing 2024-01-29 12:35:54 +00:00
mike12345567 41c1c6ae65 Fixing type build issue. 2024-01-26 17:01:56 +00:00
mike12345567 acc7868634 Fixing accidental removed character. 2024-01-26 16:52:19 +00:00