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

Allow skipping tenants when running patches #36

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

jhuizy
Copy link
Member

@jhuizy jhuizy commented Dec 14, 2022

What does this PR do?

This is a draft PR, I'm hoping for some feedback over whether this will be useful, or potentially unsafe.

This PR adds the ability to restrict the tenants that patches are run against when using the gem in an multi tenant environment via the Apartment gem.

Usually the patches are run against all tenants, however if there is some dodgy data in only one tenant it might be useful to be able to temporarily run patches against a subset of tenants. While it's possible to do a runtime check in each individual patch, this way allows us to run against a subset of tenants without making any code modifications and will affect all pending patches.

The main cause for concern is that it means patches can become out of sync between different tenants, and that can be hard to fix. However, it's good to at least give the user a choice.

@sonarcloud
Copy link

sonarcloud bot commented Aug 10, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@jhuizy jhuizy changed the title RFC - allow skipping tenants when running patches Allow skipping tenants when running patches Sep 30, 2024
@jhuizy jhuizy marked this pull request as ready for review September 30, 2024 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant