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

profile status is not updated on entity deletion #1610

Closed
jhrozek opened this issue Nov 9, 2023 · 0 comments · Fixed by #1618
Closed

profile status is not updated on entity deletion #1610

jhrozek opened this issue Nov 9, 2023 · 0 comments · Fixed by #1618
Assignees
Labels
bug Something isn't working priority: high High priority

Comments

@jhrozek
Copy link
Contributor

jhrozek commented Nov 9, 2023

I found this with PRs but this actually happens with any entity.

To reproduce:

  • have two entities registered, one is passing all the checks, one is failing
  • the profile is marked as failing
  • delete the entity that is failing
  • the profile is still marked as failing, should be passing now
@jhrozek jhrozek self-assigned this Nov 9, 2023
@jhrozek jhrozek added bug Something isn't working priority: high High priority labels Nov 9, 2023
jhrozek added a commit to jhrozek/minder that referenced this issue Nov 10, 2023
In case an entity was deleted (typically a PR but a repo delete is also
a valid use-case), we would not update the profile status until the next
profile run.

For that, we need to add a new database trigger in a migration.

Sort-of-related is a bug in the original procedure that we had where if
all the current rules were skipped and we added a failure the overall
status would still be a failure. I added a new version of the old
procedure to cover that plus some tests.

Fixes: mindersec#1610
jhrozek added a commit to jhrozek/minder that referenced this issue Nov 13, 2023
In case an entity was deleted (typically a PR but a repo delete is also
a valid use-case), we would not update the profile status until the next
profile run.

For that, we need to add a new database trigger in a migration.

Sort-of-related is a bug in the original procedure that we had where if
all the current rules were skipped and we added a failure the overall
status would still be a failure. I added a new version of the old
procedure to cover that plus some tests.

Fixes: mindersec#1610
jhrozek added a commit to jhrozek/minder that referenced this issue Nov 13, 2023
In case an entity was deleted (typically a PR but a repo delete is also
a valid use-case), we would not update the profile status until the next
profile run.

For that, we need to add a new database trigger in a migration.

Sort-of-related is a bug in the original procedure that we had where if
all the current rules were skipped and we added a failure the overall
status would still be a failure. I added a new version of the old
procedure to cover that plus some tests.

Fixes: mindersec#1610
jhrozek added a commit that referenced this issue Nov 13, 2023
In case an entity was deleted (typically a PR but a repo delete is also
a valid use-case), we would not update the profile status until the next
profile run.

For that, we need to add a new database trigger in a migration.

Sort-of-related is a bug in the original procedure that we had where if
all the current rules were skipped and we added a failure the overall
status would still be a failure. I added a new version of the old
procedure to cover that plus some tests.

Fixes: #1610
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority: high High priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant