-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add support for OpenVox beaker jobs #165
base: master
Are you sure you want to change the base?
Conversation
I know that this isn't ready yet. The focus is on creating beaker jobs for puppet and openvox packages. unit tests will continue with the |
f0bf384
to
151acff
Compare
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.
I'm not sure this is what I'd do. In the the what I'd like is a single variable (both for unit and acceptance, so really 2 vars) that generates the entire matrix. That can be both puppet and openvox. We exposed 1 variable that gha uses now. Compatible solution is to just expand that result, even if the name includes puppet. Incompatible is to have genetic names like puppet_metadata_unit_matrix
or similar. Prefix it with the gem name and a suffix for the purpose.
Looking further ahead we probably also want to do similar things with unit tests to test with agent gems
Yes. But since we don't have the gem published at the moment, it didn't have a high priority for me.
That's my idea. I want to expand it, if |
Right, so let's start 2 variable that are generic: On the implementation details, for acceptance I'd say it osrequirementversions. So centos 9 * {puppet,openvox} * 8 for example. It may be more complex, but that's up to this gem to decide. Similar for unit tests |
@@ -49,15 +62,19 @@ def puppet_unit_test_matrix | |||
end.compact | |||
end | |||
|
|||
def beaker_os_releases(at = nil) | |||
majors = puppet_major_versions | |||
def beaker_os_releases(at = nil, collection) |
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.
The name collection
isn't something I entirely agree with. Previously we have Puppet PC1 as a collection, later puppet5
, puppet6
, etc. So IMHO collection
isn't quite accurate.
Question is, what is accurate. In metadata.json
it's listed under requirements
so I'd play with something like for_requirement
because I don't know a good word for the thing that satisfies the requirement.
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.
Thinking more about it now: requirement_name
could work as well
# Current latest major is 7. It is highly recommended that modules | ||
# actually specify exact bounds, but this prevents an infinite loop. | ||
end_major = (requirement.end == SemanticPuppet::Version::MAX) ? 7 : requirement.end.major |
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.
This looks out of date, which is a problem with hardcoding magic numbers ...
@@ -17,7 +17,7 @@ def initialize(metadata, options) | |||
def outputs(at = nil) | |||
{ | |||
puppet_unit_test_matrix: puppet_unit_test_matrix, | |||
puppet_beaker_test_matrix: puppet_beaker_test_matrix(at), | |||
puppet_beaker_test_matrix: puppet_beaker_test_matrix(at) + openvox_beaker_test_matrix(at), |
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.
I like keeping a single method. puppet_beaker_test_matrix
is also the output key, so let's change the methods so they return the correct result.
puppet_beaker_test_matrix: puppet_beaker_test_matrix(at) + openvox_beaker_test_matrix(at), | |
puppet_beaker_test_matrix: puppet_beaker_test_matrix(at), |
You can argue it would be better to use ${gem}_${target}_$test_matrix
to decouple from Puppet specifically. Then it'd be puppet_metadata_unit_test_matrix
instead.
beaker_test_matrix(at, 'puppet') | ||
end | ||
|
||
def openvox_beaker_test_matrix(at) | ||
beaker_test_matrix(at, 'openvox') |
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.
And following up on the above discussion:
beaker_test_matrix(at, 'puppet') | |
end | |
def openvox_beaker_test_matrix(at) | |
beaker_test_matrix(at, 'openvox') | |
beaker_test_matrix(at, 'puppet') + beaker_test_matrix(at, 'openvox') |
You can even keep them alphabetically:
beaker_test_matrix(at, 'puppet') | |
end | |
def openvox_beaker_test_matrix(at) | |
beaker_test_matrix(at, 'openvox') | |
beaker_test_matrix(at, 'openvox') + beaker_test_matrix(at, 'puppet') |
No description provided.