Commit Graph

1702 Commits

Author SHA1 Message Date
jasquat 1d79d77686
Celery avoid requeueing (#1828)
* some debug code and potential fixes to avoid requeueing future tasks w/ burnettk

* actually insert the queued time into the future task table w/ burnettk

* fixed tests w/ burnettk

* handle missing process instances better from celery worker and updated some comments w/ burnettk

* added comment w/ burnettk

* minor fixes w/ burnettk

* added test for should_schedule_waiting_timer_events w/ burnettk

* added test to ensure we do not queue recently queued tasks again w/ burnettk

* remove traceback code

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-06-26 10:48:28 -07:00
pixeebot[bot] 26149ae339
Sandbox Process Creation (#1799)
* Sandbox Process Creation

* lib already in backend

* update security

* no need to test with newlines, hopefully, since they are not allowed by security lib

* typing things

---------

Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-06-25 16:24:41 -07:00
Kevin Burnett ce6dc339c8
avoid prompt to save if no save button (#1806)
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-06-25 07:36:49 -07:00
jasquat 5e3831f4d6
message-model-perm-check (#1805)
* check if user has permissions to messages before attempting call w/ burnettk

* fixed variable typo w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-06-24 12:36:07 -07:00
jasquat d2e005022b
use the greedy strategy when running messages from the background processor w/ burnettk (#1798)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-06-21 16:22:42 -04:00
jasquat 4dbcd8a655
improved-celery-logging (#1785)
* updated logging for celery workers w/ burnettk

* fixed indentation error

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-06-21 09:51:36 -04:00
jasquat eed946260c
Test migration change (#1784)
* added tests to ensure migrations do not change w/ burnettk

* fixed tests w/ burnettk

* pyl w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-06-20 12:38:59 -07:00
Kevin Burnett 0f31260570
Scrap openai lib (#1782)
* scrap openai lib

* iterate

* bring down temperature and top_p

* remove lib

---------

Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-06-20 11:58:00 -07:00
jasquat b62da219df
updated serializer version to reflect version 5 data migration 2024-06-20 13:39:08 -04:00
jbirddog ad0cf83cb6
Support non task data environment, step 1 (#1745) 2024-06-20 07:56:49 -04:00
Kevin Burnett bcf13bd46a
schedule waiting timer events after saving tasks because foreign keys (#1762)
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-06-18 14:37:26 -07:00
jasquat 6fad14ae6f
do not try to queue task if the pi cannot be found and delete future tasks if parent task deleted w/ burnettk (#1761)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-06-18 13:54:09 -07:00
pixeebot[bot] f487f905a5
Sandbox URL Creation (#1739)
* Sandbox URL Creation

* add security lib to correct location w/ burnettk

---------

Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
Co-authored-by: Kevin Burnett <18027+burnettk@users.noreply.github.com>
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-06-18 12:38:17 -07:00
Ayoub Ait Lachgar 81f2f6191b
Feature/message editor improved UI (#1754)
* retrieval_expressions should be a string and not an array in this context w/ burnettk

* Improve message editor ui

* Check if CorrelationProperties arent synced

* Merge Imporoved UI for messages

* some linting fixes

* more linting

* some updates for linting and updated bpmn-js-spiffworkflow w/ burnettk

* removed unused console.log w/ burnettk

* fix language w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-06-18 15:15:25 -04:00
jasquat 9957fc144a
update the hash column in json data table on duplicate entry w/ burnettk (#1750)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-06-18 12:08:44 -07:00
Kevin Burnett 0bccdb7cba
No auth for metrics (#1757)
* config scope

* no auth for metrics

* Update spiffworkflow-backend/src/spiffworkflow_backend/services/authorization_service.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: burnettk <burnettk@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-06-18 14:23:26 -04:00
Kevin Burnett 538fbf261c
config scope (#1755)
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-06-18 14:21:26 -04:00
dependabot[bot] 54fc875e59
Bump mypy from 1.9.0 to 1.10.0 in /spiffworkflow-backend (#1729)
* Bump mypy from 1.9.0 to 1.10.0 in /spiffworkflow-backend

Bumps [mypy](https://github.com/python/mypy) from 1.9.0 to 1.10.0.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python/mypy/compare/1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* fixed mypy issue w/ burnettk

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-06-17 13:34:44 -07:00
Kevin Burnett 991759deee
Generate markdown table (#1738)
* script for markdown table

* refactor

* refactor

* allow kwargs

* tests

* refactor tests

* sanitize markdown

* Update spiffworkflow-backend/src/spiffworkflow_backend/scripts/generate_markdown_table.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update spiffworkflow-backend/src/spiffworkflow_backend/scripts/generate_markdown_table.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* lint

* allow turning off sanitization for a column w/ burnettk

---------

Co-authored-by: burnettk <burnettk@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-06-17 13:33:53 -07:00
jbirddog 613d09c958
Only save all process models when a new bpmn file is added (#1725) 2024-06-12 14:50:08 -04:00
jasquat a63bba7257
use logging since celerly does not pass in a real logger w/ burnettk (#1715)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-06-12 11:23:28 -07:00
jbirddog 5659171fa3
Fix dictionary changed size during iteration error (#1711) 2024-06-12 08:00:50 -04:00
jasquat 7536bc3716
only create the force run event if the instance was actually forced to run w/ burnettk (#1713)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-06-11 14:40:04 -04:00
Kevin Burnett eae5f7dd2d
the big message improvements branch (#1549)
* imported patch from old message_improvements branch w/ burnettk

* wip.

* merging in changes from message_improvements

* remove patch files that were accidendetally added.

* Added a modal for editing a correlation.  Added ability to delete whole correlation keys.
A little css cleanup.

* * Removing migration - will add back in at the end.
* The Message models API should not require page and per_age parameters, it will return all.
* The Message model list should return a full json description of all messages/correlations for all containing groups.
*

* wip

* Add import, fix class name

* Getting ./bin/pyl to pass

* Getting ./bin/pyl to pass

* Some fe lint fixes

* Some ruff fixes

* Commands to nuke poetry dirs

* Temp skipping of a couple tests

* Getting ./bin/pyl to pass

* This needs to be back in

* Revert back to main

* Factored out data store handling

* Working on factoring out collecting messages, has test failure

* Formatting

* Fixed up test failures

* Remove commentted out lines

* Adding fields

* Fix merge issue

* Re-enable modal

* WIP

* Untested relationships

* Remove correlation key table

* Remove retrieval expression from uniqueness

* Remove commentted out lines

* WIP

* WIP

* WIP

* WIP

* WIP

* Make mypy pass

* Getting formatters to pass

* Add migration

* WIP fixing tests

* WIP fixing tests

* WIP fixing tests

* WIP fixing tests

* WIP fixing tests

* Getting ./bin/pyl to pass

* Fix skipped test

* Fix skipped test

* Getting ./bin/pyl to pass

* Remove unused method

* Remove unused methods

* Clean up unused code

* Refactor to support creating single messages from the UI

* Untested support for processing one process_group

* WIP test

* WIP test

* Filled out test

* Getting ./bin/pyl to pass

* Message Editor Modal Work

* Change migration and add in schemas.

* Swtich to using the associated branch of the process BPMN.io mods

* Get the backend returning messages created from the frontend to the drop down list in the BPMN.io editor.

* Merge main, fix up test

* Getting ./bin/pyl to pass

* Show path in location

* Rename var

* install packages from bpmn-js-spiffworkflow as well for local development

* process group api can add and update message models now w/ burnettk

* backend tests are passing now w/ burnettk

* the launch message edit button is loading the editor w/ burnettk

* updated bpmn-js-spiffworkflow

* pyl is passing w/ burnettk

* updated bpmn-js-spiffworkflow w/ burnettk

* updated bpmn-js-spiffworkflow w/ burnettk

* fixed console errors w/ burnettk

* a couple tweaks w/ burnettk

* save the message json in the new format from the mform w/ burnettk

* display the correlation props in the form w/ burnettk

* default to empty schema so the format is obvious

* allow removing correlation props from web ui w/ burnettk

* added save notification when saving a message on a process model w/ burnettk

* fixed broken test w/ burnettk

* Updating test cases to new message format, tests are failing

* support schema from messages in frontend

* Fixing tests

* Fixing tests

* Fixing tests

* removed references to correlation keys and removed unused components w/ burnettk

* removed temp mesasge model edit button w/ burnettk

* Make mypy pass

* Fixing tests

* Fixing tests

* Getting ./bin/pyl to pass

* save deleted messages before attempting to add new ones w/ burnettk

* set state for the message id so it can be changed w/ burnettk

* do not wait for the message id to be set since it is not necessary w/ burnettk

* updated bpmn-js-spiffworkflow w/ burnettk

* build images for this branch w/ burnettk

* put location in path of message-models so we can control permissions on it w/ burnettk

* fix black

* some coderabbit suggestions

* pull in spiff fix

* Default schema to {}

* Temp fix for invalid schema

* updated bpmn-js-spiffworkflow

* some updates for issue 1626

* minor name tweaks and attempts to update message dropdown in panel when message changes - does not work yet w/ burnettk

* updated bpmn-js-spiffworkflow w/ burnettk

* attempt to call add_message.returned event when message updates w/ burnettk

* treat formData as a state in the MesasgeEditor so it can be updated when the form contents is modified w/ burnettk

* updated bpmn-js-spiffworkflow w/ burnettk

* Feature/merge correlation properties (#1693)

* Merge XML Correlation properties with Process group properties

* updates for messages w/ burnettk

---------

Co-authored-by: theaubmov <ayoubaitlachgar98@gmail.com>
Co-authored-by: jasquat <jasquat@users.noreply.github.com>

* do not wait for message id state to be set to better support new messages w/ burnettk

* updated SpiffWorkflow w/ burnettk

* some cleanup from coderabbit and linting

* added index to message tables, run typecheck in ci, and other updates while code reviewing w/ burnettk

* updated bpmn-js-spiffworkflow w/ burnettk

* remove branch to build

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
Co-authored-by: danfunk <daniel.h.funk@gmail.com>
Co-authored-by: Jon Herron <jon.herron@yahoo.com>
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
Co-authored-by: jasquat <2487833+jasquat@users.noreply.github.com>
Co-authored-by: theaubmov <ayoubaitlachgar98@gmail.com>
2024-06-10 09:15:54 -07:00
jbirddog 9b8ceb4af8
Prevent KeyError for optional data store writes (#1700) 2024-06-10 11:17:41 -04:00
pixeebot[bot] 62124525d7
Secure Source of Randomness (#1695)
* Secure Source of Randomness

* lint

---------

Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-06-08 18:31:11 -07:00
jasquat 586a088e21
update-spiffworkflow (#1694)
* updated SpiffWorkflow w/ burnettk

* added version 5 migration w/ burnettk

* pyl w/ burnettk

* added test for the version 5 migration w/ burnettk

* fixed the version 5 migration w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-06-07 13:23:19 -07:00
jasquat 10b30f6c14
remove the greater than symbol from the md sanitization method since it causes issues and does not seem to help w/ burnettk (#1685)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-06-06 10:40:50 -04:00
jasquat 4611628554
escape more characters when sanitizing for markdown (#1681)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-06-05 11:02:23 -04:00
jasquat cee36c2d2d
remove-email-service (#1670)
* this library does not seem used so remove it and its dependency from the app

* use the flask version of sentry-sdk so it can install its dependencies

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-06-04 11:51:39 -04:00
burnettk 1f6ca8b727
allow local test tokens to last 24 hours 2024-06-03 13:04:28 -04:00
jasquat 59c1086d55
Pi fix pm gone (#1648)
* some better error logging when the background processor fails w/ burnettk

* handle process model not found issues better and do not raise in handle exception if it is missing w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-05-31 10:12:43 -04:00
burnettk d64f3953e8
fix doc for task list completed, which does not actually filter by calling user 2024-05-30 17:30:48 -04:00
burnettk c5359acaae
remove 172 lines of unused junk from api.yml 2024-05-30 17:03:30 -04:00
jasquat 2992798c5b
reference-cache-integrity-fix-2 (#1645)
* delete from process caller table explicitly before removing from reference cache to hopefully avoid integrity errors

* check if reference cache id list has items to avoid unnecessary db calls

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
Co-authored-by: Kevin Burnett <18027+burnettk@users.noreply.github.com>
2024-05-30 14:15:40 -04:00
jasquat e9022fd2b1
do not restrict blank task list to not started pi but anytime the bpmn process is blank (#1644)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-05-30 10:18:40 -04:00
jasquat 928273c034
blank-task-list-on-new-pi (#1634)
* return a blank task list if the new instance has not started yet and does not have an associated bpmn process

* fixed minor typo

* use ruff instead of black for formatting w/ burnettk

* upgrade ruff and remove references to black w/ burnettk

* remove unnecessary packages for pre-commit w/ burnettk

* we do not use reorder lib w/ burnettk

* ruff is needed w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-05-29 16:25:47 -04:00
jasquat 5db0feb32e
add publish permissions to process model for breadcrumb, not overwrite (#1633)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-05-29 12:01:28 -07:00
jasquat a6a0d35b08
Reference cache integrity fix (#1627)
* added test to make sure process caller relationship table is properly updated and refactored clear reference cache to hopefully fix oddities when attempting to run it w/ burnettk

* fixed pyl w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-05-28 14:13:10 -07:00
burnettk 7a76ecba50
fix typing issues and fix issue i introduced 2024-05-28 17:01:09 -04:00
burnettk 59c697e9bf
lint 2024-05-28 16:51:53 -04:00
Chris Daßler 92229f12f8 chore: Remove unused import 2024-05-27 14:51:57 +02:00
Chris Daßler 6e83494384 fix(): Ensure secure handling of file paths and improve error handling (CodeRabbit suggestion) 2024-05-26 20:50:45 +02:00
Sky 40f3dfca23
Update spiffworkflow-backend/src/spiffworkflow_backend/config/default.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-05-26 20:27:47 +02:00
Chris Daßler 84a47e0efd fix(): AttributeError: 'NoneType' object has no attribute 'startswith' 2024-05-26 20:19:59 +02:00
Chris Daßler 998e08ee6e fix(): Check if secrets file exists 2024-05-26 16:33:37 +02:00
Chris Daßler 3238fb6d6e feat: Using docker secrets - put file contents to env value 2024-05-26 16:19:30 +02:00
jasquat c11577e990
allow guest users to use typeahead w/ burnettk (#1594)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-05-22 13:36:25 -07:00
jbirddog 5bf3ea0db2
Detect duplicate process ids when uploading/creating a new file (#1581)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-05-22 12:18:44 -04:00
dependabot[bot] 191f46b95b
Bump ruff from 0.3.5 to 0.4.4 (#1591)
* ---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* fixed issues with new version of ruff w/ burnettk

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-05-22 11:56:23 -04:00