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

authz: fix broken ReposIDsWithOldestPerms when repo is hard-deleted #11770

Merged
merged 1 commit into from Jun 29, 2020

Conversation

unknwon
Copy link
Member

@unknwon unknwon commented Jun 29, 2020

Instead of checking if repository is not in the list of soft-deleted, we now check the repository is not deleted.

This prevents scheduler trying to sync permissions for hard-deleted repositories. Such scenario is not usual (DB is manually modified) but noticed this is causing problems on my dev instance.

Fixes #11769

@unknwon unknwon marked this pull request as ready for review June 29, 2020 02:28
@unknwon unknwon requested a review from a team June 29, 2020 02:28
@codecov
Copy link

codecov bot commented Jun 29, 2020

Codecov Report

Merging #11770 into master will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master   #11770      +/-   ##
==========================================
- Coverage   47.68%   47.67%   -0.01%     
==========================================
  Files        1402     1402              
  Lines       79752    79752              
  Branches     6622     6721      +99     
==========================================
- Hits        38027    38023       -4     
- Misses      38151    38153       +2     
- Partials     3574     3576       +2     
Flag Coverage Δ
#go 51.83% <100.00%> (-0.01%) ⬇️
#storybook 10.11% <ø> (ø)
#typescript 36.61% <ø> (ø)
#unit 47.27% <100.00%> (-0.01%) ⬇️
Impacted Files Coverage Δ
enterprise/cmd/frontend/db/perms_store.go 78.59% <100.00%> (ø)
.../internal/codeintel/resolvers/graphql/locations.go 83.63% <0.00%> (-3.64%) ⬇️

@unknwon unknwon merged commit a23a4d5 into master Jun 29, 2020
@unknwon unknwon deleted the jc/fix-ReposIDsWithOldestPerms branch June 29, 2020 08:08
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.

authz: ReposIDsWithOldestPerms breaks when repos are hard-deleted from repo table
3 participants