-
Notifications
You must be signed in to change notification settings - Fork 63
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
mobile - update claim request decision response #12952
Conversation
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.
Looks like CI is failing and I suspect it's because we're breaking legacy functionality.
On a side note, I have absolutely no idea why we're returning a jid, but we do it in a number of places in the app. The jid is almost surely unusable by the mobile app. It's unfortunate that we've established this pattern because now we're stuck with jid in the response schema unless we want to version the endpoint to phase it out. Which I think is worth consideration.
evss_claims_proxy.request_decision(params[:id]) | ||
end | ||
|
||
render json: { data: { job_id: adapt_response_state(response) } }, status: :accepted |
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.
I think this will break legacy functionality.
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.
oh right. fixed
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.
I think this would be simpler as:
jid = if Flipper.enabled?(:mobile_lighthouse_claims, @current_user)
response = lighthouse_claims_proxy.request_decision(params[:id])
adapt_response_state(response)
else
evss_claims_proxy.request_decision(params[:id])
end
@@ -154,6 +155,12 @@ def filter_by_completed(list, filter) | |||
entry[:completed] == ActiveRecord::Type::Boolean.new.deserialize(filter) | |||
end | |||
end | |||
|
|||
def adapt_response_state(response) |
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.
I think adapt_response_status
or adapt_response
might be a more accurate name.
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.
works for me. fixed
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.
🚀
Note: Delete the description statements, complete each step. None are optional, but can be justified as to why they cannot be completed as written. Provide known gaps to testing that may raise the risk of merging to production.
Summary
the new Lighthouse endpoint returns a boolean success rather than the job id. FE doesn't use the id so for backwards compatibility we're keeping the Job id field and just put string of success or failed for debugging purposes.
Related issue(s)
department-of-veterans-affairs/va-mobile-app#6007
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?