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

Update versions for backup util to match v0.1.10 #4620

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

asteel-gsa
Copy link
Contributor

@asteel-gsa asteel-gsa commented Jan 14, 2025

Follow on PR for #4601
This brings some of the stray versions in sync with the latest backup util version of v0.1.10 and adds back a conditional clause for backups. We don't want to backup every env before deployment, just prod

Copy link
Contributor

github-actions bot commented Jan 14, 2025

Terraform plan for meta

Plan: 0 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:
!~  update in-place

Terraform will perform the following actions:

  # module.environments["production"].cloudfoundry_space.space will be updated in-place
!~  resource "cloudfoundry_space" "space" {
!~      allow_ssh                = true -> false
+       delete_recursive_allowed = false
        id                       = "5593dba8-7023-49a5-bdbe-e809fe23edf9"
        name                     = "production"
#        (10 unchanged attributes hidden)
    }

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

📝 Plan generated in Pull Request Checks #4170

Copy link
Contributor

github-actions bot commented Jan 14, 2025

Terraform plan for dev

Plan: 1 to add, 0 to change, 1 to destroy.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # module.dev.module.cors.null_resource.cors_header must be replaced
-/+ resource "null_resource" "cors_header" {
!~      id       = "*******************" -> (known after apply)
!~      triggers = { # forces replacement
!~          "always_run" = "2025-01-15T20:24:56Z" -> (known after apply)
        }
    }

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

📝 Plan generated in Pull Request Checks #4170

gsa-suk
gsa-suk previously approved these changes Jan 14, 2025
@@ -70,13 +70,14 @@ jobs:
cf_command: update-user-provided-service fac-key-service -p '"{\"SAM_API_KEY\":\"${{ secrets.SAM_API_KEY }}\", \"DJANGO_SECRET_LOGIN_KEY\":\"${{ secrets.DJANGO_SECRET_LOGIN_KEY }}\", \"LOGIN_CLIENT_ID\":\"${{ secrets.LOGIN_CLIENT_ID }}\", \"SECRET_KEY\":\"${{ secrets.SECRET_KEY}}\"}"'

- name: Backup the database
if: startsWith(github.ref, 'refs/tags/v1.')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we were dealing with the UEI issue, I recall us going back and forth on this line. I've only scratched the surface of github actions. Can you help me understand what our goal is with this, how this line achieves it?

Copy link
Contributor Author

@asteel-gsa asteel-gsa Jan 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gsa-jrothacker It is a conditional clause to exclusively perform a backup operation on releases, as they are tags, with a v1. notation. More information on this specific clause can be found here.

In this pr, the removal of this line actually was, unfortunately, not what y'all were expecting, based on what little I was told, as removing this enabled backup on all environments, rather than prod exclusively.

We don't want to, nor have a necessity, to backup the data in lower environments, and the 2 hour backup cron is substantial enough for us in the lower environments. We do this exclusively in production, as if a breaking change occurs on the "deploy" we want the last copy of the data to have some degree of integrity that if we need to rollback, the pre-deploy backup would be the last known "clean copy" of the data.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To have disabled the backup before deployment in production, this would have been acceptable

      # - name: Backup the database
        # if: startsWith(github.ref, 'refs/tags/v1.')
        # uses: cloud-gov/cg-cli-tools@main
        # with:
          # cf_username: ${{ secrets.CF_USERNAME }}
          # cf_password: ${{ secrets.CF_PASSWORD }}
          # cf_org: gsa-tts-oros-fac
          # cf_space: ${{ env.space }}
          # command: cf run-task gsa-fac -k 7G -m 3G --name deploy_backup --command "./fac-backup-util.sh v0.1.10 deploy_backup"

Copy link
Contributor

Code Coverage

Package Line Rate Branch Rate Health
. 100% 100%
api 98% 90%
audit 97% 87%
audit.cross_validation 98% 88%
audit.fixtures 84% 50%
audit.intakelib 91% 81%
audit.intakelib.checks 92% 85%
audit.intakelib.common 98% 82%
audit.intakelib.transforms 100% 95%
audit.management.commands 78% 17%
audit.migrations 100% 100%
audit.models 94% 76%
audit.templatetags 100% 100%
audit.views 70% 53%
census_historical_migration 96% 65%
census_historical_migration.migrations 100% 100%
census_historical_migration.sac_general_lib 92% 84%
census_historical_migration.transforms 95% 90%
census_historical_migration.workbooklib 68% 69%
config 76% 31%
curation 100% 100%
curation.curationlib 93% 100%
curation.migrations 100% 100%
dissemination 91% 70%
dissemination.migrations 97% 25%
dissemination.searchlib 76% 66%
dissemination.templatetags 100% 100%
djangooidc 53% 38%
djangooidc.tests 100% 94%
report_submission 93% 88%
report_submission.migrations 100% 100%
report_submission.templatetags 74% 100%
support 91% 66%
support.migrations 100% 100%
support.models 96% 50%
tools 98% 50%
users 95% 92%
users.fixtures 100% 83%
users.management 100% 100%
users.management.commands 100% 100%
users.migrations 100% 100%
Summary 91% (18061 / 19845) 77% (2240 / 2924)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants