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

B_reed/APPEALS-28105 #19264

Closed
wants to merge 67 commits into from
Closed

B_reed/APPEALS-28105 #19264

wants to merge 67 commits into from

Conversation

breedbah
Copy link
Contributor

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?

Frontend

User Facing Changes

  • Screenshots of UI changes added to PR & Original Issue
BEFORE AFTER

Storybook Story

For Frontend (Presentation) Components

  • Add a Storybook file alongside the component file (e.g. create MyComponent.stories.js alongside MyComponent.jsx)
  • Give it a title that reflects the component's location within the overall Caseflow hierarchy
  • Write a separate story (within the same file) for each discrete variation of the component

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
  • Have your migration classes inherit from Caseflow::Migration, especially when adding indexes (use add_safe_index) (see Writing DB migrations)
  • 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)
  • Run make check-fks; add any missing foreign keys or add to config/initializers/immigrant.rb (see Record associations and Foreign Keys)
  • Add belongs_to for associations to enable the schema diagrams to be automatically updated
  • Document any non-obvious semantics or logic useful for interpreting database data at Caseflow Data Model and Dictionary

Integrations: Adding endpoints for external APIs

  • Check that Caseflow'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 Caseflow 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
  • Jest
  • 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?

konhilas-ariana and others added 30 commits August 2, 2023 11:30
…name, updated method to be more generic, changed pexip.rb to ruby style
breedbah and others added 27 commits August 17, 2023 08:01
…19239-revert-19112-lthompson/APPEALS-26633

* laurenoelle/APPEALS-19871 initial files

* Fixing error with .pick

* Fixing .pick

* Adding a rails initializer for monitoring deprecation warnings

* Modifying jest tests

* Updated language following feedback from UX team

* APPEALS-17497 MST & PACT Special issues identification changes

* Adding Subscriber to monitor deprecation warnings

* Add spec file for deprecation warnings

* APPEALS-27327: MST and PACT BGS Fix  (#19116)

* added grouping for feature toggles

* moved special issue deserialization for ratings into contestable issue model and added datadog incrementing for reporting

* added wildcard to datadog counters and removed redundant logging in bgs_service

* updated data dog service logging

* Delete deprecation_alerts.rb

* APPEALS-26633 Added method to update meeting_type in Users Controller, and updated Organizations User model with new method to change meeting_type

* APPEALS-26633 Progress on linking backend and frontend radio option changes and added modifyConferenceTypes

* Apply suggestions from code review

Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>

* Update deprecation_warning_subscriber_spec.rb

* Fix typo

* APPEALS-26633 Framing for logic to link onChange function

* 🐛 Pre-emptive bugfix - TypeError Exception: allocator undefined for Thread::Backtrace::Location

* 🔊 Log additional metadata to Sentry on deprecation warnings

* Updated for AC as of August 8

* commented out bgs call and adding logging for production

* Fixed spacing

* added data dog logging for fetch rating profile and ratings in range

* Adding modifyConferenceType to patch to backend

* updated contentions response to handle blank? responses in addition to nil?

* 🚨 Lint: Remove trailing whites space

c

* 🥅 Add blanket rescue to DeprecationWarningSubscriber

(Puts on tin foil hat) Prevent potential exceptions from SlackService from impacting user experience

* ✏️ Fix typo in test description

* 🧪 Fix test so that it will pass in non-'test' environments as well

* put in explicit nil return statement for contention BGS call testing.

* Update deprecation_warning_subscriber.rb

* Revert "Update deprecation_warning_subscriber.rb"

This reverts commit 50bf09f.

* use env variable for efolder express url

* add efolder url env variable to demo environmentt

* Add meeting_type to user to capture new meeting type from frontend, debugging in byebug

* Hotfix/appeals 27980 NightlySyncsJob (#19173)

* add error handling to sync_vacols_cases

* add test for sync_bgs_attorneys method

* add slack notification on job error, add tests

* codeclimate

* codeclimate

* Fixed bug so frontend hearings change is persisted to backend and updates user meeting type

* Revert "APPEALS-17497 MST & PACT Special issues identification"

* Fixed linting issues and added rspec test to check the new meeting type

* Add information about patch response test

* Fix code climates issues

* Jest testing fixed to check for changing values by radio button selection

* Pamatya/APPEALS-24131: Fix flaky/skipped tests in models/idt/token_spec.rb (#19208)

* removing the xit and adding new test

* Added a test for an expired key for the Idt::Token active method

* APPEALS-24131: removed unused let statement

* Removed the sleep statement from the test.

* Included a docket_spec test fix as well.

---------

Co-authored-by: = <tyler.broyles@va.gov>

* Remove skipped and unneeded feature test (#19214)

This will be explained more in the accompanying PR but this test has
been skipped for a couple years and does not need to be in the code
base anymore as it does not add any value.

* APPEALS-24145 Fix test scenario "Assigning it to complete the claims establishment" (#19209)

* deleted a flakey hang and added an expect for the url

* Added a few more expects

* small formating changes

* removed no longer needed comment

* removed unneccesarcy expect

* Revert "laurenoelle/APPEALS-19871 initial files"

* Hearing Admin selection changed to Hearings Management

* Revert "lthompson/APPEALS-26633"

* Revert "Revert "lthompson/APPEALS-26633""

---------

Co-authored-by: Lauren Berry <berry_lauren@bah.com>
Co-authored-by: AnandEdara <131183324+AnandEdara@users.noreply.github.com>
Co-authored-by: kristeja <krishnateja.golla@va.gov>
Co-authored-by: HunJerBAH <99915461+HunJerBAH@users.noreply.github.com>
Co-authored-by: HunJerBAH <Jeremy.Hunton@va.gov>
Co-authored-by: 631862 <lauren.thompson@va.gov>
Co-authored-by: kristeja <112115264+kristeja@users.noreply.github.com>
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
Co-authored-by: Jeremy Croteau <jeremiah.croteau@va.gov>
Co-authored-by: Lauren Berry <95879805+laurenberrybah@users.noreply.github.com>
Co-authored-by: Matt Roth <roth_matthew@bah.com>
Co-authored-by: mikefinneran <110622959+mikefinneran@users.noreply.github.com>
Co-authored-by: Craig Reese <109101548+craigrva@users.noreply.github.com>
Co-authored-by: sbashamoni <138054633+sbashamoni@users.noreply.github.com>
Co-authored-by: Prajwal Amatya <122557351+pamatyatake2@users.noreply.github.com>
Co-authored-by: = <tyler.broyles@va.gov>
Co-authored-by: Brandon Lee Dorner <brandonleedorner@gmail.com>
Co-authored-by: Sean Craig <110493538+seancva@users.noreply.github.com>
@codeclimate
Copy link

codeclimate bot commented Aug 25, 2023

Code Climate has analyzed commit 6828546 and detected 0 issues on this pull request.

View more on Code Climate.

@breedbah breedbah closed this Aug 25, 2023
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