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

provide a schema for each facter release #2730

Closed
bastelfreak opened this issue Jun 9, 2024 · 4 comments
Closed

provide a schema for each facter release #2730

bastelfreak opened this issue Jun 9, 2024 · 4 comments
Labels
enhancement New feature or enhancement triaged Jira issue has been created for this

Comments

@bastelfreak
Copy link
Contributor

Use Case

We've some tests in facterDB to validate factsets. Some factsets are created by hand to generated. To ensure they are complete/correct, it would be nice to have a schema we can use to validate the factsets.

Describe the Solution You Would Like

Provide a schema for each facter version factset.

Describe Alternatives You've Considered

A clear and concise description of any alternative solutions or features you've considered.

Additional Context

Add any other context or screenshots about the feature request here.

@joshcooper
Copy link
Contributor

joshcooper commented Jun 11, 2024

Facter currently does have a schema https://github.com/puppetlabs/facter/blob/main/lib/schema/facter.yaml though it is likely in need of updating. Facter 3 also had a test to verify the output matched the schema, but we seem to have lost that in Facter 4. So for this issue, I think we should:

  • Update the facter.yaml schema to include any facts added since the schema was last updated in 71be25d
  • Add CONTRIBUTING.md to mention that new facts need to be added to the schema. Currently we're inheriting the org-wide version.
  • Add an acceptance test the facter output conforms to the schema on each platform

Some facts that come to mind are os.macosx.extra, processors.extensions, openbsd related facts, dmi.product.version

@joshcooper joshcooper added the triaged Jira issue has been created for this label Jun 11, 2024
Copy link

Migrated issue to FACT-3474

@AriaXLi
Copy link
Contributor

AriaXLi commented Aug 14, 2024

This is addressed in #2746

@joshcooper
Copy link
Contributor

Fixed in #2746

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or enhancement triaged Jira issue has been created for this
Projects
None yet
Development

No branches or pull requests

3 participants