-
Notifications
You must be signed in to change notification settings - Fork 145
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
(breaking) - Remove build rake tasks #472
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #472 +/- ##
==========================================
+ Coverage 41.74% 43.95% +2.21%
==========================================
Files 10 10
Lines 678 662 -16
==========================================
+ Hits 283 291 +8
+ Misses 395 371 -24 ☔ View full report in Codecov by Sentry. |
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.
looks good to me. Do you want to keep this open until we've more breaking changes?
@bastelfreak yes please, just until we get more eyes! |
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'd just drop them altogether since there's already the same code in puppet-blacksmith
to provide module:build
:
https://github.com/voxpupuli/puppet-blacksmith/blob/3f187bafe5c5785ff6bafe9f9ca06410109e0b03/lib/puppet_blacksmith/rake_tasks.rb#L57-L63
This was done in voxpupuli/puppet-blacksmith@f955a02 about 4 years ago.
1c64d80
to
467a2b9
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 still lean to complete removal. I think most people rely on puppet-blacksmith and that already has the integration
I agree with @ekohl here. puppetlabs_spec_helper could also just include puppet-blacksmith, so users don't have to do it? |
@ekohl @bastelfreak yeah I realised that after I updated, the joys of working before you've had your morning coffee. I suppose no time like the present to implement a big change like this, I'm going to raise it with the team. |
I'm not sure I agree with this. If you look at the name it's the spec helper: designed for (unit) tests. Not the release helper. With Vox Pupuli we put the release gems in their own group so you can install a more minimal set of gems. If |
@ekohl after some discussion with the team, we agree with your point. The Moving forward, our next item is to add a build rake task to puppet-modulebuilder. We appreciate that |
9b9bb25
to
d1f6fe0
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 started to extract all the fixture handling to https://github.com/ekohl/puppet_fixtures too, but never got around to completing it. My intention with that was that puppetlabs_spec_helper
becomes a really pure combination of building blocks. For Vox Pupuli I was hoping to remove puppetlabs_spec_helper
from our toolchain entirely.
My reasoning is that I need fixtures in our acceptance tests, but puppetlabs_spec_helper is mostly focused on unit tests. Once you extract fixtures, there's really very little left in this gem that we need.
Note this gem already loads in puppet-blacksmith if available: puppetlabs_spec_helper/lib/puppetlabs_spec_helper/rake_tasks.rb Lines 20 to 24 in 6e600d1
You can easily end up defining the task twice. I think rake tasks are additive, so you could end up building the module twice. Since it's a soft dependency, you can't declare you're incompatible with certain versions. Luckily puppet-blacksmith does depend on puppet-modulebuilder so you could make it an incompatible version bump there and update puppet-blackmsith accordingly. So it's not impossible, but it's not as trivial as adding a new method. |
@ekohl those are all valid points, thanks for going through all that. So my thinking here is:
This way we indirectly consume modulebuilder, the rake tasks supplied by Does this sound more inline with what you're thinking? |
1b73909
to
0aef0f3
Compare
This commit removes the build rake tasks from puppetlabs_spec_helper, as it does not make sense to have these exist in a gem which sole purpose is to help unit testing.
0aef0f3
to
f9878f8
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.
Does this sound more inline with what you're thinking?
Yes, very much.
Summary
this removes the build rake tasks from puppetlabs_spec_helper, as
it does not make sense to have these exist in a gem which sole purpose
is to help unit testing.
Additional Context
Add any additional context about the problem here.
Related Issues (if any)
Mention any related issues or pull requests.
Checklist