-
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
[10-10CG] Add ability to not call fully_validate_schema in SavedClaim #19468
base: master
Are you sure you want to change the base?
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.
GTG
For context for anyone else taking a look at this --> Brandon and I have been discussing an issue with schema-validation for several days. This PR is an attempt to isolate the difference in behavior between fully_validate_schema
and fully_validate
context 'The flipper is turned on' do | ||
before do | ||
Flipper.enable(:dependents_enqueue_with_user_struct) | ||
allow(Flipper).to receive(:enabled?).with(:dependents_enqueue_with_user_struct).and_return(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.
Change these to stubs instead of actually enabling/disabling the toggle. Added stub at the top to default to original values to handle any that are not stubbed.
@@ -3270,6 +3270,10 @@ | |||
end | |||
|
|||
describe 'contact us' do | |||
before 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.
These were failing because some expectations were validating that some toggle was set and the new Flipper call in saved_claim was expecting it. I added this to default all to call the original so any that don't have explicit expectations won't fail.
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: spec/controllers/v0/contact_us/inquiries_controller_spec.rb |
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: spec/controllers/v0/contact_us/inquiries_controller_spec.rb |
@@ -1107,6 +1107,7 @@ spec/controllers/v0/benefits_reference_data_controller_spec.rb @department-of-ve | |||
spec/controllers/v0/burial_claims_controller_spec.rb @department-of-veterans-affairs/mbs-core-team @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group | |||
spec/controllers/v0/caregivers_assistance_claims_controller_spec.rb @department-of-veterans-affairs/vfs-10-10 | |||
spec/controllers/v0/claim_letters_controller_spec.rb @department-of-veterans-affairs/benefits-management-tools-be @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group | |||
spec/controllers/v0/contact_us @department-of-veterans-affairs/ask-va-team @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group |
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.
Apparently this was missing? The github job flagged it since I had updated one fo the specs in the directory so I went ahead and added the codeowners to match the actual implementation directory.
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.
GTG
Summary
fully_validate_schema
in thejson-schema
gem. This call was added to try to validate the schema without the form content to handle some errors that were being seen, but seems to have potentially introduced another error that's causing the schema file to not be read in the subsequentfully_validate
call. This is the only location where we are currently callingfully_validate_schema
(we callfully_validate
other places), and it is the only one experiencing the issue. This PR adds a flipper toggle that allows us to skip that validation step.saved_claim_schema_validation_disable
Related issue(s)
Testing done
Screenshots
Note: Optional
What areas of the site does it impact?
Any model that inherits from the
SavedClaim
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?