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

Ruby 3 upgrade: fix DetailedSchemaErrors spec failures #11983

Merged

Conversation

holdenhinkle
Copy link
Contributor

Resolves department-of-veterans-affairs/va.gov-team#54268

Fixes DetailedSchemaErrors spec failures:

  1) Common::Exceptions::DetailedSchemaErrors unknown error type responds with generic validation error data with pointer
     Failure/Error: error.merge! source: { pointer: pointer }

     FrozenError:
       can't modify frozen Hash: {:detail=>nil, :links=>nil, :source=>nil, :meta=>nil, :sentry_type=>"error", :title=>"Validation error", :code=>100, :status=>422}
     # ./lib/common/exceptions/detailed_schema_errors.rb:24:in `merge!'
     # ./lib/common/exceptions/detailed_schema_errors.rb:24:in `block in errors'
     # ./lib/common/exceptions/detailed_schema_errors.rb:16:in `map'
     # ./lib/common/exceptions/detailed_schema_errors.rb:16:in `errors'
     # ./spec/lib/common/exceptions/detailed_schema_errors_spec.rb:227:in `block (3 levels) in <top (required)>'

Tests pass on Ruby 2.7.6 and Ruby 3.0.5.

@holdenhinkle holdenhinkle requested review from a team as code owners March 6, 2023 20:49
@ericboehs ericboehs force-pushed the hh-ruby-upgrade-fix-DetailedSchemaErrors-spec-failures branch from 5c2a1bf to 31846d0 Compare March 6, 2023 21:04
@ericboehs ericboehs requested review from a team as code owners March 6, 2023 21:04
@github-actions github-actions bot added the mobile label Mar 6, 2023
@ericboehs ericboehs force-pushed the hh-ruby-upgrade-fix-DetailedSchemaErrors-spec-failures branch from 31846d0 to 5c2a1bf Compare March 6, 2023 21:05
@github-actions github-actions bot removed the mobile label Mar 6, 2023
@ericboehs ericboehs enabled auto-merge (squash) March 6, 2023 21:06
@github-actions
Copy link

github-actions bot commented Mar 6, 2023

1 Warning
⚠️ This PR changes 229 LoC (not counting whitespace/newlines).

In order to ensure each PR receives the proper attention it deserves, we recommend not exceeding
200. Expect some delays getting reviews.

File Summary

Files

  • .github/workflows/code_checks.yml (+1/-1)

  • .ruby-version (+1/-1)

  • Dockerfile (+1/-1)

  • Gemfile (+1/-1)

  • Rakefile (+1/-1)

  • app/controllers/concerns/sign_in/authentication.rb (+1/-1)

  • app/controllers/inherited_proofing_controller.rb (+1/-1)

  • app/controllers/openid_application_controller.rb (+1/-1)

  • app/controllers/v0/onsite_notifications_controller.rb (+1/-1)

  • app/models/concerns/form526_rapid_ready_for_decision_concern.rb (+1/-1)

  • app/models/emis_redis/military_information.rb (+2/-2)

  • app/models/emis_redis/military_information_v2.rb (+2/-2)

  • app/models/form_profile.rb (+1/-1)

  • app/services/form_durations/worker.rb (+1/-1)

  • app/workers/education_form/create_daily_spool_files.rb (+1/-1)

  • app/workers/form1010cg/submission_job.rb (+1/-1)

  • docker-compose.gha.yml (+1/-1)

  • docs/setup/native.md (+1/-1)

  • lib/central_mail/utilities.rb (+4/-4)

  • lib/common/client/middleware/response/json_parser.rb (+2/-2)

  • lib/common/exceptions/detailed_schema_errors.rb (+1/-2)

  • lib/evss/claims_service.rb (+1/-1)

  • lib/evss/common_service.rb (+1/-1)

  • lib/evss/documents_service.rb (+1/-1)

  • lib/evss/pciu/email_address.rb (+1/-1)

  • lib/evss/pciu_address/address.rb (+2/-2)

  • lib/evss/ppiu/payment_account.rb (+2/-2)

  • lib/hca/soap_parser.rb (+2/-2)

  • lib/identity/parsers/gc_ids_constants.rb (+15/-15)

  • lib/okta/service.rb (+3/-3)

  • lib/olive_branch_patch.rb (+1/-1)

  • lib/salesforce/service.rb (+1/-1)

  • lib/sentry/processor/email_sanitizer.rb (+1/-1)

  • lib/sentry/processor/pii_sanitizer.rb (+2/-2)

  • lib/va_profile/communication/service.rb (+1/-1)

  • lib/va_profile/models/base_address.rb (+2/-2)

  • lib/va_profile/models/telephone.rb (+2/-2)

  • lib/vetext/service.rb (+3/-3)

  • modules/appeals_api/app/controllers/appeals_api/v1/decision_reviews/base_contestable_issues_controller.rb (+2/-2)

  • modules/appeals_api/app/controllers/concerns/appeals_api/openid_auth.rb (+1/-1)

  • modules/appeals_api/app/workers/appeals_api/appeal_received_job.rb (+1/-1)

  • modules/appeals_api/lib/appeals_api/stats_report.rb (+1/-1)

  • modules/appeals_api/spec/spec_helper.rb (+1/-1)

  • modules/apps_api/spec/spec_helper.rb (+1/-1)

  • modules/check_in/app/models/check_in/patient_check_in.rb (+1/-1)

  • modules/check_in/app/models/check_in/v2/session.rb (+3/-3)

  • modules/check_in/lib/check_in/utils/logger.rb (+1/-1)

  • modules/check_in/spec/spec_helper.rb (+1/-1)

  • modules/claims_api/app/models/claims_api/veteran.rb (+1/-1)

  • modules/claims_api/spec/spec_helper.rb (+1/-1)

  • modules/covid_research/app/controllers/covid_research/volunteer/submissions_controller.rb (+1/-1)

  • modules/covid_vaccine/app/models/covid_vaccine/v0/raw_expanded_form_data.rb (+1/-1)

  • modules/covid_vaccine/app/models/covid_vaccine/v0/raw_form_data.rb (+1/-1)

  • modules/debts_api/spec/spec_helper.rb (+1/-1)

  • modules/dhp_connected_devices/spec/spec_helper.rb (+1/-1)

  • modules/facilities_api/spec/spec_helper.rb (+1/-1)

  • modules/forms_api/spec/spec_helper.rb (+1/-1)

  • modules/health_quest/app/services/health_quest/questionnaire_manager/basic_questionnaire_manager_formatter.rb (+2/-2)

  • modules/health_quest/app/services/health_quest/questionnaire_manager/factory.rb (+1/-1)

  • modules/health_quest/app/services/health_quest/questionnaire_manager/questionnaire_response_collector.rb (+1/-1)

  • modules/health_quest/app/services/health_quest/questionnaire_manager/questionnaire_responses_formatter.rb (+1/-1)

  • modules/health_quest/app/services/health_quest/questionnaire_manager/save_in_progress_collector.rb (+1/-1)

  • modules/health_quest/app/services/health_quest/questionnaire_manager/save_in_progress_formatter.rb (+1/-1)

  • modules/health_quest/spec/spec_helper.rb (+1/-1)

  • modules/meb_api/spec/spec_helper.rb (+1/-1)

  • modules/mobile/app/serializers/mobile/v0/immunization_serializer.rb (+1/-1)

  • modules/openid_auth/spec/spec_helper.rb (+1/-1)

  • modules/va_forms/lib/tasks/va_forms.rake (+1/-1)

  • modules/va_forms/spec/spec_helper.rb (+1/-1)

  • modules/va_notify/spec/spec_helper.rb (+1/-1)

  • modules/vba_documents/lib/vba_documents/upload_validator.rb (+1/-1)

  • modules/vba_documents/spec/spec_helper.rb (+1/-1)

  • modules/veteran/spec/spec_helper.rb (+1/-1)

  • modules/veteran_confirmation/spec/spec_helper.rb (+1/-1)

  • modules/veteran_verification/spec/spec_helper.rb (+1/-1)

  • spec/lib/tasks/support/schema_camelizer_spec.rb (+2/-2)

  • spec/requests/v1/apidoc/apidoc_spec.rb (+1/-1)

  • spec/support/matchers.rb (+1/-1)

  • spec/support/vcr_multipart_matcher_helper.rb (+1/-1)

    Note: We exclude files matching the following when considering PR size:

    *.csv, *.json, *.tsv, *.txt, Gemfile.lock, app/swagger, modules/mobile/docs, spec/fixtures/, spec/support/vcr_cassettes/, modules/mobile/spec/support/vcr_cassettes/, db/seeds, modules/vaos/app/docs, modules/meb_api/app/docs, modules/appeals_api/app/swagger/
    

Big PRs are difficult to review, often become stale, and cause delays.

Generated by 🚫 Danger

@ericboehs ericboehs merged commit 4260c8d into master Mar 6, 2023
@ericboehs ericboehs deleted the hh-ruby-upgrade-fix-DetailedSchemaErrors-spec-failures branch March 6, 2023 21:16
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.

Ruby 3 Spec Failure: DetailedSchemaErrors
2 participants