-
Notifications
You must be signed in to change notification settings - Fork 420
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
feat(package): use apt-pinning to pin specific package version #458
Conversation
Available only on Debian family OS-es
@hatifnatt Thanks for this proposal. One thought crosses my mind: this feature is already provided by the I don't think this should be duplicated here. Is there a particular use-case that you can see that makes this an exception? |
@myii I think formula must be self-sufficient to a certain level, and if this cause some functionality overlap that's fine. IMO version pinning is very basic function and use one more formula for this is overkill. If somebody using another formula for this - no problem, this new pinning function is not mandatory. |
Sure, I understand your point of view. Let's get some other opinions about this. What do you think @javierbertoli @aboe76?
There's a couple of differences here. The first is that |
Version pinning can be done on other OS too, but implementation is very different from OS to OS I simply can't implement it universally. I am using pinning as a tool to make downgrade possible, another way - list all packages with versions when performing installation, not only |
Hello, just for information we use the pillar |
Thanks for mentioning that, @daks. Would |
|
@myii of course I'm using |
@daks @noelmcloughlin Thanks for your suggestions but it comes down to whether you are OK with this functionality being duplicated here when it's available in the base:
'*':
- apt.preferences
- salt.minion @hatifnatt Don't feel I'm being overly hard on you! I'm trying to avoid any unnecessary bloat, when there's already some trimming that's needed from this formula (such as the pillar-based method of managing config files). |
I think I already used it for downgrade of a minor salt-minion version (from 2019.2.2 to 2019.2.0) but I just tried and didn't acheive the same from 3000 to 2019.2, so maybe it's not usable. Like @myii I don't like the idea of duplicating the pinning functionality between the two formulas. For your information, we also use the idea of combining |
Fortunately fork is still an option. Too many human resources already spent discussing this relatively simple change. |
The correct approach in systems development is to combine components to achieve a greater task. I.e. a microservices approach. That is the feedback two reviewers gave you. Below is example state I run - normal practice for achieving A, B, C and avoiding monolithic or WET design approaches. Fork away if you find collaboration too difficult, but silo approach is not collaborative is it?
|
I understand your frustration, @hatifnatt. However, one problem we've got across this whole org is that features are implemented in formulas but then the original authors don't pay any attention and leave the maintenance burden on the very few of us who are actually making time to review issues and PRs here. And that number has dwindled over the years. One remedy I'm suggesting is that we adopt the So as new features are added, contributors will be automatically flagged when their implementations are being adjusted. Hopefully, that will help run things better, so that we're not just hanging around saying: "Hmm, I'm not quite sure what the original author intended...". So say we adopted that for this PR, and all future changes that reference this pinning functionality come back to you. Would you be willing to help that bit of the maintenance effort?
Formula inter-dependencies are a tough topic. And I'm sure what you're saying there is what so many are doing as well. It's difficult to find the balance for these public formulas. Sometimes I feel that each one is doing too much and it would be a far better idea to split them up into more specific repos. So if we had a |
@noelmcloughlin when exactly does flexibility end and over complication begins? I stated my thoughts in my first replies - some overlapping in functionality is acceptable. My proposal is nothing like manage nginx with salt-formula, only to improve handling for salt packages which this formula is supposed to manage. @myii I don't know exactly how I'm supposed to support those changes in future they are pretty simple, no complicated logic. I don't mind to put some effort in the future if there will be something I can help with and I will have time and relevant knowledge. OS specific formulas is not a bad idea, formulas became more simple and it's became possible to use OS specific "tricks", but on the other hand there will be a lot of similar (in functionality) code between such formulas, not DRY. |
On one hand I agree that, existing formulas that already allow to pin versions for the debian's family of distros) or in a more general way, for a few different OSes, adding this pinning here, for a single distro and just a single package ( But, OTOH, I agree that, even if some formulas offer the For that last situation, which is the one @hatifnatt is trying to solve here, I think that adding a My 2c. |
@javierbertoli not only |
@hatifnatt It's no secret that the whole SaltStack Formulas organisation was drifting without direction for a while. That's why a number of us decided to do something about it and have put in significant efforts over the last year or so, trying to restructure how everything works -- I thank them all for their efforts. To get an idea of what I'm talking about, have a look at saltstack-formulas/template-formula#21. There's actually much more than this that has been tackled and the only way we resolve these plans is via. discussion. Do you think we've spent 3 weeks discussing the actual implementation of this PR? I recognise and appreciate your contributions to various formulas @hatifnatt, and I'm not questioning the quality of what you provide. This isn't about the implementation, this is about using this opportunity to make meaningful changes to how this org operates. And via. this discussion, @javierbertoli has hinted an excellent idea of actually offering pinning across all formulas as a built-in option -- arriving at this point specifically because of your proposal here.
What appears simple and uncomplicated to you today, may appear otherwise to the maintainers of this formula a few years down the line ("why in the world did the maintainers allow pinning when that should have been handed off to the relevant formulas?!"). Besides, the whole Would you mind if I added you to inaugural
So since we're effectively forced to support multiple platforms per formula, we need to make things as easy as possible for (future) maintainers, by keeping the codebase as trimmed as possible, avoiding duplication and pointing users to other available formulas. This is a general point that no longer applies to this PR, because of what's been discussed above. |
Thanks for the patience, @hatifnatt. I added you to the |
🎉 This PR is included in version 1.4.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Available only on Debian family OS-es
PR progress checklist (to be filled in by reviewers)
What type of PR is this?
Primary type
[build]
Changes related to the build system[chore]
Changes to the build process or auxiliary tools and libraries such as documentation generation[ci]
Changes to the continuous integration configuration[feat]
A new feature[fix]
A bug fix[perf]
A code change that improves performance[refactor]
A code change that neither fixes a bug nor adds a feature[revert]
A change used to revert a previous commit[style]
Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)Secondary type
[docs]
Documentation changes[test]
Adding missing or correcting existing testsDoes this PR introduce a
BREAKING CHANGE
?No.
Related issues and/or pull requests
#314 #358
Describe the changes you're proposing
Add ability to pin version provided via pillar using apt-pinning. Benefits of version pinning:
apt-get update; apt-get upgrade
3000
to2019.2.3
withapt-get install salt-minion=2019.2.*
you will face error because apt will try to install version 3000 ofsalt-common
All changes applicable only to Debian based OS-es.
No test written but tested on my Debian Jessie - Buster machines successfully performed upgrade from v. 2018 to v. 2019, v. 3000 and downgrade from v. 3000 to v. 2019.
Note
Sometimes restart of salt-minion take a lot of time, about 2 minutes and formula execution ends with an error
Minion did not return. [No response]
checking service status withsystemctl status salt-minion.service
will retunbut after some time minion became available again.
Pillar / config required to test the proposed changes
Debug log showing how the proposed changes work
Documentation checklist
README
(e.g.Available states
).pillar.example
.Testing checklist
state_top
).Additional context