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

[ARP POA Submission] (#4) Status Check Job (#101919) #20696

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

pixiitech
Copy link
Contributor

Summary

  • This work is behind a feature toggle (flipper): YES/NO yes
    Added job to check status of PoA form submission after AR completes

  • (What is the solution, why is this the solution?) ⭐ Lighthouse POA API Integration va.gov-team#101919

  • (Which team do you work for, does your team own the maintenance of this component?) ARF

  • (If introducing a flipper, what is the success criteria being targeted?)

Related issue(s)

Testing done

  • New code is covered by unit tests
  • Describe what the old behavior was prior to the change The controller did not check status in LH
  • Describe the steps required to verify your changes are working as expected. Exclusively stating 'Specs run' is NOT acceptable as appropriate testing
  • If this work is behind a flipper:
    • Tests need to be written for both the flipper on and flipper off scenarios. Docs.
    • What is the testing plan for rolling out the feature?

Screenshots

Note: Optional

What areas of the site does it impact?

(Describe what parts of the site are impacted andifcode touched other areas)

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

Requested Feedback

(OPTIONAL)What should the reviewers know in addition to the above. Is there anything specific you wish the reviewer to assist with. Do you have any concerns with this PR, why?

@pixiitech pixiitech changed the base branch from master to art/101919/lighthouse-api-integration February 8, 2025 02:37
Copy link

github-actions bot commented Feb 8, 2025

Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: app/sidekiq/accredited_representative_portal/power_of_attorney_form_submission_job.rb

@pixiitech pixiitech changed the title Art/101919/form submission check job [ARP PoA submission] (#3) form submission check job Feb 8, 2025
@va-vfs-bot va-vfs-bot temporarily deployed to art/101919/form-submission-check-job/main/main February 8, 2025 02:38 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to art/101919/form-submission-check-job/main/main February 8, 2025 02:46 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to art/101919/form-submission-check-job/main/main February 10, 2025 16:43 Inactive
@pixiitech pixiitech force-pushed the art/101919/lighthouse-api-integration branch from bb62f04 to 81c62b8 Compare February 11, 2025 22:24
@pixiitech pixiitech changed the title [ARP PoA submission] (#3) form submission check job [ARP PoA submission] (#4) form submission check job Feb 11, 2025
@pixiitech pixiitech force-pushed the art/101919/lighthouse-api-integration branch from 81c62b8 to 376a2b6 Compare February 12, 2025 16:41
@pixiitech pixiitech force-pushed the art/101919/form-submission-check-job branch from f99f8c3 to 224b977 Compare February 13, 2025 15:19
@va-vfs-bot va-vfs-bot temporarily deployed to art/101919/form-submission-check-job/main/main February 13, 2025 15:20 Inactive
@pixiitech pixiitech changed the base branch from art/101919/lighthouse-api-integration to art/101919/2122-submission-controller-action February 13, 2025 16:10
@pixiitech pixiitech force-pushed the art/101919/form-submission-check-job branch from 224b977 to 441da2d Compare February 13, 2025 16:11
@va-vfs-bot va-vfs-bot temporarily deployed to art/101919/form-submission-check-job/main/main February 13, 2025 16:11 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to art/101919/form-submission-check-job/main/main February 13, 2025 16:20 Inactive
@pixiitech pixiitech force-pushed the art/101919/2122-submission-controller-action branch 2 times, most recently from 2f63694 to 755ca90 Compare February 19, 2025 15:06
@pixiitech pixiitech force-pushed the art/101919/form-submission-check-job branch from 441da2d to 2a5dfec Compare February 19, 2025 15:24
@va-vfs-bot va-vfs-bot temporarily deployed to art/101919/form-submission-check-job/main/main March 4, 2025 16:23 Inactive
@pixiitech pixiitech marked this pull request as draft March 4, 2025 22:08
Base automatically changed from art/101919/2122-submission-controller-action to master March 5, 2025 16:21
@pixiitech pixiitech dismissed nihil2501’s stale review March 5, 2025 16:21

The base branch was changed.

@va-vfs-bot va-vfs-bot temporarily deployed to art/101919/form-submission-check-job/main/main March 5, 2025 16:22 Inactive
@pixiitech pixiitech force-pushed the art/101919/form-submission-check-job branch from 97fe35a to f278f74 Compare March 5, 2025 17:09
@pixiitech pixiitech requested a review from nihil2501 March 5, 2025 17:09
@va-vfs-bot va-vfs-bot temporarily deployed to art/101919/form-submission-check-job/main/main March 5, 2025 17:10 Inactive
@pixiitech pixiitech marked this pull request as ready for review March 5, 2025 18:55
@@ -52,6 +52,7 @@ def load_response_fixture(path_suffix)
let!(:other_poa_request) { create(:power_of_attorney_request, :with_veteran_claimant, poa_code: other_poa_code) }

let(:time) { '2024-12-21T04:45:37.000Z' }
let(:time_plus_one_day) { '2024-12-22T04:45:37.000Z' }
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this needed?

PENDING = 'pending',
PROCESSED = 'processed'
].freeze
end
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the change to public?

)
end
end

Copy link
Contributor

Choose a reason for hiding this comment

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

Greg mentioned on the call this may have been intended for another PR.

@@ -138,7 +138,7 @@
expect(response).to have_http_status(:not_found)
poa_request.reload

expect(poa_request.resolution.present?).to be(false)
expect(poa_request.resolution.present?).to be(true)
Copy link
Contributor

Choose a reason for hiding this comment

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

What type of resolution is expected?

@@ -46,7 +47,6 @@ def call
raise Error.new(e.message, BenefitsClaims::ServiceException::ERROR_MAP.invert[e.class])
# Fatal 4xx errors or validation error: save error message, raise FatalError
rescue *FATAL_ERROR_TYPES => e
resolution&.delete
Copy link
Contributor

Choose a reason for hiding this comment

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

could you link the prior PR you mentioned that contained the regression for context?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

include Sidekiq::Job
include SentryLogging

sidekiq_options retry_for: 48.hours
Copy link
Contributor

Choose a reason for hiding this comment

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

sidekiq_retries_exhausted do |job, _ex|
poa_form_submission_id = job['args'].first
poa_form_submission = PowerOfAttorneyFormSubmission.find(poa_form_submission_id)
poa_form_submission.update(status: :failed, status_updated_at: DateTime.current)
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to document next steps somewhere for exhausted jobs: either an alternate path for resubmission or escalating the issue through an alert. Once expiration is implemented, the next steps will need to be taken within 60 days.

@@ -79,6 +74,20 @@ def create_resolution(request, resolution_type)

private

def create_decision_for(request, type)
Copy link
Contributor

Choose a reason for hiding this comment

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

Greg mentioned on the call this may have been intended for another PR.

end
end

context 'the job fails 3 times' do
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
context 'the job fails 3 times' do
context 'the job's retries have exhausted' do

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