Skip to content

Conversation

@neilmb
Copy link
Contributor

@neilmb neilmb commented Jan 28, 2026

This is an auto-generated pull request to merge main into prod for a staging release on 2026-01-28 with the last commit being merged as e5fe6da

jperson1 and others added 3 commits January 28, 2026 15:17
* Revert "Update Black to 2026 Stable Style (#5335)"

This reverts commit 5c3a85a.

* Revert "Rolling requirements update (#5325)"

This reverts commit 7780bfe.
@neilmb neilmb requested a review from a team as a code owner January 28, 2026 20:03
@neilmb neilmb added autogenerated Automated pull request creation automerge Used for automated deployments labels Jan 28, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 28, 2026

Terraform plan for production

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

Terraform will perform the following actions:

  # module.production.module.cors.null_resource.cors_header must be replaced
-/+ resource "null_resource" "cors_header" {
!~      id       = "*******************" -> (known after apply)
!~      triggers = { # forces replacement
!~          "always_run" = "2026-01-27T18:06:30Z" -> (known after apply)
        }
    }

  # module.production.module.newrelic.newrelic_notification_destination.email_destination will be updated in-place
!~  resource "newrelic_notification_destination" "email_destination" {
        id         = "e7c0bf9e-3e32-454e-98e6-40aa0694adbc"
        name       = "email_destination"
#        (6 unchanged attributes hidden)

-       property {
-           key           = "email" -> null
-           value         = "[email protected],[email protected]" -> null
#            (2 unchanged attributes hidden)
        }
+       property {
+           key           = "email"
+           value         = "[email protected]"
#            (2 unchanged attributes hidden)
        }
    }

  # module.production.module.newrelic.newrelic_workflow.alert_workflow will be updated in-place
!~  resource "newrelic_workflow" "alert_workflow" {
        id                    = "d725c3a4-b865-432c-857e-a7f12339793a"
        name                  = "production_alert_workflow"
#        (8 unchanged attributes hidden)

-       issues_filter {
-           filter_id = "2f4e1c77-5496-4e01-af2b-b6d6a54253ff" -> null
            name      = null
-           type      = "FILTER" -> null

-           predicate {
-               attribute = "labels.policyIds" -> null
-               operator  = "EXACTLY_MATCHES" -> null
-               values    = [
-                   "5422816",
                ] -> null
            }
        }
+       issues_filter {
+           filter_id = (known after apply)
+           name      = "filter"
+           type      = "FILTER"

+           predicate {
+               attribute = "labels.policyIds"
+               operator  = "EXACTLY_MATCHES"
+               values    = [
+                   "5422816",
                ]
            }
        }

#        (1 unchanged block hidden)
    }

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

✅ Plan applied in Deploy to the Production Environment #154

@github-actions
Copy link
Contributor

github-actions bot commented Jan 28, 2026

Terraform plan for staging

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.staging.module.cors.null_resource.cors_header must be replaced
-/+ resource "null_resource" "cors_header" {
!~      id       = "*******************" -> (known after apply)
!~      triggers = { # forces replacement
!~          "always_run" = "2026-01-28T10:49:56Z" -> (known after apply)
        }
    }

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

✅ Plan applied in Deploy to the Staging Environment #418

Comment on lines +21 to +140
name: Deploy to cloud.gov Environment
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
env:
space: ${{ inputs.environment }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
fetch-depth: 0 # So we can get tags
- name: Restore npm cache
uses: actions/[email protected]
id: cache-npm
with:
path: ~/.npm
key: fac-build-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
fac-build-npm-
fac-build-

- name: Set up Python 3.12
uses: actions/[email protected]
with:
python-version: '3.12'

- name: Restore pip cache
uses: actions/[email protected]
id: cache-pip
with:
path: |
~/.cache/pip
/opt/hostedtoolcache/Python/
key: fac-build-pip-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/dev-requirements.txt') }}
restore-keys: |
fac-build-pip-${{ hashFiles('**/requirements.txt') }}-
fac-build-pip-
fac-build-

- name: Install npm dependencies
working-directory: ./backend
run: npm ci --production

- name: Compile JS/CSS assets
working-directory: ./backend
run: npm run build

- name: Update service keys
uses: cloud-gov/cg-cli-tools@main
env:
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 }}
with:
cf_username: ${{ secrets.CF_USERNAME }}
cf_password: ${{ secrets.CF_PASSWORD }}
cf_org: gsa-tts-oros-fac
cf_space: ${{ env.space }}
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.')
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.11 deploy_backup" --wait

- name: Deploy FAC Application to cloud.gov in the preview Environment
if: ${{ inputs.environment == 'preview' }}
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 }}
cf_manifest: backend/manifests/manifest-preview.yml
cf_vars_file: backend/manifests/vars/vars-${{ env.space }}.yml
command: bin/ops/deploy_preview.sh

- name: Deploy FAC Application to cloud.gov in the ${{ env.space }} Environment
if: ${{ inputs.environment != 'preview' }}
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 }}
cf_manifest: backend/manifests/manifest-fac.yml
cf_vars_file: backend/manifests/vars/vars-${{ env.space }}.yml
command: bin/ops/deploy.sh

# Similar to below with the logshipper, we have found that restarting the proxy helps things move along post deploy.
- name: Restart the proxy application
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 }}-egress"
command: cf restart https-proxy

# This has to happen after an application deployment because the manifest (currently) is responsible
# for binding the "logdrain service" to the "gsa-fac application". This also needs to be done
# based on the suspicion that fluentbit cannot register the incoming logs when it is initially
# created, resulting in a 502. Restarting the application after everything is configured results
# in a 201, or, the expected status when transmitting logs.
- name: Restart the logshipper application
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 restart logshipper

check-tables:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 5 days ago

In general, the fix is to explicitly specify permissions for the GITHUB_TOKEN either at the top workflow level (applies to all jobs) or at the individual job level, and set them to the least privilege the workflow needs. This workflow only needs to read repository contents for actions/checkout, and there’s no evidence it needs to write to GitHub (no PR/issue/status updates), so contents: read is a suitable minimal starting point.

The single best way to fix this without changing existing behavior is to add a permissions block at the workflow root, between name: and on:. This keeps the configuration simple and applies to both jobs (push-with-creds and check-tables). We’ll set permissions: contents: read, which is equivalent to a read-only default for repository contents. No additional imports or methods are needed; it’s purely a YAML configuration change in .github/workflows/deploy-application-manual.yml.

Concretely:

  • Edit .github/workflows/deploy-application-manual.yml.
  • Insert:
permissions:
  contents: read

right after the name: Deploy Application Manual Trigger line (line 2 in the provided snippet). No other lines need modification.

Suggested changeset 1
.github/workflows/deploy-application-manual.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/deploy-application-manual.yml b/.github/workflows/deploy-application-manual.yml
--- a/.github/workflows/deploy-application-manual.yml
+++ b/.github/workflows/deploy-application-manual.yml
@@ -1,5 +1,7 @@
 ---
 name: Deploy Application Manual Trigger
+permissions:
+  contents: read
 on:
   workflow_dispatch:
     inputs:
EOF
@@ -1,5 +1,7 @@
---
name: Deploy Application Manual Trigger
permissions:
contents: read
on:
workflow_dispatch:
inputs:
Copilot is powered by AI and may make mistakes. Always verify output.
Comment on lines +141 to +147
needs: [push-with-creds]
uses: ./.github/workflows/fac_backup-check-tables.yml
secrets: inherit
with:
environment: ${{ inputs.environment }}
util_version: "v0.1.11"
backup_operation: "check_tables" No newline at end of file

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI 5 days ago

In general, the fix is to add an explicit permissions: block to the workflow, granting only the minimal scopes the jobs need, instead of relying on implicit repository defaults. This can be done at the top (root) level of the workflow, which applies to all jobs that don’t override it, or per-job if different jobs need different scopes. Since this deployment workflow appears to only need to read repository contents (for actions/checkout) and does not obviously require write access to the repo, a minimal and safe choice is permissions: contents: read at the workflow root.

The single best fix here without changing existing functionality is to add a root-level permissions: block just below the name: field and above on:. actions/checkout@v4 only requires contents: read when doing a regular checkout; we are not using persist-credentials: false or any operation that needs write access, and the remaining steps authenticate with explicit Cloud Foundry credentials via secrets. Therefore, setting permissions: contents: read should not break the workflow but will ensure GITHUB_TOKEN is restricted. No additional imports, methods, or other definitions are required because this is a YAML configuration-only change in .github/workflows/deploy-application-manual.yml.

Suggested changeset 1
.github/workflows/deploy-application-manual.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/deploy-application-manual.yml b/.github/workflows/deploy-application-manual.yml
--- a/.github/workflows/deploy-application-manual.yml
+++ b/.github/workflows/deploy-application-manual.yml
@@ -1,5 +1,7 @@
 ---
 name: Deploy Application Manual Trigger
+permissions:
+  contents: read
 on:
   workflow_dispatch:
     inputs:
EOF
@@ -1,5 +1,7 @@
---
name: Deploy Application Manual Trigger
permissions:
contents: read
on:
workflow_dispatch:
inputs:
Copilot is powered by AI and may make mistakes. Always verify output.
@github-actions
Copy link
Contributor

Code Coverage

Package Line Rate Branch Rate Health
. 100% 100%
api 98% 86%
api.serializers 97% 88%
api.views 91% 100%
audit 95% 81%
audit.cross_validation 97% 86%
audit.fixtures 84% 50%
audit.formlib 36% 0%
audit.intakelib 89% 83%
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 91% 68%
audit.templatetags 100% 100%
audit.views 72% 49%
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 78% 37%
curation 98% 100%
curation.curationlib 88% 72%
curation.migrations 100% 100%
dissemination 89% 70%
dissemination.analytics 27% 0%
dissemination.forms 80% 30%
dissemination.migrations 97% 25%
dissemination.models 100% 100%
dissemination.report_generation 21% 0%
dissemination.report_generation.excel 32% 0%
dissemination.searchlib 62% 45%
dissemination.templatetags 48% 0%
dissemination.views 67% 44%
djangooidc 53% 38%
djangooidc.tests 100% 94%
report_submission 100% 96%
report_submission.migrations 100% 100%
report_submission.templatetags 74% 100%
report_submission.views 78% 61%
support 94% 75%
support.migrations 100% 100%
support.models 90% 50%
tools 98% 50%
users 95% 86%
users.fixtures 100% 83%
users.management 100% 100%
users.management.commands 100% 100%
users.migrations 100% 100%
Summary 88% (21837 / 24718) 69% (2681 / 3900)

Minimum allowed line rate is 85%

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.

4 participants