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

Support beaker facts in the test matrix #6

Closed
ekohl opened this issue Jan 11, 2022 · 5 comments · Fixed by #42
Closed

Support beaker facts in the test matrix #6

ekohl opened this issue Jan 11, 2022 · 5 comments · Fixed by #42

Comments

@ekohl
Copy link
Member

ekohl commented Jan 11, 2022

# TODO: beaker_fact_matrix input

It's possible to set a fact via environment variables. This is used in theforeman/puppet-pulpcore to run the entire test suite on multiple supported versions.

It would be great if this was also supported in gha-puppet.

I started with voxpupuli/puppet_metadata#35 which at least pushes the name generation into the gem. That gem already generates the matrix so this opens the path to generating a bigger matrix. Then it just needs a good way to specify the inputs and map it.

@ekohl
Copy link
Member Author

ekohl commented Oct 9, 2023

voxpupuli/puppet_metadata#35 is merged and released in puppet_metadata 3.3.0.

That leaves the question of how to specify it. I'm leaning to a way to specify it in puppet_metadata. Either on the command line or via some config file. The config file has the benefit that we don't need to do some funky stuff in GHA, where you would need to use JSON to pass data structures around. It has the downside of maintaining an additional file in the repository.

I haven't investigated if we can actually added data to metadata.json. My use cases are that puppet-pulpcore supports some versions of Pulpcore and the same for puppet-candlepin. Listing those supported versions in metadata.json feels correct, because we also list the Puppet version as well as supported OS versions.

@ekohl
Copy link
Member Author

ekohl commented Oct 10, 2023

voxpupuli/puppet_metadata#35 is merged and released in puppet_metadata 3.3.0.

And #41 uses this functionality.

@ekohl
Copy link
Member Author

ekohl commented Oct 10, 2023

And theforeman/forklift#1712 (comment) explains how puppet-pulpcore uses this today.

@evgeni
Copy link
Member

evgeni commented Oct 10, 2023

https://www.puppet.com/docs/puppet/7/modules_metadata.html#modules_metadata-metadata-version-requirement says:

The requirements key specifies external requirements for the module, particularly the Puppet version required. Although you can express any requirement here, the Forge module pages and search function support only the "puppet" value, which specifies the Puppet version.

Which makes me think that specifying

  "requirements": [
    {
      "name": "puppet",
      "version_requirement": ">= 7.0.0 < 8.0.0"
    },
    {
      "name": "pulpcore",
      "version_requirement": "3.21 || 3.22 || 3.28"
    }
  ]

should totally work.

(the same wording is also used on the Puppet 6 and Puppet 8 pages)

@ekohl ekohl linked a pull request Oct 10, 2023 that will close this issue
@ekohl
Copy link
Member Author

ekohl commented Nov 22, 2023

Not sure why it isn't closed, but #42 was merged.

@ekohl ekohl closed this as completed Nov 22, 2023
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 a pull request may close this issue.

2 participants