vets-api
vets-api copied to clipboard
Add new CustomCop/EnforceSidekiqPolicy cop
Summary
Adds a RuboCop check for Sidekiq jobs to improve capturing/handling errors explicitly.
Related issue(s)
- https://github.com/department-of-veterans-affairs/va.gov-team-sensitive/pull/1622
Testing done
- Prior to this automated check, Sidekiq jobs were inspected manually for adherence to our standards.
- Tested in CI.
- Ran RuboCop locally (see screenshot).
Screenshots
What areas of the site does it impact?
Impacts code reviews only.
Acceptance criteria
- [ ] I fixed|updated|added unit tests and integration tests for each feature (if applicable).
- [x] No error nor warning in the console.
- [x] Events are being sent to the appropriate logging solution
- [ ] Documentation has been updated (link to documentation)
- [x] 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
- [x] I added a screenshot of the developed feature
Requested Feedback
It's worth discussing how we integrate this into the PR process.
- Should PRs be rejected based on this rule?
- Should it apply only to new Sidekiq jobs to start?
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: lib/custom_cops/enforce_sidekiq_policy.rb
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: lib/custom_cops/enforce_sidekiq_policy.rb
This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This PR has been closed because it has had no activity for 37 days