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

namepace update from CentralMail to BenefitsIntake #19595

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,9 @@ app/serializers/async_transaction @department-of-veterans-affairs/vfs-authentica
app/serializers/async_transaction/base_serializer.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/serializers/attachment_serializer.rb @department-of-veterans-affairs/vfs-10-10 @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/va-api-engineers
app/serializers/backend_statuses_serializer.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/serializers/benefits_intake_submission_serializer.rb @department-of-veterans-affairs/backend-review-group
app/serializers/category_serializer.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/serializers/cemetery_serializer.rb @department-of-veterans-affairs/mbs-core-team @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/serializers/central_mail_submission_serializer.rb @department-of-veterans-affairs/backend-review-group
app/serializers/communication_groups_serializer.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/serializers/contact_serializer.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/vfs-mhv-integration @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/serializers/decision_review_evidence_attachment_serializer.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
Expand Down Expand Up @@ -609,9 +609,7 @@ app/sidekiq/account_login_statistics_job.rb @department-of-veterans-affairs/octo
app/sidekiq/benefits_intake_remediation_status_job.rb @department-of-veterans-affairs/platform-va-product-forms @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/sidekiq/benefits_intake_status_job.rb @department-of-veterans-affairs/platform-va-product-forms @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/sidekiq/bgs @department-of-veterans-affairs/benefits-dependents-management @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/sidekiq/central_mail/delete_old_claims.rb @department-of-veterans-affairs/mbs-core-team @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/sidekiq/central_mail/submit_form4142_job.rb @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/sidekiq/central_mail/submit_central_form686c_job.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/benefits-dependents-management
app/sidekiq/copay_notifications @department-of-veterans-affairs/vsa-debt-resolution @department-of-veterans-affairs/backend-review-group
app/sidekiq/cypress_viewport_updater @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/va-api-engineers
app/sidekiq/decision_review @department-of-veterans-affairs/benefits-decision-reviews-be @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
Expand Down Expand Up @@ -1743,6 +1741,7 @@ spec/serializers/appointment_serializer_spec.rb @department-of-veterans-affairs/
spec/serializers/async_transaction/base_serializer_spec.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/serializers/attachment_serializer_spec.rb @department-of-veterans-affairs/vfs-10-10 @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/va-api-engineers
spec/serializers/backend_statuses_serializer_spec.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/serializers/benefits_intake_submission_serializer_spec.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/benefits-dependents-management
spec/serializers/category_serializer_spec.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/serializers/central_mail_submission_serializer_spec.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/serializers/cemetery_serializer_spec.rb @department-of-veterans-affairs/mbs-core-team @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/claims_base_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def create

def show
submission = CentralMailSubmission.joins(:central_mail_claim).find_by(saved_claims: { guid: params[:id] })
render json: CentralMailSubmissionSerializer.new(submission)
render json: BenefitsIntakeSubmissionSerializer.new(submission)
end

private
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/v0/burial_claims_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def show
state = submission_attempt.aasm_state == 'failure' ? 'failure' : 'success'
render(json: { data: { attributes: { state: } } })
elsif central_mail_submission
render json: CentralMailSubmissionSerializer.new(central_mail_submission)
render json: BenefitsIntakeSubmissionSerializer.new(central_mail_submission)
end
rescue ActiveRecord::RecordNotFound => e
monitor.track_show404(params[:id], current_user, e)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class CentralMailSubmissionSerializer
class BenefitsIntakeSubmissionSerializer
include JSONAPI::Serializer

attribute :state
Expand Down
8 changes: 5 additions & 3 deletions app/services/bgs/dependent_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,11 @@ def submit_to_central_service(claim:)
vet_info = JSON.parse(claim.form)['dependents_application']

user = BGS::SubmitForm686cJob.generate_user_struct(vet_info)
CentralMail::SubmitCentralForm686cJob.perform_async(claim.id,
KmsEncrypted::Box.new.encrypt(vet_info.to_json),
KmsEncrypted::Box.new.encrypt(user.to_h.to_json))
Lighthouse::BenefitsIntake::SubmitCentralForm686cJob.perform_async(
claim.id,
KmsEncrypted::Box.new.encrypt(vet_info.to_json),
KmsEncrypted::Box.new.encrypt(user.to_h.to_json)
)
end

def external_key
Expand Down
19 changes: 14 additions & 5 deletions app/sidekiq/bgs/submit_form674_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,22 @@ def self.generate_user_struct(encrypted_user_struct, vet_info)

def self.send_backup_submission(encrypted_user_struct_hash, vet_info, saved_claim_id, user_uuid)
user = generate_user_struct(encrypted_user_struct_hash, vet_info)
CentralMail::SubmitCentralForm686cJob.perform_async(saved_claim_id,
KmsEncrypted::Box.new.encrypt(vet_info.to_json),
KmsEncrypted::Box.new.encrypt(user.to_h.to_json))
Lighthouse::BenefitsIntake::SubmitCentralForm686cJob.perform_async(
saved_claim_id,
KmsEncrypted::Box.new.encrypt(vet_info.to_json),
KmsEncrypted::Box.new.encrypt(user.to_h.to_json)
)
InProgressForm.destroy_by(form_id: FORM_ID, user_uuid:)
rescue => e
Rails.logger.warn('BGS::SubmitForm674Job backup submission failed...',
{ user_uuid:, saved_claim_id:, error: e.message, nested_error: e.cause&.message })
Rails.logger.warn(
'BGS::SubmitForm674Job backup submission failed...',
{
user_uuid: user_uuid,
saved_claim_id: saved_claim_id,
error: e.message,
nested_error: e.cause&.message
}
)
InProgressForm.find_by(form_id: FORM_ID, user_uuid:)&.submission_pending!
end

Expand Down
8 changes: 5 additions & 3 deletions app/sidekiq/bgs/submit_form686c_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,11 @@ def self.generate_user_struct(vet_info)

def self.send_backup_submission(vet_info, saved_claim_id, user_uuid)
user = generate_user_struct(vet_info)
CentralMail::SubmitCentralForm686cJob.perform_async(saved_claim_id,
KmsEncrypted::Box.new.encrypt(vet_info.to_json),
KmsEncrypted::Box.new.encrypt(user.to_h.to_json))
Lighthouse::BenefitsIntake::SubmitCentralForm686cJob.perform_async(
saved_claim_id,
KmsEncrypted::Box.new.encrypt(vet_info.to_json),
KmsEncrypted::Box.new.encrypt(user.to_h.to_json)
)
InProgressForm.destroy_by(form_id: FORM_ID, user_uuid:)
rescue => e
Rails.logger.warn('BGS::SubmitForm686cJob backup submission failed...',
Expand Down
23 changes: 0 additions & 23 deletions app/sidekiq/central_mail/delete_old_claims.rb

This file was deleted.

Loading
Loading