Commit Graph

2036 Commits

Author SHA1 Message Date
jasquat 293aa867a1
Auth for secrets (#1369)
* added new api to show secrets so we can use that in permissions

* updated frontend to use new secret show value api

* cleaned up secret_show method

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-04-09 13:44:47 -04:00
Kevin Burnett cce555b2ca
ignore venv, and ensure always sort group members to fix flaky test in postgres (#1357)
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-04-08 11:26:07 -07:00
Kevin Burnett 2b6640f24c
Prevent duplicated path prefix elements in generated URLs take two (#1350)
* Prevent duplicated path prefix elements in generated URLs

* add more debug info

* pure refactor

* let flask determine how to access site

* build this branch

* build image

* use more url_for, which includes a slash, and things are working locally

* fix hopefully the last missing url_for

* add some code that works for any openid provider

* one more url_for and remove more backend url config references

---------

Co-authored-by: Bret Mogilefsky <bmogilefsky@gmail.com>
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-04-08 08:50:55 -07:00
jasquat f6943cf059
load all task data when attempting to get the next task instruction w/ burnettk (#1355)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-04-08 07:40:52 -07:00
jasquat 01c749aa0b
Allow setting path prefix (#1344)
* allow setting the path prefix of the server w/ burnettk

* added error in case someone was successfully using SPIFFWORKFLOW_BACKEND_APPLICATION_ROOT w/ burnettk

* Update docs/DevOps_installation_integration/path_based_routing.md

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

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-04-05 15:14:09 -04:00
dependabot[bot] 4ec824523d
Bump mypy from 1.8.0 to 1.9.0 in /spiffworkflow-backend (#1339)
Bumps [mypy](https://github.com/python/mypy) from 1.8.0 to 1.9.0.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python/mypy/compare/v1.8.0...1.9.0)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  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-04-05 14:32:40 +00:00
jasquat 7ae81f47cf
Celery start timer fix (#1337)
* check if pi is enqueued to run in the future before running it in celery w/ burnettk

* only mark future tasks as complete if the corresponding task is complete w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-04-04 16:24:58 -04:00
dependabot[bot] 6789992a76
Bump typeguard from 4.1.5 to 4.2.1 in /spiffworkflow-backend (#1336)
Bumps [typeguard](https://github.com/agronholm/typeguard) from 4.1.5 to 4.2.1.
- [Release notes](https://github.com/agronholm/typeguard/releases)
- [Changelog](https://github.com/agronholm/typeguard/blob/master/docs/versionhistory.rst)
- [Commits](https://github.com/agronholm/typeguard/compare/4.1.5...4.2.1)

---
updated-dependencies:
- dependency-name: typeguard
  dependency-type: direct:development
  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-04-04 15:21:05 +00:00
jasquat 927f150d4f
use backend url in local openid login page w/ burnettk 2024-04-03 16:52:25 -04:00
jasquat 12e7cecd97
local-openid-path-based-fix (#1332)
* use the backend url config for the well-known endpoint since request.host_url will not know about the path w/ burnettk

* attempting to fix run precommit in ci w/ burnettk

* fix constraints location w/ burnettk

* fix correct stanza w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-04-03 16:16:22 -04:00
dependabot[bot] f27455eeda
Bump prometheus-flask-exporter in /spiffworkflow-backend (#1324)
Bumps [prometheus-flask-exporter](https://github.com/rycus86/prometheus_flask_exporter) from 0.22.4 to 0.23.0.
- [Commits](https://github.com/rycus86/prometheus_flask_exporter/compare/0.22.4...0.23.0)

---
updated-dependencies:
- dependency-name: prometheus-flask-exporter
  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>
Co-authored-by: Kevin Burnett <18027+burnettk@users.noreply.github.com>
2024-04-03 11:14:42 -07:00
jasquat b35ab336f5
Omit completed subprocesses (#1327)
* updates to avoid loading completed subprocesses when loading a processor w/ burnettk

* bpmn unit test generator in controller test is passing w/ burnettk

* most tests are passing again w/ burnettk

* tests are all passing now w/ burnettk

* added assertion to reset pi test to ensure task data does come back w/ burnettk

* removed debug benchmark stuff w/ burnettk

* pyl w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-04-03 12:17:14 -04:00
Kevin Burnett d7bd03bb69
simplify build with pip and poetry in one step and no pipx (#1323)
* simplify build with pip and poetry in one step and no pipx

* upgrade setuptools

* just in case

* debug w/ burnettk

* print pwd and ls whenever we call constraints w/ burnettk

* update safety and setuptools to fix ci errors w/ burnettk

---------

Co-authored-by: burnettk <burnettk@users.noreply.github.com>
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-04-03 11:40:50 -04:00
jasquat 280240ca87
lookup 1000 groups when attempting to cache them so we are not restricted to 100 w/ burnettk (#1331)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-04-03 08:22:07 -07:00
jasquat b21a3b3ec7
Celery docs and debug (#1328)
* added script to import process instance and updated some docs for redis and celery w/ burnettk

* pyl and removed bad gitignore w/ burnettk

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-04-02 16:13:18 -04:00
jasquat cef93033e8
do not store pi events when running migrations (#1310)
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2024-04-01 12:24:02 -04:00
dependabot[bot] d3068ae07c
Bump types-pytz in /spiffworkflow-backend (#1316)
Bumps [types-pytz](https://github.com/python/typeshed) from 2022.7.1.2 to 2024.1.0.20240203.
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-pytz
  dependency-type: direct:development
  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-04-01 14:52:18 +00:00
jasquat f24cdecf6d
add the pi id and task guid to errors in celery worker w/ burnettk 2024-03-29 13:56:26 -04:00
Kevin Burnett ef945c458c
log configured frontend url (#1304)
* log configured frontend url

* be more precise

---------

Co-authored-by: burnettk <burnettk@users.noreply.github.com>
2024-03-29 08:53:07 -07:00
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