Skip to content

RuboCop: Ban more methods which might cause subtransactions

Peter Leitzen requested to merge pl-rubocop-subtransaction-methods into master

What does this MR do?

This MR adds 3 more methods to be banned by RuboCop which potentially create subtransactions:

  • safe_find_or_create
  • safe_find_or_create!
  • with_fast_read_statement_timeout

The remaining offenses will be fixed via #339787.

It also adds exclusions to .rubocop_manual_todo.yml instead of disabling cops inline the code. See individual commits for more information.

See #338730 (closed) and &6540 (closed) for more context.

Screenshots or Screencasts (strongly suggested)

n/a

How to setup and validate locally (strongly suggested)

n/a

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Peter Leitzen

Merge request reports