Skip to content

BUG] Fix generate resubmissions step in manage-local-data.bash - #6017

Merged
RanyeM merged 18 commits into
mainfrom
rm/update-generate-resubmission
Oct 21, 2026
Merged

RanyeM merged 18 commits into
mainfrom
rm/update-generate-resubmission

Conversation

@RanyeM

@RanyeM RanyeM commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Related tickets

#5997

Description of changes

  • Fixed issues preventing resubmission test data from generating successfully in the local environment.
  • Added user profile initialization and required resubmission metadata.
  • Fixed PDF copying and uploading to local S3/RustFS storage.
  • Added cleanup of previously generated resubmissions and reset original resubmission metadata to support repeated runs.
  • Updated test data modifiers to prevent validation errors.
  • Updated check_resubmission_allowed() to query SingleAuditChecklist directly instead of relying on the General dissemination table.
  • Extracted legacy audit eligibility checks into check_legacy_resubmission_allowed() to simplify the logic and resolve the Flake8 complexity warning.
  • Added handling for cases where no matching legacy audits are found.
  • Updated unit tests to verify resubmission eligibility without requiring dissemination records, including different UEIs, audit years, and missing siblings.
  • Removed unnecessary debugging logs.

How to test

  1. Start the local FAC environment and load the sanitized data.

  2. Navigate to util/load_public_dissem_data/ and run manage_local_data.bash.

  3. Select option 4 - Generate fake resubmission dissemination data.

  4. Select option 5 - Generate resubmissions, without running option 7 to re-disseminate all SAC records.

  5. Verify that:

    • Previously generated resubmissions are cleaned up.
    • New resubmissions are generated and disseminated successfully.
    • PDFs are copied and uploaded to RustFS successfully.
    • The multi-version resubmission chain is generated correctly.
    • Resubmission eligibility checks work without requiring the General dissemination table.
  6. Run option 5 again to verify the process can be repeated without errors.

  7. Run the unit tests:

    docker compose run --rm web python manage.py test audit.test_check_resubmission

@RanyeM RanyeM self-assigned this Oct 8, 2026
Comment thread backend/audit/management/commands/generate_resubmissions.py Outdated
Comment thread backend/audit/management/commands/generate_resubmissions.py Outdated
Comment thread backend/audit/management/commands/generate_resubmissions.py
Comment thread backend/audit/management/commands/generate_resubmissions.py
Co-authored-by: Phil Dominguez <142051477+phildominguez-gsa@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Branch Rate Health
. 100% 100% ✔
api 98% 86% ✔
api.serializers 97% 88% ✔
api.views 88% 96% ➖
audit 95% 80% ✔
audit.cross_validation 97% 87% ✔
audit.fixtures 84% 50% ❌
audit.formlib 94% 72% ✔
audit.intakelib 89% 83% ➖
audit.intakelib.checks 92% 86% ✔
audit.intakelib.common 98% 82% ✔
audit.intakelib.transforms 100% 95% ✔
audit.management.commands 78% 17% ❌
audit.migrations 100% 100% ✔
audit.models 91% 69% ✔
audit.templatetags 94% 83% ✔
audit.test_viewlib 100% 93% ✔
audit.viewlib 81% 78% ❌
audit.views 75% 54% ❌
census_historical_migration 99% 100% ✔
census_historical_migration.migrations 100% 100% ✔
census_historical_migration.sac_general_lib 92% 84% ✔
census_historical_migration.transforms 95% 90% ✔
census_historical_migration.workbooklib 70% 75% ❌
config 79% 31% ❌
curation 98% 92% ✔
curation.curationlib 91% 84% ✔
curation.management.commands 38% 31% ❌
curation.migrations 100% 100% ✔
dissemination 90% 70% ✔
dissemination.analytics 27% 0% ❌
dissemination.forms 80% 30% ❌
dissemination.migrations 98% 25% ✔
dissemination.models 100% 100% ✔
dissemination.report_generation 21% 0% ❌
dissemination.report_generation.excel 32% 0% ❌
dissemination.searchlib 61% 43% ❌
dissemination.templatetags 52% 6% ❌
dissemination.views 71% 51% ❌
djangooidc 53% 38% ❌
djangooidc.tests 100% 94% ✔
report_submission 99% 94% ✔
report_submission.migrations 100% 100% ✔
report_submission.templatetags 74% 100% ❌
report_submission.views 75% 57% ❌
support 94% 75% ✔
support.migrations 100% 100% ✔
support.models 72% 11% ❌
tools 98% 50% ✔
users 95% 86% ✔
users.fixtures 100% 83% ✔
users.management 100% 100% ✔
users.management.commands 100% 100% ✔
users.migrations 100% 100% ✔
Summary 89% (24600 / 27659) 70% (3071 / 4376) ➖

Minimum allowed line rate is 85%

@RanyeM
RanyeM added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit c36b9d7 Oct 21, 2026
16 checks passed
@RanyeM
RanyeM deleted the rm/update-generate-resubmission branch October 21, 2026 16:27

This branch was successfully deployed

1 active deployment
testing — 60f02133 Deployed Oct 21, 2026 by RanyeM via cypress-from-container / cypress-run #1666
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.

2 participants