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

Limit to known-good setups from acceptance tests #732

Merged
merged 2 commits into from
Aug 13, 2021

Conversation

smortex
Copy link
Member

@smortex smortex commented Jul 29, 2021

For acceptance testing, we look into metadata.json for supported versions of Puppet and operating systems, and for each combination try to execute the acceptance test suites.

However, some combination depend on nonexistent packages, typically for a recent version of Puppet on an old Linux distribution, or with an old version of Puppet on a recent Linux distribution.

Instead of letting GitHub compute all possible matrix combinations, rely
on puppet_metadata to build the list of supported combinations.


For checking, I opened voxpupuli/puppet-splunk#314: compare with voxpupuli/puppet-splunk#312 which had a bogus Puppet 5 on Ubuntu 20.04 test failing because no such package is available (on a side note, everything was broken and I had to add a commit to fix CI, but this is not related to this change).


For checking, I opened voxpupuli/puppet-splunk#315: compare with voxpupuli/puppet-splunk#312 which had a bogus Puppet 5 on Ubuntu 20.04 test failing because no such package is available.

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last time I tried this, it actually didn't work. Have you tried this? Also, perhaps we can exclude them here:
https://github.com/voxpupuli/puppet_metadata/blob/491aa993479260ef37b9a926ab4b3aa07c1e3fba/lib/puppet_metadata/github_actions.rb#L21-L30

Perhaps with a flag aio_only.

On the other hand: All of these combinations contain at least one that's EOL: either the OS (Ubuntu 14.04, Debian 8) or Puppet (5).

@smortex
Copy link
Member Author

smortex commented Jul 29, 2021

@ekohl yes, I had a hard time figuring out what to put for it to work :-) @bastelfreak also noted on IRC that at least one component was obsolete and that removing such platforms from the supported versions in metadata.json was probably better. Yet, we have some modules which are not actively maintained and can refer to old platforms, and when a contributor wants to fix a bug or send a new feature, they are facing failing test cases. I a few times I created a PR to update metadata.json and asked the maintainer to rebase on top of it, so I though that such a change would avoid this and improve contributors experience.

We also might want to support some legacy systems for some reason, it was discussed for some module not long ago but I can't recall which module 😞 (IFAICR it was about allowing smoother upgrades of legacy infrastructure to recent Puppet & OS)

On the other hand, a brutal failure on a failing combination and some code to update all metadata.json files is also adequate if situation as above are only transient and we want to make our life easier.

@bastelfreak
Copy link
Member

I want to point out that having this code merged would make it easier to update modules that still have it in their metadata.json because it keeps the CI pipeline green.

@ekohl
Copy link
Member

ekohl commented Jul 29, 2021

Still, this requires an update to all modules. I haven't seen a reason why we can't update the generator rather than excluding after the fact. That would instantly update modules without a code change in every module.

@bastelfreak
Copy link
Member

Agreed, an update to the generator would be better, but I've no clue how to do that :(

Copy link
Member

@ghoneycutt ghoneycutt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 as this makes it easier for people to contribute. A regular problem we have is that someone contributes and the testing fails with something unrelated to the contribution and merging is held up. This will expedite the process and give contributors a better experience.

@smortex

This comment has been minimized.

@smortex smortex changed the title Always exclude known-bad setups from acceptance tests Limit to known-good setups from acceptance tests Aug 5, 2021
@smortex smortex force-pushed the exclude-bogus-acceptance-test-config branch from 1a47472 to e3c6c4c Compare August 5, 2021 00:47
@smortex
Copy link
Member Author

smortex commented Aug 5, 2021

After further work, I am glad to announce that I could make puppet_metadata build the combinations of valid OS / puppet version; test it successfully in conditions it was failing; and I updated this PR accordingly.

Converting this PR to draft because it depends on this to be released first:

@smortex smortex marked this pull request as draft August 5, 2021 00:52
@smortex smortex force-pushed the exclude-bogus-acceptance-test-config branch from e3c6c4c to c9d0a96 Compare August 12, 2021 06:44
For acceptance testing, we look into metadata.json for supported versions
of Puppet and operating systems, and for each combination try to execute
the acceptance test suites.

However, some combination depend on nonexistent packages, typically for a
recent version of Puppet on an old Linux distribution, or with an old
version of Puppet on a recent Linux distribution.

Instead of letting GitHub compute all possible matrix combinations, rely
on puppet_metadata to build the list of supported combinations.
@smortex smortex force-pushed the exclude-bogus-acceptance-test-config branch from c9d0a96 to 66fa47b Compare August 12, 2021 08:38
@smortex
Copy link
Member Author

smortex commented Aug 12, 2021

Rebased on top of #742.

voxpupuli/puppet-splunk#314 was updated accordingly (pathological cases are no more present in master, but they are covered by the unit tests in puppet_metadata).

Ready for review 🎉

@smortex smortex marked this pull request as ready for review August 12, 2021 08:53
@smortex smortex requested a review from ekohl August 12, 2021 20:14
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all the effort!

@bastelfreak bastelfreak merged commit 2f5249d into master Aug 13, 2021
@bastelfreak bastelfreak deleted the exclude-bogus-acceptance-test-config branch August 13, 2021 17:57
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 this pull request may close these issues.

4 participants