1159 Commits

Author SHA1 Message Date
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
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
richard-dds
c5284fd8f9
Merge pull request #1005 from dod-ccpo/cloud-pdf-downloads
Cloud pdf downloads
2019-08-30 16:11:27 -04:00
dandds
883947b75f Enable debug mode in tests.
Debug mode allows route integration tests to raise explicit exceptions on
errors, instead of returning error pages. Some portions of the test
suite need to be able to ignore exceptions (the response is not under
test) so they use a separate pytest fixture version of the app and
client that are configured with debug disabled, as it would be in
production.
2019-08-30 15:32:57 -04:00
graham-dds
38ba8b7e5f LOAs are so out of this codebase 2019-08-30 09:57:23 -05:00
richard-dds
b26cd3ffae Allow user to download a previously uploaded pdf 2019-08-29 16:00:25 -04:00
tomdds
1fe9399f99 Update CloudProviderInterface for provision job consumption 2019-08-29 14:06:18 -04:00
dandds
2b11debe5d
Merge pull request #1041 from dod-ccpo/use-celery
Use Celery instead of RQ.
2019-08-29 13:17:27 -04:00
dandds
d7478e322a Use Celery instead of RQ.
Celery provides a more robust set of queueing options for both tasks and
worker processes. Updates include:
- infrastructure necessary to run Celery, including celery entrypoint
- backgrounded functions are now imported directly from atst.jobs
- update tests as-needed
- update kubernetes worker pod command
2019-08-29 09:33:47 -04:00
richard-dds
bb9d76dd09 Fix Vue tests 2019-08-28 15:56:55 -04:00
dandds
caa633c3db Fix more tests broken by expiring CRL.
There are still a few tests that rely on physical certificate files.
These are slightly more complicated to replace with pytest fixtures.
Updated the script for generating a CRL chain so that the CRL is good
for roughly ten years and regenerated the certs and CRL.
2019-08-21 05:47:54 -04:00
leigh-mil
0cbd971c11
Merge pull request #1032 from dod-ccpo/dont-include-last-login-update-in-auditlog
Do not create AuditEvent if updating the User.last_login
2019-08-19 11:26:36 -04:00
leigh-mil
96a2520e0c Don't use domain methods in tests 2019-08-19 10:39:16 -04:00
leigh-mil
2776926dea Move custom audit log logic into the User class 2019-08-19 10:25:26 -04:00
leigh-mil
1efe9cb5e4
Merge pull request #1023 from dod-ccpo/csp-links
Env roles bug fix
2019-08-19 09:43:54 -04:00
leigh-mil
0d6f7aa3cc Do not create AuditEvent if updating the User.last_login 2019-08-16 16:41:58 -04:00
dandds
24b2d95f03 Application members should not see deleted applications.
This updates the `Portfolios.for_user` method to screen out deleted
ApplicationRole entities. For extra assurance, we also mark application
roles as disabled when they are deleted.
2019-08-15 10:20:30 -04:00
leigh-mil
c37c5d72b9 move data property into the base EnvironmentForm so that NO_ACCESS is converted to None when creating a new application member 2019-08-15 10:13:34 -04:00
leigh-mil
afd84e178f Add tests to check if environment roles are being created correctly 2019-08-15 10:13:34 -04:00
dandds
16c9b826b3
Merge pull request #1019 from dod-ccpo/upload-error-handling
Add validations and error states for TO upload form
2019-08-14 14:30:46 -04:00
richard-dds
36d39dc949 Use unique attachment object names 2019-08-14 10:39:58 -04:00
leigh-mil
e59e3b959c Add listener to User model to record permission set updates and update user audit log template 2019-08-13 16:36:38 -04:00
richard-dds
71bb1be130 Validate filename and object_name for TO PDF upload 2019-08-13 10:51:09 -04:00
leigh-mil
e35399d8f5 Update route function to revoke CCPO superuser status 2019-08-13 10:32:26 -04:00
leigh-mil
fa83dfe6bd When user not found, redirect to users page and show flash message 2019-08-09 11:08:23 -04:00
leigh-mil
864e11ea11 Remove redundant 'ccpo' from ccpo route function names 2019-08-09 11:08:23 -04:00
leigh-mil
feb24b8e16 Break class method for ccpo perms into two methods instead of switching on a kwarg to determine if perms are given or removed 2019-08-09 11:08:23 -04:00
leigh-mil
1b86147ab6 Move text into translations file 2019-08-09 11:08:23 -04:00
leigh-mil
a6eb89ffb8 Add tests for route functions 2019-08-09 11:08:22 -04:00
leigh-mil
1f8337485f Move ccpo routes into their own file 2019-08-09 11:08:22 -04:00
leigh-mil
5b008e044a Add tests 2019-08-09 10:50:34 -04:00
richard-dds
8fce880ae6
Merge pull request #1013 from dod-ccpo/fix-cancel-button
Update TO form cancel button behavior
2019-08-09 09:50:38 -04:00
richard-dds
915ccfadfc Clean up assertion 2019-08-08 16:28:26 -04:00
richard-dds
f042b12416 Real assertion in TO delete test 2019-08-08 16:26:59 -04:00
richard-dds
7fdb27ddbf Delete TO draft when click "delete it" on cancel modal 2019-08-08 16:03:47 -04:00
richard-dds
02900ff771 Allow TOs to be deleted, along with their associated CLINs 2019-08-08 16:03:42 -04:00
dandds
9fc6514d80 Clean up defunct upload and CRL logic.
- Applies our previous CSP namespacing pattern to the upload classes.
- Removes code and config for previous uploader implementation.
- Removes Attachment model's ability to upload files directly and
  adjusts tests that expected that behavior.
2019-08-08 13:20:27 -04:00
richard-dds
736e2aa21d
Merge pull request #994 from dod-ccpo/cloud-pdf-uploads
CSP PDF uploads
2019-08-08 11:17:07 -04:00