Skip to content

[TEST DATA] Add Resub to the Shrink List#5444

Open
jperson1 wants to merge 1 commit intomainfrom
jp/add-resub-to-table-shrink
Open

[TEST DATA] Add Resub to the Shrink List#5444
jperson1 wants to merge 1 commit intomainfrom
jp/add-resub-to-table-shrink

Conversation

@jperson1
Copy link
Contributor

Add Resub to the Shrink List

In our test data, we have some commands that call out tables by name to do something to them. In "Shrink the dump to 20K records" and in the SQL to remove all tribal audits. The tribal one may actually be unused right now, but could be helpful for prepping a sanitized dump - so I'll leave it.

If you have data in dissemination_resubmission and try to run the shrink, it may fail by trying to delete the general row when there is a resub row "Foreign Key'd" to it.

Related tickets

  • N/A

Description of changes

  • On shrinking the tables or removing tribal audits, include the resub table.

Screenshots and recordings

  • N/A

How to test

  • Pull the branch. Run normally. Prepare for ./manage_local_data.sh (exec into the container and have a dump prepared).
  • Ensure there is data in your dissemination_resubmission tables that points to a report who would be "shrunk".
  • Run the shrinking command. Verify that the appropriate rows in dissemination_resubmission are removed and that there are no foreign key errors.

@github-actions
Copy link
Contributor

Terraform plan for meta

No changes. Your infrastructure matches the configuration.
No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration
and found no differences, so no changes are needed.

📝 Plan generated in Pull Request Checks #554

@github-actions
Copy link
Contributor

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" = "2026-03-12T12:43:12Z" -> (known after apply)
        }
    }

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

📝 Plan generated in Pull Request Checks #554

@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% 96%
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 91% 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 52% 6%
dissemination.views 67% 48%
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% (21918 / 24780) 69% (2693 / 3920)

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.

1 participant