-
Notifications
You must be signed in to change notification settings - Fork 43
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
Use simpler query to determine if rule type is in use #3903
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When deleting a rule type, use the rule_instances table to determine if the rule type is in use. This saves some joins, and decreases the use of the old entity_profile table which I want to get rid of.
dmjb
force-pushed
the
rule-instance-count
branch
from
July 16, 2024 11:58
3252a92
to
271d52f
Compare
Changes unknown |
dmjb
force-pushed
the
rule-instance-count
branch
from
July 16, 2024 13:13
3919017
to
cd1ae39
Compare
jhrozek
approved these changes
Jul 16, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's watch the smoke tests, but the query LGTM
dmjb
added a commit
that referenced
this pull request
Jul 16, 2024
PR #3903 replaced the one part of minder which queried the data in the `entity_profile_rules` table. This PR removes the code which adds and removes entries to this table. A future PR will drop the table outright.
10 tasks
dmjb
added a commit
that referenced
this pull request
Jul 17, 2024
PR #3903 replaced the one part of minder which queried the data in the `entity_profile_rules` table. This PR removes the code which adds and removes entries to this table. A future PR will drop the table outright.
dmjb
added a commit
that referenced
this pull request
Jul 23, 2024
PR #3903 replaced the one part of minder which queried the data in the `entity_profile_rules` table. This PR removes the code which adds and removes entries to this table. A future PR will drop the table outright.
dmjb
added a commit
that referenced
this pull request
Jul 23, 2024
PR #3903 replaced the one part of minder which queried the data in the `entity_profile_rules` table. This PR removes the code which adds and removes entries to this table. A future PR will drop the table outright.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, the only usage of the data stored in the
entity_profile_rules
table is to determine whether or not a rule type is in use when deleting a rule type. This can be queried more efficiently by using therule_instances
table, so change the query to use that table instead.Follow on PRs will remove the
entity_profile_rules
table from minder.Summary
Provide a brief overview of the changes and the issue being addressed.
Explain the rationale and any background necessary for understanding the changes.
List dependencies required by this change, if any.
Fixes #(related issue)
Change Type
Mark the type of change your PR introduces:
Testing
Outline how the changes were tested, including steps to reproduce and any relevant configurations.
Attach screenshots if helpful.
Review Checklist: