-
Notifications
You must be signed in to change notification settings - Fork 148
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
allow bumping puppet-agent-* deps #9410
Open
evgeni
wants to merge
1
commit into
theforeman:rpm/develop
Choose a base branch
from
evgeni:test-pb
base: rpm/develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@ekohl I recall you had said in the past (in #9075) that this is not worth it, but I think with the puppet-agent gems, it actually is?
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 problem is that we have many gems that are actually irrelevant for packaging. Then some things end up pulling in older gems, for example because of the old rubocop version we have (which we should update).
You can also see that we don't even pin
puppet-strings
in ourGemfile
(https://github.com/theforeman/foreman-installer/blob/c6422b45f1bb6e1af8e9792857411b077fe306ac/Gemfile#L12) so if that's the only thing then I wonder if there's a better way.What we can also consider is a more advanced solution where we can inherit things.
Breaking it down we have:
Build time is actually split into two. librarian-puppet is needed to build the source tarball while puppet-strings is needed to build the cache. The reason is that it only caches items for classes included in the answer file(s). Technically we could generate one huge cache file for all the classes, but that makes the cache bigger and will slow down runtime.
So that makes me think about building some common file + Gemfile with just the ones we use in packaging (kafo, puppet-strings) and generate a lockfile for that. Then also include the common bits in the generic Gemfile.
Any thoughts on that?
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.
Right now, the script finds:
The alternative would be to add something like
template: puppet
to the specs and allow the script to always bump that to "latest", but I am not sure I like that.I think having a
Gemfile.lock
with--without test:development
would be the right thing (and would also apply to the other projects, actually, it's just that there its less of an issue).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
--without
really ignores those dependencies. For example, if you have a git repo listed in your development group bundler will still clone it to determine the dependencies. Even if you specified--without development
. That's why I suggested separate files. But there may be different ways (like looking at ENV vars).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.
Yeah, I shouldn't have said
--without
but "a lockfile built in a way that it would not list the unwanted deps" (= what you suggested, without implying an implementation)