vets-api icon indicating copy to clipboard operation
vets-api copied to clipboard

Add new CustomCop/EnforceSidekiqPolicy cop

Open raudabaugh opened this issue 10 months ago • 3 comments

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

Screenshot 2024-04-18 at 11 59 12 AM

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?

raudabaugh avatar Apr 18 '24 16:04 raudabaugh

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

va-vsp-bot avatar Apr 18 '24 16:04 va-vsp-bot

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

va-vsp-bot avatar Apr 18 '24 16:04 va-vsp-bot

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.

github-actions[bot] avatar May 24 '24 21:05 github-actions[bot]

This PR has been closed because it has had no activity for 37 days

github-actions[bot] avatar May 31 '24 22:05 github-actions[bot]