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

APPEALS-35011 Disable ForeignKeyPolymorphicAssociationJob [pre Rails 6.0] #20114

Closed
wants to merge 1 commit into from

Conversation

AnandEdara
Copy link
Contributor

@AnandEdara AnandEdara commented Dec 5, 2023

⚠️ Deployment Warning: https://github.com/department-of-veterans-affairs/appeals-lambdas/pull/497 should be deployed before this PR

Resolves APPEALS-35011

Description

Background

On Rails 6.0, the job ForeignKeyPolymorphicAssociationJob has a bug:

orphan_records query

Since this will be a blocker for the Rails 6.0 upgrade, and because this job is not essential for day-to-day business (it is more of a remediation tool), we can temporarily disable the job until we have a fix in place.

Proposed Solution

  • Disable the scheduled triggering of the ForeignKeyPolymorphicAssociationJob job. ( Related code in appeals-lambdas )
  • Skip the tests in spec/jobs/foreign_key_polymorphic_association_job_spec.rb

Acceptance Criteria

  • The ForeignKeyPolymorphicAssociationJob has been successfully disabled (is no longer triggered as a scheduled job)
  • The RSpec test spec/jobs/foreign_key_polymorphic_association_job_spec.rb is skipped

Testing Plan

  1. Go to APPEALS-36190
  • For feature branches merging into master: Was this deployed to 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?

⚠️ Deployment Warning: https://github.com/department-of-veterans-affairs/appeals-lambdas/pull/497 should be deployed before this PR

Copy link

codeclimate bot commented Dec 5, 2023

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

View more on Code Climate.

@ThorntonMatthew
Copy link
Contributor

Closing due to inactivity as part of our post-PI cleanup effort. Feel free to reopen if this PR is still desired.

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.

2 participants