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

Remove use of entity_profile_rules table #3905

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

dmjb
Copy link
Contributor

@dmjb dmjb commented 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.

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:

  • Bug fix (resolves an issue without affecting existing features)
  • Feature (adds new functionality without breaking changes)
  • Breaking change (may impact existing functionalities or require documentation updates)
  • Documentation (updates or additions to documentation)
  • Refactoring or test improvements (no bug fixes or new functionality)

Testing

Outline how the changes were tested, including steps to reproduce and any relevant configurations.
Attach screenshots if helpful.

Review Checklist:

  • Reviewed my own code for quality and clarity.
  • Added comments to complex or tricky code sections.
  • Updated any affected documentation.
  • Included tests that validate the fix or feature.
  • Checked that related changes are merged.

@dmjb dmjb requested a review from a team as a code owner July 16, 2024 14:26
@@ -268,7 +268,7 @@ func (p *profileService) UpdateProfile(
minderv1.Entity_ENTITY_TASK_RUN: profile.GetTaskRun(),
minderv1.Entity_ENTITY_BUILD: profile.GetBuild(),
} {
if err = updateProfileRulesForEntity(ctx, ent, &updatedProfile, qtx, entRules, rules); err != nil {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this code already keeps rule_instances updated, so we still have all this information in that table. We are simply getting rid of the duplicated storage of that information in entity_profile_rules

@coveralls
Copy link

coveralls commented Jul 16, 2024

Coverage Status

coverage: 54.233% (-0.07%) from 54.301%
when pulling 79083d3 on remove-entity-profile-rules-step-i
into adcd634 on main.

@dmjb dmjb force-pushed the remove-entity-profile-rules-step-i branch from ae38c11 to 3013244 Compare July 17, 2024 13:14
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 dmjb force-pushed the remove-entity-profile-rules-step-i branch from 520cb4f to 79083d3 Compare July 23, 2024 11:39
@dmjb dmjb changed the title [DO NOT MERGE] Remove use of entity_profile_rules table Remove use of entity_profile_rules table Jul 23, 2024
@dmjb dmjb merged commit 9498645 into main Jul 23, 2024
23 checks passed
@dmjb dmjb deleted the remove-entity-profile-rules-step-i branch July 23, 2024 11:48
@dmjb dmjb mentioned this pull request Jul 23, 2024
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants