Commit Graph

2017 Commits

Author SHA1 Message Date
jasquat 4637caff81
some more changes to help with logging in celery (#1302)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-29 11:28:43 -04:00
dependabot[bot] 1da395a8d5
Bump typing-extensions from 4.9.0 to 4.10.0 in /spiffworkflow-backend (#1299)
Bumps [typing-extensions](https://github.com/python/typing_extensions) from 4.9.0 to 4.10.0.
- [Release notes](https://github.com/python/typing_extensions/releases)
- [Changelog](https://github.com/python/typing_extensions/blob/main/CHANGELOG.md)
- [Commits](https://github.com/python/typing_extensions/compare/4.9.0...4.10.0)

---
updated-dependencies:
- dependency-name: typing-extensions
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-29 14:56:02 +00:00
jasquat 13d7fa8968
celery logging (#1295)
* some initial code to handle celery logs better w/ burnettk

* some more work to get celery logs properly formatting w/ burnettk

* added logger setup for celery w/ burnettk

* added logger setup for celery w/ burnettk

* use the same logger setup method for both celery and the flask server w/ burnettk

* move the log formatter to own method w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-28 11:48:44 -07:00
dependabot[bot] 8fe75cd320
Bump pytz from 2023.4 to 2024.1 in /spiffworkflow-backend (#1293)
Bumps [pytz](https://github.com/stub42/pytz) from 2023.4 to 2024.1.
- [Release notes](https://github.com/stub42/pytz/releases)
- [Commits](https://github.com/stub42/pytz/compare/release_2023.4...release_2024.1)

---
updated-dependencies:
- dependency-name: pytz
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-28 14:58:24 +00:00
jasquat f508722b5b
do not queue a process instance for celery if the instance is currently locked w/ burnettk (#1288)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-27 14:06:12 -04:00
dependabot[bot] 4a373be939
Bump black from 23.1.0 to 24.3.0 (#1285)
* Bump black from 23.1.0 to 24.3.0

Bumps [black](https://github.com/psf/black) from 23.1.0 to 24.3.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/23.1.0...24.3.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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

* fixed pre commit black issues 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-03-27 14:05:49 -04:00
dependabot[bot] d32f86300f
Bump bandit from 1.7.7 to 1.7.8 in /spiffworkflow-backend (#1286)
Bumps [bandit](https://github.com/PyCQA/bandit) from 1.7.7 to 1.7.8.
- [Release notes](https://github.com/PyCQA/bandit/releases)
- [Commits](https://github.com/PyCQA/bandit/compare/1.7.7...1.7.8)

---
updated-dependencies:
- dependency-name: bandit
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-27 15:28:34 +00:00
jasquat 37902277cc
added a debug endpoint to check celery backend and added return result to celery task w/ burnettk (#1280)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-26 17:31:01 -07:00
jasquat e724cc5856
added ability to retry getting a lock on task submit w/ burnettk (#1279)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-26 17:20:48 -04:00
dependabot[bot] 85e84e6e61
Bump types-pyyaml in /spiffworkflow-backend (#1257)
Bumps [types-pyyaml](https://github.com/python/typeshed) from 6.0.12.12 to 6.0.12.20240311.
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-pyyaml
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kevin Burnett <18027+burnettk@users.noreply.github.com>
2024-03-26 13:04:47 -07:00
jasquat 930cfb720c
Handle pi lock from message service (#1278)
* handle process instance already locked in message service

* moved celery check to own method in message sevice w/ burnettk

* removed initial implementation w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-26 16:04:15 -04:00
jasquat aa7c2b587b
added an event to use when a process instance is forced to run w/ burnettk (#1277)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-26 11:44:41 -04:00
jbirddog e8d2396b38
Upsearch api (#1259)
* Run partial tests, add sqlite var

* Add upsearch api

* Getting ./bin/pyl to pass

* Getting ./bin/pyl to pass

* Clean up fixtures

* Revert this change

* PR feedback - use actual schema for api.yml

* Hopefully fix the permissions
2024-03-26 07:56:24 -07:00
jasquat a12d2883c1
Bpmn unit test from pi (#1262)
* added most of the code needed to generate a bpmn unit test from a process instance w/ burnettk

* pyl and tests are passing

* renamed some files and some clean up

* added api method to generate test case w/ burnettk

* debugging the generate test api w/ burnettk

* test case generator test case is now passing w/ burnettk

* added test for TaskMismatchError w/ burnettk

* added support for extension to create bpmn unit tests with the api w/ burnettk

* coderabbit and typeguard fixes w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-26 10:14:57 -04:00
jasquat b5b8031b44
fix-human-task-guid-fk (#1260)
* removed human_task_ibfk_5 from old migration file and updated task id removal migration to work with both mysql and postgres w/ burnettk

* use sqlalchemy error classes instead of mysql w/ burnettk

* mypy w/ burnettk

* remove deprecated cypress config w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-25 14:32:44 -04:00
jasquat ab9e823dcf
added public permissions to basic macro w/ burnettk 2024-03-22 12:00:00 -04:00
jasquat 0db1727a99
Bugfix/data object management (#1243)
* initial updates to prepare for data object data migration w/ burnettk

* added method to import bpmn_process_dict to the database w/ burnettk

* test to ensure we can import json is passing w/ burnettk

* added some more tests around importing bpmn process json w/ burnettk

* version 4 migration test is now passing w/ burnettk

* spiff lib back to main after its merge

* some coderabbit suggestions

* do not run version 3 and 4 migrations twice w/ burnettk

* build docker images for this branch w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-03-21 12:00:03 -04:00
jasquat 709a0c8492
Merge guest flow into unauth flow (#1233)
* removed some portions of the guest access flow in favor of the unauthed flow w/ burnettk

* removed guest access from auth flow in backend w/ burnettk

* updated frontend to use new public api for guest tasks

* fixed tests and updated get task url script to choose between public and non public urls

* removed old guest task support from frontend

* return 404 when a task cannot be found w/ burnettk

* fixed typo in group list tiles w/ burnettk

* added cypress tests for public formg w/ burnettk

* display metadata key for urls instead of values w/ burnettk

* updated permissions for acceptance testss w/ burnettk

* set up permissions for public group if it is in the list and login and logout admin user in ci to ensure permissions are set w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-19 11:52:27 -07:00
jasquat 9acd2954bb
Unauthed endpoint support (#1210)
* some basic updates for unauthed endpoints and the start of a test w/ burnettk

* added logic to create public access token if appropriate w/ burnettk

* updated message_form_show to return the rjs form w/ burnettk

* pyl w/ burnettk

* WIP: adding public routes to frontend w/ burnettk

* added public message form page to start a process instance w/ burnettk

* added api endpoint to submit message task data w/ burnettk

* allow switching rjsf themes in customform w/ burnettk

* we can submit a public message form w/ burnettk

* add message start submit to public exclusion list w/ burnettk

* run message submit in synchronous mode w/ burnettk

* a little refactoring to get ready for submitting unauthed tasks w/ burnettk

* created public controller w/ burnettk

* added api endpoint to submit additional public forms w/ burnettk

* added ability to submit a second form from the public web ui w/ burnettk

* some clean up and show markdown confirmation messages w/ burnettk

* added support for instructions and added a logout page for public users w/ burnettk

* support instructions for end user on the start message event as well w/ burnettk

* minor tweaks to public logout page w/ burnettk

* pyl w/ burnettk

* log unsupported form in custom form w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-14 15:55:37 -04:00
Dan Funk f8f64c3350
Allow deleting api keys after use. (#1206) 2024-03-14 10:43:14 -04:00
burnettk 420e9e32a8
let restricted script engine use random 2024-03-12 12:11:57 -04:00
jasquat 816d0607a2
run do engine steps for message start events even in async mode to ensure tasks are committed to the db properly w/ burnettk (#1191)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-11 17:26:37 -04:00
Dan Funk e2714fb5fd Fixing line endings on a markdown file. 2024-03-11 14:57:50 -04:00
Dan Funk 4a30b814fe just some updated docs. 2024-03-11 14:36:04 -04:00
Dan Funk 86b31d20cb
Messages as MicroServices (#1185)
* Purpose:  Allow the messages api endpoint to accept arbitrary JSON in it's body - and to respond with the latest task_data - this will allow you to create BPMN processes are that can function as microservices.

* Fixing a bug that prevented the synchronous execution of a message post.
* A message post directly uses the body of the post, do not specify it within a "payload".
* The message response is not just the process instance details, it now contains the "process_instance" and "task_data" at the top level of the returned json.
* The last completed task data is now returned as a part of a response to the message api endpoint, it is with the "task_data" attribute.

* CodeRabbit suggestions

* run_pyl fixes

* fix lint

---------

Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-03-11 11:24:31 -07:00
jbirddog 9c6c99db8e
Add min/max to the function allow list (#1187) 2024-03-11 10:18:37 -04:00
Dan Funk 137e8a8232
Docs/pycharm setup (#1169)
* Just some notes from getting my dev environnent set up again.

* fix readme link

* fixing black configuration.

* Black config settings in pre-commit.

* Update README.md

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

* Update README.md

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

* Update spiffworkflow-backend/docs/pycharm.md

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

* Update spiffworkflow-backend/docs/pycharm.md

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

* Update spiffworkflow-backend/docs/pycharm.md

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

* Update spiffworkflow-backend/docs/pycharm.md

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

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-03-07 14:40:24 -05:00
jasquat bc3708bb00
async-support-on-message-start (#1173)
* added async and sync support for the message start api w/ burnettk

* removed debug dump call w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-06 13:43:06 -08:00
jasquat a762efca33
remove unnecessary queue to celery when submitting a task w/ burnettk 2024-03-06 16:34:49 -05:00
jasquat f1abed13d6
remove unused arg from celery worker producer w/ burnettk 2024-03-06 15:48:24 -05:00
jasquat bc2852c984
added swagger docs to exclusion list (#1170)
* added swagger docs to exclusion list w/ burnettk

* added test for swagger docs w/ burnettk

* pyl w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-06 09:47:20 -05:00
jasquat 31b84c60e3
updated cryptography for security w/ burnettk 2024-03-05 14:43:55 -05:00
jasquat 0507f9cd8b
set request body schemas to open schemas rather than using incorrect ones w/ burnettk (#1168)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-05 11:35:30 -08:00
jasquat 2be7db73df
Feature/async support on pi run (#1161)
* added execution mode to task submit and pi run calls to run in async or sync mode w/ burnettk

* do not allow requesting async mode without celery w/ burnettk

* attempt to move queue checking for celery and async to same method to avoid confusing methods w/ burnettk

* if requesting synchronous mode then run with greedy as well w/ burnettk

* implemented some coderabbit suggestions w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-05 08:20:54 -08:00
Kevin Burnett bcf0593ebc
bpmn unit test framework improvements for json issue (#1162)
* added the contents of script engine init to the process model test running init w/ burnettk

* get backend scripts

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-03-05 03:49:18 -08:00
Kevin Burnett 3416843329
spiff lib upgrade (#1139)
* wip spiff lib upgrade

* unit and script tests are now passing w/ burnettk

* tests and pre-commit are passing

* pass None in as external_context as named param instead of creating a variable w/ burnettk

* some extra debugging in case bpmn_xml_file_contents is empty w/ burnettk

---------

Co-authored-by: burnettk <burnettk@users.noreply.github.com>
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-04 12:29:37 -08:00
jasquat 4cebddb6c2
commit the db at the end of the save method in the processor to avoid race conditions between process instance and human task w/ burnettk (#1158)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-04 14:27:27 -05:00
jasquat a71af6e40f
Tcoz openai assist (#1138)
* Update README.md

Some notes for people that might want to run full-on native, with detail about how Mac hijacks port 7000 and how to get around it.

* Revert "Update README.md"

This reverts commit 096887c26d.

* README update and native code patch

Some details for user that might be running Python3, Mac, and want to run everything locally/natively.

* Implement basic tooltips

Uses MUI tooltip, as it behaves more predictably with existing styling, and enables top-level theme config.

Top-level configuration for all MUI components can be controlled via overriding the existing theme. See index.tsx. This could be done per user for customization, etc.

Enabling JSON module imports in tsconfig.json seemed to fix the error in ReactDiagramEditor

* Naive AI code editor implementation

A working starting point.

* Implement API to return if script assist should be enabled

Along with route and function, api config, etc.

* UI calls backend to see if script assist is enabled.

If it is, loads the related UI, otherwise it doesn't appear.

* Moving forward with service for message processing.

* Services scaffolded

* Open API called, prompt-engineered to get script only.

* Little cleanup work

* Enabled + process message working.

Had to find all the places permissions are enabled, etc.

* Cleanup, comments, etc.

* Env vars, styling, error cases, conditional display of script assist

Finishing touches for the most part.

REQUIRES TWO ENV VARS BE SET.

SPIFFWORKFLOW_SCRIPT_ASSIST_ENABLED=["True" | "true" | 1]  (anything else is false)
SECRET_KEY_OPENAI_API=[thekey]

The are retrieved in default.py. I run the app locally, so I just set them in the terminal.

NEW INSTALL: @carbon/colors (so we consistently use carbon palette etc.)

* Fix tooltips, clean up some styling.

Finishing it off.

* Add loader and error message

Complete UX stuff

* Update useScriptAssistEnabled.tsx

Remove log

* Update script_assist_controller.py

Add this tweak to avoid TMI.

* Some reasonable changes suggested by the build process

* Comments from PR.

* Update ProcessModelEditDiagram.tsx

Should (but I don't know how to tell yet) call the change handler that wasn't firing before.

* updated the permissions setting in authorization service w/ burnettk

* precommit now passes. tests are failing w/ burnettk

* pinned SpiffWorkflow to known working version and fixed tests. we will update spiff in a later pr w/ burnettk

* made changes based on coderabbi suggestions

* updated the error handling to be more inline with how we have handled other errors and some ui tweaks

* removed pymysql package w/ burnettk

* forgot to remove pymysql from lock file w/ burnettk

---------

Co-authored-by: Tim Consolazio <tcoz@tcoz.com>
Co-authored-by: Kevin Burnett <18027+burnettk@users.noreply.github.com>
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-04 10:42:27 -05:00
Kevin Burnett e584d47205
support bpmn unit test method mocks (#1146)
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-03-03 06:50:38 -08:00
jbirddog 222685155a
Fix for first time use of dev containers in clean environment (#1136) 2024-03-01 15:28:06 -05:00
Kevin Burnett 4d9946cc91
make a script engine for bpmn unit tests (#1145)
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-03-01 08:50:07 -08:00
jasquat 346d7a4660
task-show-render-instructions-fix (#1142)
* add the jinja rendered instructions back to the extensions list before returning

* fixed comment

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-03-01 10:49:44 -05:00
Kevin Burnett 72629f5ed8
unblock bpmn unit testing with duplicate files, our script engine, get process initiator user (#1140)
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-02-29 16:21:13 -08:00
jasquat 0565e63e98
do not overwrite the instructionsForEndUser on the spec object with the rendered instructions w/ burnettk (#1135)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-02-29 11:39:12 -08:00
jasquat 4cf70a8e9b
feature/support-google-oauth (#1125)
* support decrypting and validating jwt tokens from google auth w/ burnettk

* moved code as suggested by coderabbit

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-02-29 07:06:54 -08:00
jbirddog 840dd74cea
Update secrets programmatically (#1122)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-02-29 09:55:09 -05:00
jbirddog bb3a685138
Dev containers now work with "run as me" (#1129) 2024-02-29 05:27:06 -05:00
jasquat b2126e8f38
check if the dir looks like it is a git directory already before cloning to it w/ burnettk 2024-02-28 14:25:38 -05:00
jasquat 947c00670d
set the GIT_SSH_COMMAND so we can use the private key path 2024-02-28 11:07:29 -05:00
jasquat 11226167cc
Merge branch 'main' of github.com:sartography/spiff-arena 2024-02-28 10:35:38 -05:00