1345 Commits

Author SHA1 Message Date
leigh-mil
93530e903f Create route for updating app member 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
1fd2d9f496 Make form class for updating application member 2019-09-18 11:16:54 -04:00
richard-dds
343e5a52ac Use session.refresh in tests 2019-09-17 15:29:33 -04:00
richard-dds
3f072bac3c Remove unused users 2019-09-17 15:28:07 -04:00
richard-dds
ade7dc08fd Only fetch environment_id in provisioning queries 2019-09-17 15:27:03 -04:00
richard-dds
68ac7aecdf More test cleanup 2019-09-17 11:47:06 -04:00
richard-dds
23261da3af Use None isntead of sql.null 2019-09-17 11:15:25 -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
67a2905d51 Make claim_for_update easier to follow 2019-09-16 17:03:57 -04:00
richard-dds
4624acd1c5 Remove unused import 2019-09-16 17:00:05 -04:00
richard-dds
2bbe974755 Implement simple locking system for environments 2019-09-16 16:39: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
c26f8b92e9 Add tests to validate CLIN funding 2019-09-12 16:11:12 -04:00
graham-dds
2af0a2ecaf Update existing tests for new CLIN logic
- Factory adds total_amount field, which is always greater than obligated
field
- add total_amount field on tests that create TOs manually
- update tests that calculate total_contract_amount and
total_obligated_amount
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
richard-dds
6100b6e479 Fix create_environments test 2019-09-11 15:36:07 -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
bc9426015c Add another test for Environments.get_environments_pending_creation 2019-09-11 11:43:10 -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
6b7db2ca46 Better ergonomics for creating factory portfolios w/ TOs 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
4405ed91d5 Fix migration path 2019-09-11 11:42:36 -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
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
dcb70ad925
Merge pull request #1060 from dod-ccpo/app-settings-redesign
App settings redesign
2019-09-10 11:20:38 -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
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
richard-dds
6c0420d6c5 Read config to determine mock CSP type 2019-09-09 10:45:38 -04:00
richard-dds
8347e4e387 Formatting 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
63e6671f7f Add test for mock CSP (probably temporary) 2019-09-09 10:41:17 -04:00
leigh-mil
2efd2c968d Use translations and make errors look pretty 2019-09-06 10:12:35 -04:00
leigh-mil
d7b86491ae Validate PoP dates against contract dates config on the backend 2019-09-06 10:12:35 -04:00
leigh-mil
7c7624f25e Move team routes to the settings file and delete files related to applications/team 2019-09-05 16:54:16 -04:00
leigh-mil
de74c1f533 Remove route for applications.team 2019-09-05 16:18:47 -04:00
graham-dds
0f185d3e09
Merge pull request #1054 from dod-ccpo/clin-summary-page
Refactor CLIN summary page
2019-09-04 13:40:44 -04:00
graham-dds
41bbbe8a39 add a sorted_clins property for clin sorting logic
CLINS have a special ordering:
 - First, they are sorted by the last three digits
 - Then, they are sorted by the first digit

Trying to add CLIN sorting logic to the relationship field in the task
order proved to be more challenging than expected. So, a separate
property was defined in order to access the clins in sorted order.
2019-09-04 12:35:56 -04:00
dandds
d62027b2e7
Merge pull request #1046 from dod-ccpo/tests-debug
Enable debug mode in tests.
2019-09-03 16:08:42 -04:00
tomdds
85f8c8f9e0
Merge pull request #1050 from dod-ccpo/cloud-provision-interface
Update CloudProviderInterface for provision job consumption
2019-09-03 15:59:55 -04:00
tomdds
8d3f488d6d Mark create env test ask skipped 2019-09-03 10:10:11 -04:00