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

Update DTO builder and Spec #193

Open
wants to merge 1 commit into
base: feature/APPEALS-59232
Choose a base branch
from

Conversation

NoelleAd
Copy link

Resolves Jira Issue Title

Description

Please explain the changes you made here.

Acceptance Criteria

  • Code compiles correctly

Testing Plan

  1. Go to Jira Issue/Test Plan Link or list them below
  • For feature branches merging into master: Was this deployed to UAT?

Backend

Database Changes

Only for Schema Changes

  • Add typical timestamps (created_at, updated_at) for new tables
  • Update column comments; include a "PII" prefix to indicate definite or potential PII data content
  • Verify that migrate:rollback works as desired (change supported functions)
  • Perform query profiling (eyeball Rails log, check bullet and fasterer output)
  • For queries using raw sql was an explain plan run by System Team
  • Add appropriate indexes (especially for foreign keys, polymorphic columns, unique constraints, and Rails scopes)

Integrations: Adding endpoints for external APIs

  • Check that Appeals Consumer's external API code for the endpoint matches the code in the relevant integration repo
    • Request: Service name, method name, input field names
    • Response: Check expected data structure
    • Check that calls are wrapped in MetricService record block
  • Check that all configuration is coming from ENV variables
    • Listed all new ENV variables in description
    • Worked with or notified System Team that new ENV variables need to be set
  • Update Fakes
  • For feature branches: Was this tested in Appeals Consumer UAT

Best practices

Code Documentation Updates

  • Add or update code comments at the top of the class, module, and/or component.

Tests

Test Coverage

Did you include any test coverage for your code? Check below:

  • RSpec
  • Other

Code Climate

Your code does not add any new code climate offenses? If so why?

  • No new code climate issues added

Monitoring, Logging, Auditing, Error, and Exception Handling Checklist

Monitoring

  • Are performance metrics (e.g., response time, throughput) being tracked?
  • Are key application components monitored (e.g., database, cache, queues)?
  • Is there a system in place for setting up alerts based on performance thresholds?

Logging

  • Are logs being produced at appropriate log levels (debug, info, warn, error, fatal)?
  • Are logs structured (e.g., using log tags) for easier querying and analysis?
  • Are sensitive data (e.g., passwords, tokens) redacted or omitted from logs?
  • Is log retention and rotation configured correctly?
  • Are logs being forwarded to a centralized logging system if needed?

Auditing

  • Are user actions being logged for audit purposes?
  • Are changes to critical data being tracked ?
  • Are logs being securely stored and protected from tampering or exposing protected data?

Error Handling

  • Are errors being caught and handled gracefully?
  • Are appropriate error messages being displayed to users?
  • Are critical errors being reported to an error tracking system (e.g., Sentry, ELK)?
  • Are unhandled exceptions being caught at the application level ?

Exception Handling

  • Are custom exceptions defined and used where appropriate?
  • Is exception handling consistent throughout the codebase?
  • Are exceptions logged with relevant context and stack trace information?
  • Are exceptions being grouped and categorized for easier analysis and resolution?

Copy link

Total Coverage: 100.00%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
./app/concerns
   logger_mixin.rb100%100%100%
./app/consumers
   application_consumer.rb100%100%100%
   decision_review_created_consumer.rb100%100%100%
   decision_review_updated_consumer.rb100%100%100%
   person_updated_consumer.rb100%100%100%
./app/controllers
   application_controller.rb100%100%100%
   health_checks_controller.rb100%100%100%
./app/controllers/api
   application_controller.rb100%100%100%
./app/controllers/api/v1
   jobs_controller.rb100%100%100%
./app/jobs
   application_job.rb100%100%100%
   base_event_processing_job.rb100%100%100%
   decision_review_created_event_processing_job.rb100%100%100%
   decision_review_updated_event_processing_job.rb100%100%100%
   event_processing_rescue_job.rb100%100%100%
   heartbeat_job.rb100%100%100%
   person_updated_event_processing_job.rb100%100%100%
./app/mappers
   power_of_attorney_mapper.rb100%100%100%
./app/models
   application_record.rb100%100%100%
   event.rb100%100%100%
   event_audit.rb100%100%100%
./app/models/builders
   base_claimant_builder.rb100%100%100%
   base_decision_review_created_request_issue_collection_builder.rb100%100%100%
   base_decision_review_updated_request_issue_collection_builder.rb100%100%100%
   base_dto_builder.rb100%100%100%
   base_end_product_establishment_builder.rb100%100%100%
   base_request_issue_builder.rb100%100%100%
   base_request_issue_collection_builder.rb100%100%100%
   base_veteran_builder.rb100%100%100%
./app/models/builders/decision_review_created
   claim_review_builder.rb100%100%100%
   claimant_builder.rb100%100%100%
   dto_builder.rb100%100%100%
   end_product_establishment_builder.rb100%100%100%
   intake_builder.rb100%100%100%
   request_issue_builder.rb100%100%100%
   request_issue_collection_builder.rb100%100%100%
   veteran_builder.rb100%100%100%
./app/models/builders/decision_review_updated
   added_issue_collection_builder.rb100%100%100%
   claim_review_builder.rb100%100%100%
   dto_builder.rb100%100%100%
   eligible_to_ineligible_issue_collection_builder.rb100%100%100%
   end_product_establishment_builder.rb100%100%100%
   ineligible_to_eligible_issue_collection_builder.rb100%100%100%
   ineligible_to_ineligible_issue_collection_builder.rb100%100%100%
   removed_issue_collection_builder.rb100%100%100%
   request_issue_builder.rb100%100%100%
   updated_issue_collection_builder.rb100%100%100%
   withdrawn_issue_collection_builder.rb100%100%100%
./app/models/builders/person_updated
   dto_builder.rb100%100%100%
./app/models/concerns
   message_payload_validator.rb100%100%100%
./app/models/concerns/decision_review
   model_builder_helper.rb100%100%100%
./app/models/events
   decision_review_created_event.rb100%100%100%
   decision_review_updated_event.rb100%100%100%
   person_updated_event.rb100%100%100%
./app/models/virtual
   base_claimant.rb100%100%100%
   base_person.rb100%100%100%
   base_request_issue.rb100%100%100%
   base_veteran.rb100%100%100%
./app/models/virtual/decision_review_created
   claim_review.rb100%100%100%
   claimant.rb100%100%100%
   end_product_establishment.rb100%100%100%
   intake.rb100%100%100%
   request_issue.rb100%100%100%
   veteran.rb100%100%100%
./app/models/virtual/decision_review_updated
   claim_review.rb100%100%100%
   end_product_establishment.rb100%100%100%
   request_issue.rb100%100%100%
./app/models/virtual/person_updated
   person.rb100%100%100%
./app/models/virtual/transformers
   decision_review_created.rb100%100%100%
   decision_review_updated.rb100%100%100%
   person_updated.rb100%100%100%
./app/services
   avro_deserializer_service.rb100%100%100%
   avro_logger_service.rb100%100%100%
   avro_service.rb100%100%100%
   logger_service.rb100%100%100%
   metrics_service.rb100%100%100%
   slack_service.rb100%100%100%
./app/services/external_api
   caseflow_service.rb100%100%100%
./config
   application.rb100%100%100%
   boot.rb100%100%100%
   environment.rb100%100%100%
   routes.rb100%100%100%
./config/environments
   development.rb100%100%100%
./lib
   pii_sanitizer.rb100%100%100%
./lib/appeals_consumer
   error.rb100%100%100%
./lib/kafka_message_generators
   base.rb100%100%100%
   decision_review_events.rb100%100%100%

Copy link

@dcoleman21 dcoleman21 left a comment

Choose a reason for hiding this comment

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

This all looks good.

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.

3 participants