-
Notifications
You must be signed in to change notification settings - Fork 189
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
Fedora Pungi mashing including module mashing. #1900
Fedora Pungi mashing including module mashing. #1900
Conversation
btw, does this PR mean that we will switch to pungi for mashing RPMs so we can proceed with rust packaging in fedora? |
btw can we properly get my commits included in this patch set? here is the PR I opened: #1821. These show up in this patchset as a single |
we probably should not be embedding pungi configs in bodhi - can we delete the |
BTW we don't need to clone comps any more as pungi can now do that for us. The RFE was resolved in 4.1.18 |
@ignatenkobrain Yes, this patch will make Bodhi stop using mash and use Pungi to make RPM repos, OSTrees, and modules too. Exciting! @dustymabe I'm actually planning to squash all of these commits down to one once we get this ready to merge, but I will attribute authorship to everyone involved in the commit message. Otherwise Bodhi's commit history will be really crazy (Bodhi has a contribution guideline about how commits should be clean and atomic.) |
Woohoo! |
i'm pretty sure that's what I tried to do in #1821 - just look at this commit message and see how much information is included in it. I'd prefer not to squash everything into one massive commit. |
On 10/16/2017 03:24 PM, Dusty Mabe wrote:
i'm pretty sure that's what I tried to do in #1821
<#1821> - just look at this
<630fb80>
commit message and see how much information is included in it. I'd
prefer not to squash everything into one massive commit.
I'm happy to make the commit message include the information we need,
but I think the one massive commit is the way to go because I will need
to cherry pick this feature to release it and because no commits will
work on their own without the full set (thus, they are not atomic). The
feature needs all of them to work, so it should be one commit.
|
I'll remove the |
Seems like this feature is so big we'd want a brand new release for it?
Isn't that the point of a merge commit? I'm not saying we have to be super vigilant about breaking things into super small pieces, but concise commits with good messages about a specific diff is definitely more useful than a giant commit. |
bodhi/server/consumers/masher.py
Outdated
# Stderr should also go to pungi.global.log if it starts | ||
stderr=subprocess.PIPE, | ||
# We will never have additional input | ||
stdin=DEVNULL) |
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 know /dev/null is special, but will there be a problem if multiple processess are given the same file handle to it? Should we make a call to open()
for each process rather than opening one at the module-level?
bodhi/server/consumers/masher.py
Outdated
def get_previous_compose(self): | ||
"""Function to return the previous composes' output.""" | ||
return None | ||
return os.path.join(config.get('mash_stage_dir'), self.id) |
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.
Is the intention to kill this method, or was this return None
just here for debugging?
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 was for debugging.
self.log.exception("Repodata sanity check failed!") | ||
raise | ||
|
||
# make sure that pungi didn't symlink our packages |
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 was actually never really sure why Bodhi does this symlink check (it did it for mash too) - was there some problem in the past that symlinks caused? Does it happen often? Do you think we definitely need this?
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.
It can create symlinks if you misconfigure pungi.
The problem is that symlinks become problematic with the syncing to /pub.
So this check is really there to make sure that Pungi wasn't misconfigured and got us a repo we can't sync out.
bodhi/server/consumers/masher.py
Outdated
mash_path = os.path.join(self.path, self.id) | ||
arch = os.listdir(mash_path)[0] | ||
## will need to fix mash_path here | ||
mash_path = os.path.join(self.path, 'compose', 'Everything') |
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.
What do we need to fix about this?
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.
Nothing anymore, that was fixed.
msg=dict(tag=tag, | ||
ref=result.get('ref'), | ||
commitid=result.get('commitid')), | ||
force=True) |
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 can't wait to kill fedmsg-atomic-composer (which, humorously, isn't triggered via fedmsgs).
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.
Well, fedmsg-atomic-composer does have a fedmsg consumer and can be ran through purely fedmsg.... :)
bodhi/server/consumers/masher.py
Outdated
def copy_additional_pungi_files(self, pungi_conf_dir, template_env): | ||
self.git_clone('https://pagure.io/fedora-comps.git', | ||
'master', | ||
os.path.join(pungi_conf_dir, 'comps')) |
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.
Dusty had suggested using Pungi to do this - I'm slightly inclined to make that a later commit/release just for reducing churn, but if you think that's easy we can do it now.
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 that's what I was suggesting with #1900 (comment) - this is a large enough change that I would say we should just go ahead and leverage the new functionality in pungi
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.
That's pretty easy.
When I looked at the documentation for it, I couldn't find a way to make it run "make", which in fedora-comps is required.
But after looking at the code, you can do that, so this entire call nd the "make" call can just be dropped.
bodhi/server/consumers/masher.py
Outdated
self.log.error('out: %s', out) | ||
self.log.error('Err: %s', err) | ||
raise Exception('Unable to make comps') | ||
shutil.copy('/etc/bodhi/variants-fedora.xml', pungi_conf_dir) |
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.
Will variants be specific to the release, or do all Fedora releases have the same variants document?
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.
Let's make it just a template.
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.
Thanks everyone, this patch looks pretty good so far! I'm going to start off by rebasing this onto #1903 once it's merged, and then I'll make a few minor tweaks of my own, and then I'll get to work writing tests and docs. This is a very exciting patch!
On 10/16/2017 03:48 PM, Dusty Mabe wrote:
Seems like this feature is so big we'd want a brand new release for it?
It is getting its own release (well, almost. I'm going to sneak a
backwards-incompatible CLI change as well, since we're naming this one
Bodhi 3.0.0, but that one doesn't affect the server very much), which is
why I will need to cherry pick it. There are many things on develop that
I don't want to release with this patch, in case we need to back it out.
This patch is going to go in with a FBR so I need it to be an easy
downgrade.
Isn't that the point of a merge commit? I'm not saying we have to be
super vigilant about breaking things into super small pieces, but
concise commits with good messages about a specific diff is definitely
more useful than a giant commit.
I also avoid merge commits, in order to keep a nice clean git history.
My goal is to make it so that each commit on develop could be used as a
release. This has a number of advantages:
1. I can easily cherry pick commits I want to bring into a release (I
do this often).
2. Other bodhi deployments can also easily cherry pick the commits they
want.
3. The git log is short and meaningful, without very many "oops fix
typo" type commits (I did literally fix a typo today with a commit,
but it was one that had already gotten into develop ☺).
4. Each feature and bug fix has exactly one commit, so it's easy to know
you got it all when cherry picking.
5. Writing release notes is very painful when commits are not atomic.
It's important to keep in mind that the commit author isn't necessarily
the author of the patch, in general. While it's true that they are often
the same in Bodhi, there are quite a few cases where they are not, and
that's OK. There have been other commits in Bodhi that worked this way
too. When more than one person collaborates on the same patch, the right
thing to do is to credit them in the commit message, similar to how it
would work if we authored a journal paper together. Bodhi also credits
contributors to a release in the release notes, and so all the patch
authors will also be credited there. The commit author is really just
the person who created the commit.
By the way, the requirement for commits to be atomic is documented in
Bodhi's contribution guidelines:
https://bodhi.fedoraproject.org/docs/developer_docs.html#contribution-guidelines
|
I would never propose that we keep "oops fix typo" commits. Anyone that submits a PR should know how to properly rebase/squash commits and get rid of meaningless stuff like that.
A large feature in a single commit would probably lose a lot of details about "why". When "changing the way things are" like we are doing in this PR, we change where we look for things and we also delete code in some cases. Without the commit history we lose all of that context. I guess you can try to put it all in a single commit message, but I think most of it will get lost. A merge commit would keep the atomic requirement without losing the history. I don't really like merge commits either, but with the atomic requirement (which you have explained good reasoning for), they would solve the problem.
I really don't care as much about having my name on commits. I hope I don't seem too vain :). I was more interested in keeping the history and meaningful commit messages that I worked to achieve.
yes I saw that, which is why I suggested a merge commit which would keep the meaningful history and also provide the atomicity required. I'll stop beating this horse now. 🏇 |
I've rebased this PR locally, but weirdly GitHub is saying "Add more commits by pushing to the pungi-bodhi-modular branch on puiterwijk/bodhi", while git is saying "ERROR: Permission to puiterwijk/bodhi.git denied to bowlofeggs." I don't know what to make of that. |
9763c5e
to
f9c3178
Compare
f9c3178
to
d454f14
Compare
# catches the same assumption breakage. This check here is extra for the | ||
# time when someone adds multitype updates and forgets to update this. | ||
raise ValueError('Builds of multiple types found in %s' | ||
% title) |
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.
Thanks for the comment, and agreed on the no cover.
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.
@puiterwijk I think I am good with the current patch set (though of course, I would want to squash it down before merging). I guess we'll wait and see what Jenkies thinks about the latest patch, and I'd like you to review the commits I made tonight too. If you and Jenkies both approve the PR I think we will be good to merge!
Jenkies looks real backed up, but I ran the container tests on my laptop and they all passed here. So it'll probably pass… eventually… |
1ab9419
to
bbb7cb3
Compare
OK this is now squashed down to one commit. @puiterwijk, do you approve of this PR as it stands? |
I received an IRC approval to merge from @puiterwijk:
|
bbb7cb3
to
f25e7ea
Compare
This commit is a significant change in Bodhi, as it alters the repository layout that Bodhi generates when mashing. It also enables Bodhi to create repositories of a new content type, modules. Many other new features of Pungi are now available to us as well, such as rich dependencies. fixes fedora-infra#653 fixes fedora-infra#887 fixes fedora-infra#909 fixes fedora-infra#1182 fixes fedora-infra#1219 fixes fedora-infra#1330 This patch was written collectively by several authors: Kushal Das Dusty Mabe Adam Miller Patrick Uiterwijk Randy Barlow Signed-off-by: Randy Barlow <randy@electronsweatshop.com> Signed-off-by: Adam Miller <maxamillion@fedoraproject.org> Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
f25e7ea
to
ffdda15
Compare
This has been cherry-picked to the 3.0 branch as 87267cc. |
No description provided.