Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2023-09-20 | MAIN --> PROD | DEV (f38ad9d) --> STAGING #2180

Merged
merged 3 commits into from
Sep 20, 2023
Merged

2023-09-20 | MAIN --> PROD | DEV (f38ad9d) --> STAGING #2180

merged 3 commits into from
Sep 20, 2023

Conversation

jadudm
Copy link
Contributor

@jadudm jadudm commented Sep 20, 2023

This is an auto-generated pull request to merge main into prod for a staging release on 2023-09-20 with the last commit being merged as f38ad9d

asteel-gsa and others added 3 commits September 20, 2023 13:58
* Add backup cf task

Should only run if a tag is present

* Adds django backup

* adds django backup to requirements

* fix DBBACKUP_STORAGE

* Set to private bucket

* Fix linting issue

* move DBBACKUP

* move backup into private s3 chunk

* remove db backup?

* add dbbackup back

* move into other INSTALLED_APPS

* Fixes settings.py

* pg_dump needs to match server/client versions

pg_dump: error: server version: 15.3; pg_dump version: 14.9 (Ubuntu 14.9-0ubuntu0.22.04.1)
pg_dump: error: aborting because of server version mismatch

* Testing if data load works with psql 15

* both psql client versions?

* try postgresql-common

* remove pg_common

* Bump to jammy psql v15

* Add comments to apt.yml

* Remove unnecessary path

* add callable script for cf tasks

* Update to script and make +x

* call script instead of direct command

* Make db dumps a bit more readable

* add correct url to apt.yml comment

* rollback

* Bump Mem to 1G

In order to run python manage.py dbrestore, 512M wasn't enough to actually
do the restore.

* Set a readable name to the db dumps (again)

* Set back to 1G like the other envs

* Set app instance back to 512M Mem

* Sketch: Add a bucket for backups, shared to appropriate spaces

NOTE: NOT YET FUNCTIONAL! This is a sketch until the TODOs are addressed

* Modify settings for new bucket

* Bind the bucket to the running app

This makes it so that we do not need to modify the manifest, and only
expose the backup bucket while we are actually using it, i.e when we want to
do a backup.

* terraform fmt

* Shares the s3 backup bucket with designated spaces

Based on the values in config.tf

* Fix typo on unbind-service cf command

* Regenerate TF Plan

* Regenerate TF Plan

* Remove django-storages

This appears to be redundant. Removing this does not change the
requirements.txt file

* Add default behavior for dbbackup if local env

* Fix linting issue

---------

Co-authored-by: Bret Mogilefsky <bret.mogilefsky@gsa.gov>
We don't want to disseminate the field 'secondary_auditors_exist'.
* reset audit migrations

* reset dissemination, user migrations

* reset support migrations

* linter
@jadudm jadudm requested a review from a team as a code owner September 20, 2023 17:02
@jadudm jadudm added autogenerated Automated pull request creation automerge Used for automated deployments labels Sep 20, 2023
@jadudm jadudm temporarily deployed to production September 20, 2023 17:02 — with GitHub Actions Inactive
@jadudm jadudm temporarily deployed to staging September 20, 2023 17:02 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

github-actions bot commented Sep 20, 2023

Terraform plan for production

Plan: 2 to add, 2 to change, 0 to destroy.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # module.production.cloudfoundry_app.postgrest will be updated in-place
  ~ resource "cloudfoundry_app" "postgrest" {
      ~ environment                     = (sensitive value)
        id                              = "70ac44be-3507-4867-a75f-c2d1ab12ee89"
      ~ id_bg                           = "************************************" -> (known after apply)
        name                            = "postgrest"
        # (14 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # module.production.cloudfoundry_service_key.postgrest will be created
  + resource "cloudfoundry_service_key" "postgrest" {
      + credentials      = (sensitive value)
      + id               = (known after apply)
      + name             = "postgrest"
      + service_instance = (known after apply)
    }

  # module.production.module.database.cloudfoundry_service_instance.rds will be created
  + resource "cloudfoundry_service_instance" "rds" {
      + id                             = (known after apply)
      + name                           = "fac-db"
      + replace_on_params_change       = false
      + replace_on_service_plan_change = false
      + service_plan                   = "c1ddc2d6-983b-4ced-9995-064d9dde07aa"
      + space                          = "5593dba8-7023-49a5-bdbe-e809fe23edf9"
    }

  # module.production.module.https-proxy.cloudfoundry_app.egress_app will be updated in-place
  ~ resource "cloudfoundry_app" "egress_app" {
        id                              = "5e81ca8b-99cf-41f8-ae42-76652d51a44c"
        name                            = "https-proxy"
      ~ source_code_hash                = "e59a40c4e0195f484032d3cc746c985c2ee791531eb72ba994d7b0943575ba36" -> "48b2f5eba8d1f35c0fbc2f90c2ec87cab180f5f19e7e34b16b9190fe5c5ca09a"
        # (19 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

Plan: 2 to add, 2 to change, 0 to destroy.

Warning: Argument is deprecated

  with module.domain.cloudfoundry_service_instance.external_domain_instance,
  on /tmp/terraform-data-dir/modules/domain/domain/main.tf line 45, in resource "cloudfoundry_service_instance" "external_domain_instance":
  45:   recursive_delete = var.recursive_delete

Since CF API v3, recursive delete is always done on the cloudcontroller side.
This will be removed in future releases

(and 3 more similar warnings elsewhere)

✅ Plan applied in Deploy to Production Environment #11

@github-actions
Copy link
Contributor

github-actions bot commented Sep 20, 2023

Terraform plan for staging

Plan: 2 to add, 1 to change, 0 to destroy.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place

Terraform will perform the following actions:

  # module.staging.cloudfoundry_app.postgrest will be updated in-place
  ~ resource "cloudfoundry_app" "postgrest" {
      ~ environment                     = (sensitive value)
        id                              = "db50e549-24c7-4dcf-b30e-e9dee3512be8"
      ~ id_bg                           = "************************************" -> (known after apply)
        name                            = "postgrest"
        # (14 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # module.staging.cloudfoundry_service_key.postgrest will be created
  + resource "cloudfoundry_service_key" "postgrest" {
      + credentials      = (sensitive value)
      + id               = (known after apply)
      + name             = "postgrest"
      + service_instance = (known after apply)
    }

  # module.staging.module.database.cloudfoundry_service_instance.rds will be created
  + resource "cloudfoundry_service_instance" "rds" {
      + id                             = (known after apply)
      + name                           = "fac-db"
      + replace_on_params_change       = false
      + replace_on_service_plan_change = false
      + service_plan                   = "815c6069-289a-4444-ba99-40f0fa03a8f5"
      + space                          = "7bbe587a-e8ee-4e8c-b32f-86d0b0f1b807"
    }

Plan: 2 to add, 1 to change, 0 to destroy.

Warning: Argument is deprecated

  with module.staging.module.database.cloudfoundry_service_instance.rds,
  on /tmp/terraform-data-dir/modules/staging.database/database/main.tf line 14, in resource "cloudfoundry_service_instance" "rds":
  14:   recursive_delete = var.recursive_delete

Since CF API v3, recursive delete is always done on the cloudcontroller side.
This will be removed in future releases

(and 2 more similar warnings elsewhere)

✅ Plan applied in Deploy to Staging Environment #46

@github-actions
Copy link
Contributor

File Coverage Missing
All files 89%
api/serializers.py 90% 125-126 131 136
api/test_views.py 96% 105
api/uei.py 96% 17-18 107-108
api/views.py 97% 196-197 204-205 226 362-363
audit/excel.py 87% 402 418 424 429 434 456-457 469 670-671 680-686 696 716
audit/forms.py 56% 22-29
audit/intake_to_dissemination.py 93% 70-71 200-206
audit/models.py 87% 185 218 389 407-408 416 438 514-515 519 527 536 546 549-555
audit/test_commands.py 87%
audit/test_mixins.py 90% 112-113 117-119 184-185 189-191
audit/test_validators.py 95% 434 438 606-607 846 853 860 867
audit/utils.py 76% 13 21 38
audit/validators.py 96% 269-270 298-299 314-315 325 516-525
audit/views.py 42% 86-107 130-131 205-206 251-252 263-264 266-270 317-330 333-347 352-365 382-388 393-413 440-444 449-478 521-525 530-550 577-581 586-615 658-662 667-679 682-692 697-709 732-733 738-787 790-830 833-850
audit/cross_validation/additional_ueis.py 93% 33
audit/cross_validation/check_award_ref_declaration.py 90%
audit/cross_validation/check_award_reference_uniqueness.py 93%
audit/cross_validation/check_certifying_contacts.py 87%
audit/cross_validation/check_findings_count_consistency.py 91%
audit/cross_validation/check_ref_number_in_cap.py 90%
audit/cross_validation/check_ref_number_in_findings_text.py 90%
audit/cross_validation/errors.py 78% 30 65
audit/cross_validation/naming.py 68% 178-182
audit/cross_validation/submission_progress_check.py 85% 64 79-82
audit/cross_validation/tribal_data_sharing_consent.py 86% 20
audit/cross_validation/validate_general_information.py 93% 28-29
audit/fixtures/single_audit_checklist.py 79% 156 232-241
audit/management/commands/load_fixtures.py 46% 39-45
audit/viewlib/submission_progress_view.py 96% 158-159
audit/viewlib/upload_report_view.py 30% 32-35 44 91-115 118-186
cms/views.py 57% 11-16 29-30
config/urls.py 71% 87
djangooidc/backends.py 78% 32 57-63
djangooidc/exceptions.py 66% 19 21 23 28
djangooidc/oidc.py 16% 32-35 45-51 64-70 92-149 153-199 203-226 230-275 280-281 286
djangooidc/views.py 80% 22 43 114
djangooidc/tests/common.py 96%
report_submission/forms.py 92% 35
report_submission/views.py 76% 83 215-216 218 240-241 260-261 287-394 397-407
report_submission/templatetags/get_attr.py 76% 8 11-14 18
support/admin.py 49% 9-10 13 34 37 74 77 82 89-95 98-100 103-104 107-108
support/cog_over.py 91% 30-33 93 140
support/signals.py 66% 23-24 29-30
support/test_cog_over.py 98% 134-135 224
tools/update_program_data.py 89% 96
users/auth.py 95% 39-40
users/fixtures/user_fixtures.py 91%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against f38ad9d

@jadudm jadudm merged commit 58c8150 into prod Sep 20, 2023
@jadudm jadudm temporarily deployed to production September 20, 2023 18:00 — with GitHub Actions Inactive
@jadudm jadudm temporarily deployed to staging September 20, 2023 18:00 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autogenerated Automated pull request creation automerge Used for automated deployments
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants