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

DBEX/92496: add transactionId to LH Submit request bodies #18581

Merged
merged 3 commits into from
Sep 25, 2024

Conversation

aurora-a-k-a-lightning
Copy link
Contributor

@aurora-a-k-a-lightning aurora-a-k-a-lightning commented Sep 24, 2024

Summary

  • This work is behind a feature toggle (flipper): YES
  • add meta.transactionId to LH submit endpoint requests

Related issue(s)

Testing done

  • New code is covered by unit tests
  • use updated test harness to send submit request to LH staging environment or follow this:
  1. have a Form526Submission on hand as @submission (i.e. @submission = Form526Submission.first)
  2. @transform_service = EVSS::DisabilityCompensationForm::Form526ToLighthouseTransform.new
  3. @body = @transform_service.transform(@submission.form['form526'])
  4. @service = BenefitsClaims::Service.new(@submission.user_account.icn)
  5. this is the new part
transaction_id = @submission.auth_headers['va_eauth_service_transaction_id']
@response = @service.submit526(@body, nil, nil, { generate_pdf:, transaction_id: })
  1. at this point you can check @service.send(:prepare_submission_body, @body.as_json) to see the meta in the request body
  2. or check @response.body['meta'] to see what you sent to lighthouse

Screenshots

image

What areas of the site does it impact?

Form526 2022 form version submission to lighthouse

Acceptance criteria

  • I updated 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

}
}
end
body.as_json.deep_transform_keys { |k| k.camelize(:lower) }
end

def prepare_submission_body(body)
def prepare_submission_body(body, transaction_id)
# if we're coming straight from the transformation service without
# making this a jsonapi request body first ({data: {type:, attributes}}),
Copy link
Contributor

Choose a reason for hiding this comment

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

Should ({data: {type:, attributes}}) be updated to include the new format that includes the addition of meta: { transaction_id: } to the request body? attributes also appears to be be missing a colon at the end.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

drat. great point! i'll address this in refactor. thank you, @freeheeling

Copy link
Contributor

@freeheeling freeheeling left a comment

Choose a reason for hiding this comment

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

Looks good, with one question concerning a code comment.

Copy link

Backend-review-group approval confirmed.

@aurora-a-k-a-lightning aurora-a-k-a-lightning merged commit 941ebae into master Sep 25, 2024
25 of 27 checks passed
@aurora-a-k-a-lightning aurora-a-k-a-lightning deleted the dbex/92496-transactionId branch September 25, 2024 19:17
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.

5 participants