-
Notifications
You must be signed in to change notification settings - Fork 69
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
base: master
Are you sure you want to change the base?
Conversation
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 |
bb62f04
to
81c62b8
Compare
81c62b8
to
376a2b6
Compare
f99f8c3
to
224b977
Compare
224b977
to
441da2d
Compare
2f63694
to
755ca90
Compare
441da2d
to
2a5dfec
Compare
97fe35a
to
f278f74
Compare
@@ -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' } |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 | ||
|
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noting here that this is a Lighthouse-provided requirement: https://dsva.slack.com/archives/C063D0M76HX/p1739814656787639?thread_ts=1739209607.852849&cid=C063D0M76HX
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
context 'the job fails 3 times' do | |
context 'the job's retries have exhausted' do |
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
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
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?