215 Commits

Author SHA1 Message Date
00b10c484f alembic migration to extend the state machine states enum 2020-01-22 16:04:51 -05:00
tomdds
4bfde23c16 Fix alembic migration branching 2020-01-14 16:53:15 -05:00
Philip Kalinsky
69bd2f43a5 provision portfolio state machine 2020-01-14 16:36:16 -05:00
leigh-mil
17864cc060 Add migration to change environment_roles role column from string to
enum type.
Fix tests and functions affected by the column type change.
2020-01-14 13:12:29 -05:00
dandds
a0b96402f2 Remove user.provisional column.
This is leftover from a previous iteration of ATAT where inviting a user
to a portfolio would create a pending entry in the users table. This is
no longer used.
2020-01-10 10:20:35 -05:00
leigh-mil
dad54ec139 Create new migration to convert column type of defense_component from
string to array
2020-01-06 13:08:56 -05:00
leigh-mil
e82e0b482a remove unused imports 2019-12-18 10:54:17 -05:00
leigh-mil
812caf5d7d Update schema and create/update Environments domain methods to enforce environment name uniqueness within an application context. 2019-12-18 10:54:17 -05:00
leigh-mil
5f267e9cfa Remove unused import 2019-12-16 14:40:17 -05:00
leigh-mil
afad5362a1 Update name of UniqueContraint to include the table name 2019-12-16 14:39:32 -05:00
leigh-mil
22dd5d7b85 Add migration for enforcing uniqueness of an application name within a portfolio and update create/update Applicaiton domain methods. 2019-12-16 14:39:32 -05:00
leigh-mil
e38358992d Fix migration chain 2019-12-13 14:56:31 -05:00
leigh-mil
f0505ee122 Remove unused imports
Use remove_empty_string filter for TaskOrderForm.number instead of declaring the data property
Update display of TOs without a number
2019-12-13 14:53:58 -05:00
leigh-mil
9caef2883a migration fix 2019-12-13 14:53:58 -05:00
leigh-mil
85252812e0 Update number column on task orders table to have a unique constraint 2019-12-13 14:53:58 -05:00
graham-dds
a097a0ce61 Refactor New Portfolio page according to designs.
New designs call for a streamlined New Portfolio page, with far
fewer input options. This commit refactors that page according to those
designs.

Some of the route functions in this commit refer to a "step 1" of creating
a new Portfolio. Though there is no "step 2" right now, the designs call
for a multistep flow for Portfolio creation process, so this commit sets
the stage for that.
2019-12-13 13:17:30 -05:00
leigh-mil
614514d6a2 Update tables to match business logic 2019-12-02 14:46:11 -05:00
leigh-mil
e64900245d Remove baseline_info column from environments table 2019-10-30 14:46:33 -04:00
richard-dds
308bad2fc8 Fix "disabled environment role status" migration 2019-10-30 14:31:27 -04:00
richard-dds
d1e6533824 Implement EnvironmentRoles.disable 2019-10-29 15:57:57 -04:00
richard-dds
1bce0a1f01 Revert user deletion job 2019-10-14 16:51:19 -04:00
richard-dds
41b09b9cc8 Fix migration path 2019-10-08 16:42:25 -04:00
richard-dds
31d2380afc Clean up migration 2019-10-08 16:42:25 -04:00
richard-dds
00f76ae5af Add delete user job 2019-10-08 16:42:25 -04:00
graham-dds
237123d474 Make application description optional 2019-10-08 13:15:28 -04:00
richard-dds
f523db4d2d Squash migrations related to env role provisioning 2019-09-23 10:44:37 -04:00
richard-dds
2fca542100 Implement dispatch query for provision_user 2019-09-20 11:37:18 -04:00
richard-dds
d1e146f577 Add create_user task 2019-09-19 16:56:36 -04:00
richard-dds
292cfdd0e8 Secrets whitelist alembic revision ids 2019-09-18 16:40:36 -04:00
richard-dds
abeadee3f3 Claim resource only temporarily 2019-09-17 11:03:33 -04:00
richard-dds
5012c5a4d3 Fix migration path 2019-09-16 16:53:03 -04:00
richard-dds
2bbe974755 Implement simple locking system for environments 2019-09-16 16:39:37 -04:00
richard-dds
89d3a66522 Apply default to environments.creator_id so column can be non-nullable 2019-09-16 15:50:05 -04:00
richard-dds
75928b7700 Fix migration path 2019-09-16 10:36:57 -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
f3eea39536 Add "total amount" to CLINS
- includes migration for change to model
2019-09-12 16:11:10 -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
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
dandds
74f012cb07 Fix migration chain. 2019-09-10 09:46:32 -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
c7d8bc260c Add phone ext column to invites and phone ext field to new member form 2019-09-09 16:24:18 -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
graham-dds
38ba8b7e5f LOAs are so out of this codebase 2019-08-30 09:57:23 -05:00
richard-dds
02900ff771 Allow TOs to be deleted, along with their associated CLINs 2019-08-08 16:03:42 -04:00
dandds
45818106c9 Squash the migrations into one reset.
This required destroying the database. The existing migrations are not
worthwhile history, though, and are available in the git history if
needed.
2019-06-19 15:29:31 -04:00
dandds
f793973da4 Do not enforce TO number uniqueness.
We don't know for a fact that TO number uniqueness is a requirement at
the database level. For now, remove the unique constraint so that users
can enter redundant TOs.
2019-06-19 13:03:41 -04:00
George Drummond
d672f5792c
Save as draft 2019-06-18 14:11:55 -04:00
George Drummond
cad43af455
Portfolio archiving 2019-06-11 11:30:37 -04:00