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

97028: Update DR SavedClaim status updater jobs to skip records in a final status #19498

Merged
merged 5 commits into from
Nov 20, 2024

Conversation

dfong-adh
Copy link
Contributor

@dfong-adh dfong-adh commented Nov 18, 2024

Summary

  • This work is behind a feature toggle (flipper): No

This change updates the DR SavedClaim status updater job to skip API requests for individual records in final statuses (i.e. complete, vbms, error, and if a record is not found DR_404).

Related issue(s)

department-of-veterans-affairs/va.gov-team#97028

Testing done

  • New code is covered by unit tests
    Statuses were fetched every time before unless a claim plus the associated evidence was considered successful. This reduces redundant API calls since a large number of these calls are unnecessary as the status typically does not change after a record is in one of the final statuses.

What areas of the site does it impact?

This affects the DR SavedClaim status updater sidekiq jobs.

Acceptance criteria

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No error nor warning in the console.
  • Events are being sent to the appropriate logging solution
  • Documentation has been updated (link to documentation)
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Feature/bug has a monitor built into Datadog (if applicable)
  • If app impacted requires authentication, did you login to a local build and verify all authenticated routes work as expected
  • I added a screenshot of the developed feature

Copy link

github-actions bot commented Nov 18, 2024

1 Warning
⚠️ This PR changes 213 LoC (not counting whitespace/newlines).

In order to ensure each PR receives the proper attention it deserves, we recommend not exceeding
200. Expect some delays getting reviews.

File Summary

Files

  • app/models/appeal_submission.rb (+2/-3)

  • app/sidekiq/decision_review/saved_claim_status_updater_job.rb (+28/-9)

  • lib/periodic_jobs.rb (+1/-1)

  • spec/sidekiq/decision_review/hlr_status_updater_job_spec.rb (+36/-13)

  • spec/sidekiq/decision_review/nod_status_updater_job_spec.rb (+46/-18)

  • spec/sidekiq/decision_review/sc_status_updater_job_spec.rb (+41/-15)

    Note: We exclude files matching the following when considering PR size:

    *.csv, *.json, *.tsv, *.txt, *.md, Gemfile.lock, app/swagger, modules/mobile/docs, spec/fixtures/, spec/support/vcr_cassettes/, modules/mobile/spec/support/vcr_cassettes/, db/seeds, modules/vaos/app/docs, modules/meb_api/app/docs, modules/appeals_api/app/swagger/, *.bru, *.pdf
    

Big PRs are difficult to review, often become stale, and cause delays.

Generated by 🚫 Danger

@va-vfs-bot va-vfs-bot temporarily deployed to 97028-DR-status-job-updates/main/main November 18, 2024 21:21 Inactive
@dfong-adh dfong-adh force-pushed the 97028-DR-status-job-updates branch from 66463b6 to 9984270 Compare November 19, 2024 00:14
@va-vfs-bot va-vfs-bot temporarily deployed to 97028-DR-status-job-updates/main/main November 19, 2024 00:15 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to 97028-DR-status-job-updates/main/main November 19, 2024 00:24 Inactive
Copy link
Contributor

@kayline kayline left a comment

Choose a reason for hiding this comment

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

Overall looks good! I have a draft PR that pulls the updater job specs into shared examples, so if that gets merged first you will have a little merge conflict fun to deal with, but shouldn't be too bad!

@dfong-adh dfong-adh marked this pull request as ready for review November 20, 2024 00:23
@dfong-adh dfong-adh requested review from a team as code owners November 20, 2024 00:23
@RachalCassity RachalCassity self-assigned this Nov 20, 2024
Copy link

Backend-review-group approval confirmed.

@dfong-adh dfong-adh merged commit ef28ec9 into master Nov 20, 2024
55 checks passed
@dfong-adh dfong-adh deleted the 97028-DR-status-job-updates branch November 20, 2024 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants