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

BE | Ask Va Api: retrieve inquiries endpoint #16338

Merged
merged 4 commits into from
Apr 15, 2024

Conversation

Khoa-V-Nguyen
Copy link
Contributor

Summary

Enhancements and Refactoring

This pull request introduces several enhancements and refactoring across different modules of the application:

  1. Streamlined ApplicationController and Associated Specs:

    • Removed an unused rescue block from the ApplicationController.
    • Aligned the get_replies_mock_data.json file with CRM API conventions.
    • Resolved failing tests in the Optionset module's retriever_spec.rb and serializer_spec.rb.
  2. Enhanced Correspondences Module:

    • Improved functionality in the Correspondences::Entity class.
    • Updated logic in the Correspondences::Retriever class.
    • Revised serialization in the Correspondences::Serializer class.
  3. Enhanced Inquiries::Retriever and InquiriesController:

    • Unified the retrieval process using BaseRetriever in the Inquiries::Retriever.
    • Refactored the Inquiries::Retriever class for clarity and adherence to conventions.
    • Resolved controller issues stemming from changes in the Inquiries::Retriever.

These changes aim to streamline code, improve functionality, and resolve failing tests, contributing to overall code quality and maintainability.

Related issue(s)

Testing done

  • New code is covered by unit tests

Acceptance criteria

  • I fixed|updated|added 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 or Grafana (if applicable)
  • If app impacted requires authentication, did you login to a local build and verify all authenticated routes work as expected

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?

@Khoa-V-Nguyen Khoa-V-Nguyen self-assigned this Apr 15, 2024
@Khoa-V-Nguyen Khoa-V-Nguyen marked this pull request as ready for review April 15, 2024 17:01
@Khoa-V-Nguyen Khoa-V-Nguyen requested review from a team as code owners April 15, 2024 17:01
- Removed unused `rescue` block from `ApplicationController`
- Aligned `get_replies_mock_data.json` with `CRM API` conventions
- Resolved failing tests in `Optionset`'s `retriever_spec.rb` and `serializer_spec.rb`
- Improved `Correspondences::Entity` functionality
- Updated logic in `Correspondences::Retriever`
- Revised serialization in `Correspondences::Serializer`
- Unified retrieval process using `BaseRetriever` in `Inquiries::Retriever`
- Refactored `Inquiries::Retriever` for clarity and adherence to conventions
- Resolved controller issues arising from changes in `Inquiries::Retriever`
@Khoa-V-Nguyen Khoa-V-Nguyen force-pushed the ask-va-api-retrieve-inquiries-endpoint branch from e1afda5 to 08ef714 Compare April 15, 2024 17:02
Copy link

1 Warning
⚠️ This PR changes 458 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

  • modules/ask_va_api/app/controllers/ask_va_api/application_controller.rb (+0/-2)

  • modules/ask_va_api/app/controllers/ask_va_api/v0/inquiries_controller.rb (+3/-6)

  • modules/ask_va_api/app/lib/ask_va_api/base_retriever.rb (+5/-2)

  • modules/ask_va_api/app/lib/ask_va_api/correspondences/entity.rb (+0/-2)

  • modules/ask_va_api/app/lib/ask_va_api/correspondences/retriever.rb (+26/-18)

  • modules/ask_va_api/app/lib/ask_va_api/correspondences/serializer.rb (+1/-2)

  • modules/ask_va_api/app/lib/ask_va_api/inquiries/retriever.rb (+36/-26)

  • modules/ask_va_api/spec/app/lib/ask_va_api/correspondences/entity_spec.rb (+0/-2)

  • modules/ask_va_api/spec/app/lib/ask_va_api/correspondences/retriever_spec.rb (+22/-20)

  • modules/ask_va_api/spec/app/lib/ask_va_api/correspondences/serializer_spec.rb (+4/-5)

  • modules/ask_va_api/spec/app/lib/ask_va_api/inquiries/retriever_spec.rb (+128/-44)

  • modules/ask_va_api/spec/app/lib/ask_va_api/optionset/retriever_spec.rb (+0/-3)

  • modules/ask_va_api/spec/app/lib/ask_va_api/optionset/serializer_spec.rb (+1/-7)

  • modules/ask_va_api/spec/requests/v0/inquiries_spec.rb (+79/-14)

    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/, *.bru
    

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

Generated by 🚫 Danger

Copy link

@hemeshvpatel hemeshvpatel left a comment

Choose a reason for hiding this comment

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

Lgtm!

Copy link
Contributor

@joehall-tw joehall-tw 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. Leaving comments in slack since they're not showstoppers for me.

@Khoa-V-Nguyen Khoa-V-Nguyen merged commit 9e780a2 into master Apr 15, 2024
20 checks passed
@Khoa-V-Nguyen Khoa-V-Nguyen deleted the ask-va-api-retrieve-inquiries-endpoint branch April 15, 2024 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants