Commit Graph

2591 Commits

Author SHA1 Message Date
dandds
2ba8c1b0cb Merge pull request #1078 from dod-ccpo/env-beat-schedule
Add a beat processing schedule for environment provisioning jobs.
2019-09-19 10:55:33 -04:00
graham-dds
dab1efd564 coerce unipath objects to strings in app.py
- This change allows the VSCode debugger to work with the app, since it
expects filepaths to be string objects
2019-09-19 10:39:31 -04:00
dandds
7bb9400ea7 Update the flash message for when a new application member is added. 2019-09-19 09:34:00 -04:00
dandds
82c34ee9b1 Display real environment processing status. 2019-09-18 16:34:56 -04:00
dandds
3a23c54723 Add a beat processing schedule for environment provisioning jobs.
The beat schedule is set to once per minute for each of the three
environment provisioning tasks.

Adding a beat schedule surfaced two problems that are addressed here
with the following changes:
- Commit the SQLALchemy session in order to release the environment
  lock. Otherwise the change to the `claimed_until` field is not
  persisted.
- Set `none_as_null` on the JSOB fields on the `Environment`. This
  avoids problems with querying on Postgres JSON fields that are empty.

This also adds a small change to the development command for the Celery
worker. Multiple child processes were executing the beat jobs, which
lead to exceptions for environment locks and confusing log output. This
contrains the dev command to a single Celery worker.
2019-09-18 16:34:56 -04:00
leigh-mil
b7b625750f Use data property of PermissionsForm to return the form data is the correct format 2019-09-18 11:16:55 -04:00
leigh-mil
b35e8cfe8e Update NewMemberForm so that it has the same data structure as the UpdateMemberForm 2019-09-18 11:16:55 -04:00
leigh-mil
d019989f6d Refactor get_members_data() into multiple smaller functions 2019-09-18 11:16:55 -04:00
leigh-mil
e341a73dd1 Remove unused code 2019-09-18 11:16:55 -04:00
leigh-mil
80dcb9c580 Move perms so they are at the top level of the form so that the data is properly populated
Add form fields for all environments in update member form
2019-09-18 11:16:54 -04:00
leigh-mil
93530e903f Create route for updating app member 2019-09-18 11:16:54 -04:00
leigh-mil
ee0e6c7200 Move converting the form.permission_sets data from and obj to a list out of the form 2019-09-18 11:16:54 -04:00
leigh-mil
4dab326eef Clean up code and formatting 2019-09-18 11:16:54 -04:00
leigh-mil
d296d3c237 Move modal outside of table and add csrf token 2019-09-18 11:16:54 -04:00
leigh-mil
89cb5a160c Populate form w/ data 2019-09-18 11:16:54 -04:00
leigh-mil
ab102470bf Make checkboxes work 2019-09-18 11:16:54 -04:00
leigh-mil
1fd2d9f496 Make form class for updating application member 2019-09-18 11:16:54 -04:00
richard-dds
4cafa513a2 Merge pull request #1074 from dod-ccpo/lock-environments
Implement simple locking system for environments
2019-09-17 15:44:25 -04:00
richard-dds
ade7dc08fd Only fetch environment_id in provisioning queries 2019-09-17 15:27:03 -04:00
richard-dds
53e993ea34 Filter out claimed environments 2019-09-17 11:54:18 -04:00
richard-dds
5b7a544403 Claim environment in all three provisioning tasks 2019-09-17 11:51:09 -04:00
richard-dds
7004f7d37e Add a docstring and some comments 2019-09-17 11:32:24 -04:00
richard-dds
23261da3af Use None isntead of sql.null 2019-09-17 11:15:25 -04:00
richard-dds
c1b87356ce Update session while claiming
Not totally sure if this is necessary, but I feel like it makes more
sense to err on the side of more data correctness, rather than
hypothesizing about performance
2019-09-17 11:06:23 -04:00
richard-dds
abeadee3f3 Claim resource only temporarily 2019-09-17 11:03:33 -04:00
richard-dds
945debe6ee Move claim_for_update to models.utils 2019-09-17 10:39:59 -04:00
richard-dds
97cefc7501 Formatting 2019-09-16 16:58:28 -04:00
richard-dds
c0a629ae9a Alias resource class to Model 2019-09-16 16:54:49 -04:00
richard-dds
030d67719b Remove unused imports 2019-09-16 16:52:54 -04:00
richard-dds
2bbe974755 Implement simple locking system for environments 2019-09-16 16:39:37 -04:00
leigh-mil
0b6fc072ea Add invite links and tag for pending invite 2019-09-16 15:58:37 -04:00
richard-dds
79c8e4fc63 Merge pull request #1062 from dod-ccpo/env-provisioning-task
Environment provisioning background jobs
2019-09-16 09:58:18 -04:00
graham-dds
96ad2334f7 Use custom validator for CLIN funding 2019-09-12 16:11:12 -04:00
graham-dds
e9bd1b596d Move max clin amount to a constant 2019-09-12 16:11:12 -04:00
graham-dds
ab17b5cf84 Use translations for WTForms validation 2019-09-12 16:11:12 -04:00
graham-dds
0abd46eb4f fixup to form 2019-09-12 16:11:12 -04:00
graham-dds
73a4b669ac class methods for oblig. and contract amount total 2019-09-12 16:11:12 -04:00
graham-dds
6f13b8a179 Add WTForms min and max validation for clin $
- above 0 and below $1,000,000,000.00, inclusive
2019-09-12 16:11:12 -04:00
graham-dds
f3eea39536 Add "total amount" to CLINS
- includes migration for change to model
2019-09-12 16:11:10 -04:00
leigh-mil
e565913f48 Merge pull request #1067 from dod-ccpo/app-settings-cleanup
App settings cleanup
2019-09-11 16:01:37 -04:00
leigh-mil
ddcd91964f Remove route 'applications.update_env_roles' and related functions and tests 2019-09-11 15:29:09 -04:00
richard-dds
365a50efce Add Environments.provisioning_status 2019-09-11 11:43:10 -04:00
richard-dds
1a9c34d856 Fix and test environment dispatch tasks 2019-09-11 11:43:06 -04:00
richard-dds
f6cb6f2a31 Change Environment.creator relation from ApplicationRole to User 2019-09-11 11:42:59 -04:00
richard-dds
e65c1d69b6 Add Environment.creator_role relation 2019-09-11 11:42:40 -04:00
richard-dds
4405ed91d5 Fix migration path 2019-09-11 11:42:36 -04:00
richard-dds
ac0c194490 Add celery beat worker 2019-09-11 11:41:57 -04:00
richard-dds
c00f13de2c Add query for getting environments pending baseline creation 2019-09-11 11:41:10 -04:00
richard-dds
13861ad998 Add query for getting environments pending atat user creation 2019-09-11 11:41:10 -04:00
richard-dds
e3ea2d2fe5 Move "envs pending creation" query to Environments domain 2019-09-11 11:41:10 -04:00