Commit Graph

2419 Commits

Author SHA1 Message Date
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
richard-dds
4a5ca1cd27 Add query for environments pending creation 2019-09-11 11:41:10 -04:00
richard-dds
e9bf806dc6 Environment provisioning celery tasks
Failing test

Break env provisioning task into 3 separate tasks

Make env creation task idempotent

Test other env provisioning tasks

DRY tasks
2019-09-11 11:41:03 -04:00
leigh-mil
a265c12a52 Merge pull request #1065 from dod-ccpo/new-member-modal-part-2
New member modal part 2
2019-09-10 15:04:14 -04:00
leigh-mil
ade3dd083e Use translations 2019-09-10 13:54:13 -04:00
richard-dds
c9dcacddb0 Merge pull request #1056 from dod-ccpo/mock-csp
Mock implementation of CSP interface
2019-09-10 12:46:52 -04:00
leigh-mil
117a3e2162 Styling for app perms 2019-09-10 11:54:17 -04:00
leigh-mil
dcb70ad925 Merge pull request #1060 from dod-ccpo/app-settings-redesign
App settings redesign
2019-09-10 11:20:38 -04:00
leigh-mil
ebe82a3452 Merge pull request #1063 from dod-ccpo/new-member-modal-part-1
New member modal part 1
2019-09-10 09:36:36 -04:00
leigh-mil
aa45e6b2e1 Merge pull request #1059 from dod-ccpo/pop-configs
PoP validation & Contract date configs
2019-09-10 09:35:46 -04:00
dandds
07ffaae22a Merge pull request #1061 from dod-ccpo/csp-retry-failure
Record job failures with application context.
2019-09-10 09:13:41 -04:00
leigh-mil
c7d8bc260c Add phone ext column to invites and phone ext field to new member form 2019-09-09 16:24:18 -04:00
leigh-mil
e391c3269d Remove unused route to update team roles 2019-09-09 15:23:37 -04:00
dandds
7010bdb09c Record job failures with application context.
AT-AT needs to be able to track which user tasks failed and why. To
accomplish this we:

- Enabled Celery's results backend, which logs task results to a data
  store; a Postgres table, in our case.
  (https://docs.celeryproject.org/en/latest/userguide/tasks.html#result-backends)
- Created tables to track the relationships between the relevant models
  (Environment, EnvironmentRole) and their task failures.
- Added an `on_failure` hook that tasks can use. The hook will add
  records to the job failure tables.

Now a resource like an `Environment` has access to it task failures
through the corresponding failure table.

Notes:
- It might prove useful to use a real foreign key to the Celery results
  table eventually. I did not do it here because it requires that we
  explicitly store the Celery results table schema as a migration and
  add a model for it. In the current implementation, AT-AT can be
  agnostic about where the results live.
- We store the task results indefinitely, so it is important to specify
  tasks for which we do not care about the results (like `send_mail`)
  via the `ignore_result` kwarg.
2019-09-09 14:54:46 -04:00
leigh-mil
3e3dfc5056 Remove inflect dependency 2019-09-09 14:51:59 -04:00
leigh-mil
09efa4f434 use lowercase for variable names and remove unused import 2019-09-09 14:33:05 -04:00
leigh-mil
3683c79ae0 Use template args for the contract start and end date
pointing to base.ini in the JS file resulted in the raw string content of base.ini to be in the JS bundle
2019-09-09 14:23:38 -04:00
richard-dds
6c0420d6c5 Read config to determine mock CSP type 2019-09-09 10:45:38 -04:00
richard-dds
fd65a3a972 Rename "throw" to "raise" 2019-09-09 10:41:17 -04:00
richard-dds
43d5be4e19 Add network failures to suspend / delete user 2019-09-09 10:41:17 -04:00
richard-dds
62795561a8 All the methods 2019-09-09 10:41:17 -04:00
richard-dds
25bedb816d Auth create_environment 2019-09-09 10:41:17 -04:00
richard-dds
f757e86eb3 Update TODOs 2019-09-09 10:41:17 -04:00