-
Notifications
You must be signed in to change notification settings - Fork 496
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
Ensure platform-specific code is correctly namespaced #2743
base: main
Are you sure you want to change the base?
Conversation
Can one of the admins verify this patch? |
Thanks @smortex! Moving the When adding resolvers in the future, what's the best way to determine if something is linux-specific or not? Wondering if maybe there's a good reference/porting guide we could refer to? Also could you resolve conflicts? |
Move all files that defines Facter::Resolvers::Linux::* into the lib/facter/resolvers/linux directory. Also only load them on Linux systems as they are Linux-specific.
All other filesystems resolvers are named "filesystems" (plural), so match the same name because all these resolvers have the same purpose.
FreeBSD has containers (jails) but already handled through the 'virutal' resolver, so for now we just consider Linux being able to handle containers as the code aleady depend on Linux-specific resolvers.
Hey @joshcooper, I am catching up after long holiday away from home
Indeed,
Ughhhhh 😦 No real idea. Some acceptance tests that would run on various operating systems and ensure that no warning / error is produced may help… but that's non-trivial. Maybe creating a team with people interested in "exotic" operating systems and pinging that team when new provider are added may be simpler 🤷 ?
Done! |
Facter facts and providers are sometimes tied to a specific platform (e.g. Linux, FreeBSD, etc). When it is the case, they are placed in a directory named after this platform.
Some files are incorrectly stored in the base directory making it less obvious that they are platform-specific.
This PR fix this issue and is part 1/2 of a fix for #2742