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

perf: continue if active UID is not a real user #118

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

GabrielNagy
Copy link
Contributor

In chroot environments where /proc is mounted it's common to have processes owned by UIDs that do not exist within the chroot.

I think getting the active users list should be a best effort approach where we don't fail hard if we cannot do this mapping for an user, mainly because it's highly likely for that user to not be in the DB we want to clean up anyway.

I haven't added a test for this because we don't currently mock /proc, and based on Denis' feedback this will be refactored in the near future.

@GabrielNagy GabrielNagy marked this pull request as ready for review November 29, 2023 11:39
@GabrielNagy GabrielNagy requested a review from a team as a code owner November 29, 2023 11:39
In chroot environments where /proc is mounted it's common to have
processes owned by UIDs that do not exist within the chroot.

I think getting the active users list should be a best effort approach
where we don't fail hard if we cannot do this mapping for an user,
mainly because it's highly likely for that user to not be in the DB we
want to clean up anyway.
@GabrielNagy GabrielNagy force-pushed the continue-on-invalid-user branch from 9896348 to 74daa42 Compare November 29, 2023 13:26
Copy link
Member

@denisonbarbosa denisonbarbosa left a comment

Choose a reason for hiding this comment

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

Nice!

@GabrielNagy GabrielNagy merged commit ffa3e16 into main Nov 29, 2023
5 checks passed
@GabrielNagy GabrielNagy deleted the continue-on-invalid-user branch November 29, 2023 15:13
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.

2 participants