Skip to content

Deploy RC 232 to production#7414

Merged
jmdembe merged 28 commits intostages/prodfrom
stages/rc-2022-12-01
Dec 1, 2022
Merged

Deploy RC 232 to production#7414
jmdembe merged 28 commits intostages/prodfrom
stages/rc-2022-12-01

Conversation

@jmdembe
Copy link
Contributor

@jmdembe jmdembe commented Dec 1, 2022

Improvements

  • Accessibility: Update memorable date component hint (#7365)
  • ci: Add SAST LG-5361 (#7377)
  • In-person proofing: Retrieve IPP facilities from USPS API (#7386)
  • Job: Add email reminder job (#7256)
  • Refactoring: Remove proofing::base, Proofing::Result (#7349)

Bug Fixes

  • Voice OTP: Fix voice MFA OTP errors for Spanish-language visitors (#7396)

Internal

  • AB Testing: Acuant SDK Upgrade AB Testing (#7392)
  • Attempts API: Populate last_consented_at field (#7374)
  • Logging: Add phone metadata to telephony logging (#7399)

gsa-manish and others added 28 commits November 22, 2022 10:40
* Test ddp proofer in resolution proofing job spec

* Stop inheriting from LexisNexis::Proofer

* LG-7688-dont-use-proofing-base

changelog: Improvements, Refactoring, Remove proofing::base, Proofing::Result

Co-authored-by: Kimball Bighorse <kbighorse@yahoo.com>
…l Service (SES) support (#7380)

* Validate email domains are ASCII to better align with AWS Simple Email Service (SES) support

changelog: Bug Fixes, Email, Validate email domains are ASCII to better align with AWS Simple Email Service (SES) support

* Update app/validators/form_email_validator.rb

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>

* rescue email parsing exception

* add domain validation to AddUserEmailForm

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
* Updating to Acuant SDK 11.7.1

* Add changelog

changelog: Internal, Updates, Updating to Acuant SDK 11.7.1

* Removing unused 11.5.0 Acuant SDK files

changelog: Internal,SDK Upgrade, removing unused Acuant SDK 11.5.0 files

* Update spec/javascripts/packages/document-capture/components/acuant-sdk-spec.js

Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov>

* Fixing test assumption about window scope

-- What
In the 11.7.0 update, the Acuant SDK was available in the global
scope, but not on the window object -- and we tested for this specific
case since it broke many previous assumptions.

With the 11.7.1 this inconsistency has been fixed (and is even noted
in the release notes here:
https://github.com/Acuant/JavascriptWebSDKV11/releases/tag/11.7.1)

changelog: Internal, SDK Upgrade, Upgrading Acuant SDK to 11.7.1

Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov>
… Page (#7284)

* Implement try again logic for Inherited Proofing

changelog: Upcoming Features, Inherited Proofing, LG-7450 Implement "Try Again" Button Functionality on the First Error Page

Refactor code to enqueue user PII job to mixin

- To keep things DRY as this will be used in the verify_wait
step when the user clicks the "Retry" button on the
IP Warning UI.

Refactor to use UserPiiJobInitiator mixin

Add translations for request/response errors

- Related to inherited proofing service provider requests and responses;
this, so that we can 1) record the error and 2) display something to
the user. Errors displayed to the user are "safe" errors, revealing
no information that could be used by those having ill intentions.

Refactor VA form and service classes

- To handle network errors encountered during the request to
the service provider and decrypting response data returned
from the service provider request.

Allow va mock proofer to return meaningful error

- So that we can identify the error in the va Form class as such
and notify our Flow that an error has indeed occured. The error
added to the mock proofer is a network-related error, not a
va api related (returned in a response) error.

Enable flow step to hook into "try again" logic

- Which exists in the base class.

Enable flow step to hook into "try again" logic

DRY VerifyBaseStep for Inherited Proofing usage

Set up throttling for Inherited Proofing

Change the path the "Try again" button uses

- To point to the :verify_wait flow step so the user can try again.

Automated tests

Refactor inherited_proofing_cancel_spec.rb

- To use InheritedProofingWithServiceProviderHelper.

* Address PR feedback

- Remove unnecessary call to super in FormBase class.
- Remove #extra method in FormBase.
- Rename add_service_error_if method to add_service_error and add
conditional callback if: :service_error?
- Fix spec to check actual :service_error hasn key value instead of
converting the hash to a string and checking that.

* Add missing failure method to BaseFlow

- This seemed a better option than making BaseFlow an abstract class raising
NoMethodError, since it looks like the logic would be the same anyhow.

* Create step action to retry user pii retrieval

* Address latest PR feedback
* Include OTP adapter when logging the OTP send event

changelog: Internal, Logging, Include OTP adapter when logging the OTP send event

* Fix typo

* Update app/controllers/idv/otp_delivery_method_controller.rb

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>

* add specs

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
* Add content_type to DataUrlImage

* First pass at wiring doc upload into attempts API

changelog: Improvements, IRS Attempts API, Add document escrow fields to IRS attempts API

* Additional tests

* WIP

* Update form test to roundtrip documents

Write documents to encrypted storage and read them back

* Use front_image & back_image lets for tests

* Update ImageUploadsController spec

* Test Attempts API includes images on  validation failure

* Update app/forms/idv/api_image_upload_form.rb

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>

* Update app/services/encrypted_document_storage/local_storage.rb

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>

* Update *_image -> *_image_uuid

Clarify that these args hold UUIDs identifying the front/back images

* Use let() for regexes in tests

avoid polluting global namespace

* Add doc escrow parameter descriptions

* Minimize unnecessary verbosity

* Lint issues

* Reduce number of document escrow fields

50% off!

* add "filename" to fields

try and make it clearer what these things are

* Remove empty test

whoops

* Update app/services/encrypted_document_storage/document_writer.rb

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>

* Update spec from `should` to `is_expected.to`

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
* Base GPO expiration on original request date

Rather than basing on the date we FTP the .csv file out, base the expiry on the time of the original request's creation.

For LG-8063

changelog: Bug Fixes, GPO, Address issue where expiration date on GPO letters was not printed correctly.

* Switch to Time.zone.parse
Add address verification logging to some IdV events

Specifically:
- personal key visited 
- personal key submitted
* review info visited

The new information is logged under the 'address_verification_method' key.

[skip changelog]
changelog: Bug Fixes, Voice OTP, Fix voice MFA OTP errors for Spanish-language visitors
* Add spec for SSML Pinpoint message validation

[skip changelog]

* Configure Nokogiri XML parsing as strict

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
* Fix flaky GPO exporter test

Address a flaky test introduced in #7389.

We run tests in CI with a random Timezone each time. This means sometimes the local day and UTC day are different, which was making the GPO exporter test fail.

This change updates `GpoConfirmationExporter` to convert dates to UTC before outputting them. This gives us consistency on tests but should not matter in prod, where the Timezone is already set to UTC.

For LG-8233

[skip changelog]

* Update app/services/gpo_confirmation_exporter.rb

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
* Fix flaky telephony test

[skip changelog]

* Use around/ensure blocks in specs

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
* email job

* moving email job file and fixing missing end

* send partially working

* email job working

* include test for needs email reminder

* add test for excluded enrollments

* make methods private

* fall back to app name if sp_name is not available

* changelog:Improvement, Job, add email reminder job

* db migration

* update email reminder so it covers a range of dates

* can be equal to end interval

* adjust interval

* update config names

* make input param names clearer and change time to make sure correct dates included

* update email reminder tests

* lint fix

* update calculation so excludes enrollments on late benchmark and includes ones on early benchmark

* fix test so correct enrollments are picked based on established_at time

* fix lint issue

* check flags are false and remove unneeded test

* move email reminder job to in person folder

* fix lint

* job spec

* continued work on job spec

* check enrollment code

* update to email job

* some tests pass and others fail

* tests working and lint changes

* update naming

* refactor based on feedback

* update tests

* remove unneeded nil check

* LG-7185: Add error handling and analytics to in-person proofing email reminder job (#7364)

* add new analytics events

* add analytics and error handling to job

* add analytics expectations to tests

* add test for error handling (currently failing)

* job refactor

* remove put statement

* error is raised but occurs 2x

* execption logged test passes

* separate error test for clarity

* fix lint by documenting parameter

* fix spelling

Co-authored-by: Shannon Alexander <shannon.alexander-navarro@gsa.gov>

* pluralize email subject and header by days left

we might send the email when there's only one day left

Co-authored-by: Tomas Apodaca <thomas.apodaca@gsa.gov>
* Initial commit of Acuant SDK a/b testing

* Adding a/b test react context spec

* Fixing IdentityStore config typos

* Adding test case to document capture step spec

changelog: Internal, A/B Testing, Acuant SDK Upgrade A/B Test Implementation

* Adding analytics method

changelog: Internal, AB Testing, Acuant SDK Upgrade AB Testing

* Update config/initializers/ab_tests.rb

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>

* Fixing lints

changelog: Internal, AB Testing, Acuant SDK Upgrade AB Testing

* Adding acuant sdk ab test info to doc auth submitted tracking

changelog: Internal, AB Testing, Acuant SDK Upgrade AB Testing

* Fixing lints

changelog: Internal, AB Testing, Acuant SDK AB Testing

* Fixing template variable issues

changelog: Internal, AB Testing, Acuant SDK Upgrade AB Testing

* Update app/views/idv/shared/_document_capture.html.erb

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>

* Fixing image uploads spec to assume sdk ab testing is off

changelog: Internal, AB Testing, Acuant SDK Upgrade AB Testing

* Using suggested doc-capture pack version of trackEvent

-- What
AD suggested piggy-backing on the document-capture.tsx pack's version
of trackEvent, which wraps the plain trackEvent in order to add its
own extra data. We now use this for adding information about the sdk
upgrade ab testing.

changelog: Internal, AB Testing, Acuant SDK Upgrade AB Testing

* Switching acuant sdk frontend test to typescript

changelog: Internal, AB Testing, Acuant SDK Upgrade AB Testing

* Fixing lints

changelog: Internal, AB Testing, Acuant SDK Upgrade AB Testing

* Fixing sdkSrc and cameraSrc props 2b forced when present

-- What
We need the cameraSrc and sdkSrc props on the Acuant context, because
tests provide about:blank so that the loading of the scripts does not
throw errors (and success can be simulated on frontend).

This commit provides a mechanism by which these props are null by
default, but if there is a value present they will be used above any
other consideration. If null, we kick it to the ab test and then to
determine which path(s) to use.

changelog: Internal, AB Testing, Acuant SDK Upgrade AB Testing

* Removing React Context for Acuant version A/B Test

-- What
As suggested in a thread by @aduth
[#7392 (comment)]
we probably don't need all the overhead of a new React Context for
dealing with the Acuant version a/b testing. Instead, we can surmise
what the camera and sdk routes should be from the AppRoot values and
simply pass these to the AcuantContextProvider.

This commit represents deletions, modifications, and test updates that
attempt to implement this suggestion.

As I see it, there are still two open questions that are not deal
breakers for finishing this work in the immediate term:
1. We declare the src routes as default prop values in the Acuant
context (React), but also specify these versions in the document
capture step file (ruby). Should we specify the new and old versions
as globals somewhere (IdentityConfig store)?
2. Do we have a trackEvent call for when the acuant SDK has loaded or
attempts to load? If not, should we add one? (I'm thinking about the
a/b test information being present at load time vs capture time vs
submission time)

changelog: Internal, AB Testing, Acuant SDK Upgrade Testing

* Fixing bad acuant camera path in template

changelog: Internal, AB Testing, Acuant SDK Upgrade AB Testing

* Fixing lints

changelog: Internal, AB Testing, Acuant SDK Upgrade AB Testing

* Switching ab test to off by default

changelog: Internal, AB Testing, Acuant SDK Upgrade AB Testing

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
* Add phone metadata to telephony logging

changelog: Internal, Logging, Add phone metadata to telephony logging

* fix specs
* enable sast

* changelog: Improvements, ci, add SAST LG-5361
**Why**: They were refactored away in #7295
into OutOfBandSessionAccessor#{load_pii,load_x509}

[skip changelog]
changelog: Internal, Attempts API, Populate last_consented_at field
* Inline logic in ConfirmationSession
* Rename PhoneConfirmation::ConfirmationSession to Idv::PhoneConfirmationSession
**Why**: PhoneConfirmation namespace only used in IDV, didn't need to be its own thing

[skip changelog]
* Add exception handling back to DDP proofer

A recent refactor of the DDP proofer failed to include this rescue. As a result exceptions are unhandled and raised to the background job and cause a background job failure.

* [skip changelog]
… bodies (#7412)

The LexisNexis response bodies may contain information that we do not wish to be logged or reported to NewRelic (such as PII).

When a JSON parse error is raised it includes the portion of the JSON that resulted in the error. This commit rescues the JSON parse errors that are raised when a LexisNexis response body is being parsed. These error messages may contain sensitive information. As a result a new JSON parse error is raised in their place with a message that does not include the JSON that caused the error.

[skip changelog]
* request facilities and remove pilot info

* cleanup

* expect nested resp w snakecase from frontend

* correct params for PO search controller tests

* changelog: Improvements, In-person proofing, retrieve IPP facilities from USPS API

* put PO search behind feature flag

* reincorporate test coverage for pilot facilities

* get feature tests passing

* implement solution for params with nil address
* Inline DocumentCaptureSessionValidator

- It was only used once
- Move to Idv:: namespace, since CaptureDoc:: only had the one item

* Move, rename to be a form
* Use terser class name

[skip changelog]

Co-authored-by: Andrew Duthie <aduth@users.noreply.github.com>
[skip changelog]

Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov>
* strings added

* use more granular hints

* adjust memorable date to better match validated field form

* changelog: Improvements, Accessibility, update memorable date component hint

* updates to hint

* fix lint issues

* normalize yml

* update labelledby fixes safari issue

* add spec for hints

* fix lint issues
@jmdembe jmdembe changed the title Stages/rc 2022 12 01 Deploy RC 232 to production Dec 1, 2022
@mdiarra3
Copy link
Contributor

mdiarra3 commented Dec 1, 2022

Still seeing that issue with things in the prod branch beign shown as commits here.

@mdiarra3
Copy link
Contributor

mdiarra3 commented Dec 1, 2022

Im thining it might be due to the dropping of commits previously. so glad that commit can finally go through!

@jmdembe jmdembe marked this pull request as ready for review December 1, 2022 16:36
Copy link
Contributor

@aduth aduth left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@jmdembe jmdembe merged commit ce9b6bf into stages/prod Dec 1, 2022
@jmdembe jmdembe deleted the stages/rc-2022-12-01 branch December 1, 2022 20:09
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.