-
Notifications
You must be signed in to change notification settings - Fork 4
cleanup: improve error message when inode map is full #729
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
🧩 Analysis chain
🏁 Script executed:
Repository: stackrox/fact
Length of output: 4987
Add/adjust unit tests to cover the
FACT_INODE_MAX→FACT_INODES_MAXenv-var rename.fact/src/config/tests.rscurrently covers parsing/validation of thebpf.inodes_maxfield from config strings (e.g.,inodes_max: 64/16384and related type/validation cases), but there’s no evidence of tests asserting the environment variable binding forFACT_INODES_MAX(or the old name). Add unit tests that set the env var and verify it populates theinodes_maxconfig value.🤖 Prompt for AI Agents
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.
@coderabbitai there are currently no unit tests for environment variables, they pose a few issues with how Rust execute tests (all tests run under the same process on parallel threads, so setting environment variables could mess with the tests in unforeseen ways). I can try to figure out a way to test this properly, but I suggest we leave that for a follow up PR.
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.
@Molter73, that's a fair point —std::env::set_varis process-global and inherently racy when tests run in parallel, making it tricky to test env-var bindings reliably without extra infrastructure (e.g., serializing those tests with a mutex or running them with--test-threads=1). Deferring to a follow-up PR makes sense.Would you like me to open a GitHub issue to track adding env-var coverage for
FACT_INODES_MAX(and potentially other env-var bindings) in a future PR?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.
@coderabbitai, please do open the issue.
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.
🧩 Analysis chain
🏁 Script executed:
Length of output: 1633
@Molter73, done! I've opened#730to track adding env-var unit test coverage (includingFACT_INODES_MAX) in a follow-up PR, assigned to you.