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.
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
An improved workflow for maintaining Salt #96
base: master
Are you sure you want to change the base?
An improved workflow for maintaining Salt #96
Changes from 3 commits
a8616ca
b8bc52b
69aa9fe
350a21f
c81cd74
c342ef2
1abc6b0
85f3e08
a8448c9
ae926f9
a01c6ab
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Can you explain how the structure applies to these projects concretely? I would have thought
products:testing
orproducts:next
don't need a separategithub
subproject.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.
Hmmm, actually for
products
we don't really needed, as we just copypac whatever is inproducts:testing
toproducts
.But for
products:testing
andproducts:next
I will also consider thegithub
structure, to be able to have different Salt versions if necessary ensuring those packages are also ready to be consumed (even if those are never be directly released) but we would prevent enabled services can run unexpectely on targets that are linked toproducts:testing
andproducts:next
(like i.a. Uyuni:Master or D:G:M:*)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.
Just to make is clear, any patch that we want to apply on top of salt code base should go to this folder
pkg/suse/
right?So basically you are moving all the content from the github project
openSUSE/salt-packaging
(subfolder salt) to this noewpkg/suse
folder (at the start we will not have patches since we start from the same base as upstream)?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.
Not really. We won't be carrying patch files anymore in our new OBS packages, as any code change will automatically inside the source tarball by the
obs_scm
integration.The exception to this would be EMBARGOED bugs, where we cannot proceed publicly via GitHub, so we will put a patch file manually in IBS than will be removed the bug is public and we push the changes to GitHub.
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.
A side question; currently, we have a lot of commits that are not in upstream, due to various reasons. With
salt-packaging
, we can easily check which patches are in upstream, and which patches are not. With removing the patch workflow, we're losing this insight.Do you perceive this as a problem? Are we still sticking with the "fork & cherrypick commits" development style, or are we moving towards rebasing more frequently?
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 is a good point! We should probably want to have a way to easily identify what is upstreamed and what is not.
I'll elaborate this a bit on the RFC text. Thanks for the note 👍
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.
thank you @m-czernek , that was exactly my concern when I made the comment. Commits that are not yet upstrem, and currently are maintained on salt-packaging project.
We we start merging commit to our salt project that are not merge upstream yet, it can make it harder to integrate upstream version and know what is merge already or not.
@meaksh thank you for look into this topic.
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've added a section in to RFC to clarify 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.
I copied the information from the spec file (
PATCH-FIX_UPSTREAM
/PATCH-FIX_DOWNSTREAM
) to the git log (https://github.com/agraul/salt/commits/metadata-in-git/) to see if that's a better alternative. I guess we're mostly interested in links to upstream (since the downstream PR can already found from the commit anyway), but I added both upstream and downstream URLs for now. For new PRs, we'd want to enforce this kind of metadata in the commit messages, e.g. via a Github action that runs on each PR.Listing all commits that backport upstream PRs can be done easily with
git log --oneline --grep='BACKPORT-UPSTREAM'
. Or all commits that are not upstream:git log --oneline --grep='BACKPORT-UPSTREAM' --invert-grep v3006.0-suse..HEAD
.Note: this is different fromgit log --oneline --grep='DOWNSTREAM'
because a) the git log includes commits we didn't create patches for and b) some patches have links to both upstream and downstream PRs/commits.I don't even want to try writing one-liners that do the same for our current salt.spec (give it a go when you have time!)
So far it looks like a good way forward to me, let me know what you think.
P.S.: This current approach rewrote all the commits, we could also put them in
git-notes(1)
to keep the old commits intact. That's probably a better way, but I had to start somewhere.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.
Not sure if I get this point right. Maybe it says
spec file
but the actual meaning is different, not sure, could you please clarify it?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.
Woops, sorry. I meant "changelog" file 😄
Let me fix 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.
Do I understand it right, that in this case we will add changelog entries manually to the changelog file or manually but with
osc vc
, still not fully clear here. With the osc services there is way to use commit messages as a changlog items, don't we want to use it this way?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 proposing here to manually add the changelog entry to
salt.changes
by using theosc vc
command directly in your Git tree, so the generated changelog entry (and header) can be included together with the code changes in the PR toopenSUSE/salt
repo.This way a single PR to
openSUSE/salt
repo could contain all possible different bits: code changes, specfile changes, changelog entries, artifacts changes.See this example PR: https://github.com/meaksh/salt/pull/10/files
Now that you mentioned the "osc services" for the changelog, I realized that the current proposal is not covering the fact that we need to maintain different changelogs depending on the targeted codestreams (as they are not aligned).
I'll have some thoughts and clarify this on the RFC text.
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've added more text to the RFC on how to deal with different maintained changelogs
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.
Are we also merging the changelog like we do in Uyuni or do we need to resolve merge conflicts manually?
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 should be now clarified on the RFC text
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 find it, can you help me out with the line number or a link? With the list of "backported PRs" in the spec file, we might hit this issue in two places.
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.
Can we have the
_multibuild
in git as well?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.
Hmmm, indeed probably yes. I'll check and adjust 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.
After latest changes on the RFC, now
_multibuild
would be also included in the Git repo.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 not aware we used an
openSUSE/devel/master
branch. Is this a new branch we will use?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 used
openSUSE/devel/master
here just as an example, it should point to the eventualopenSUSE/release/3008.x
branch. I'll fix this on the RFC text.Currently
openSUSE/devel/master
is just the devel branch I created with upstreammaster
branch + our patches partially rebased on top (excluding patches to extensions).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 has been part of the other RFC, but for me it's still not so clear that we can have "builtin extensions". How do we publish these to PyPI from the main repository? How do we get them to show up on https://extensions.saltproject.io/?
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.
These "builtin extensions" I introduced it as an optional way for us to be able to provide extensions that do not have yet a proper Salt Extension package.
This could happen for example in these cases:
might not be necessary but it is an option we have.
Builtin extenions would reduce, if necessary, the number of Salt Extensions packages we want to deal with.
It would be up to us to decide whether we want to have any builtin extensions or we just go with all needed extensions as separeted packages if they are already migrated to Salt Extensions.
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.
In the other RFC, the list of built-in extension includes
zypperpkg
andtransactional_update
. These are extensions we want to maintain, i.e. we will need to publish them on PyPI. What's the workflow for maintaining these built-in extensions? Do we have the same rules wrt. pull requests and what they have to contain? How do we publish them to PyPI? What's the plan here?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.
Here we'll need to be careful with merge conflicts. Maybe it won't be a big issue, we probably won't change the extensions that often. On the other hand, we probably update them in batches which could lead to changelog merge conflicts.
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.
Actually, I just changed this as we would have multiple changelog files, one per maintained workflow.
Of course, merge conflicts could happen for PRs that are introducing different changelog entries at the same, then we would need to rebase the PR before merging it.
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.
Can you expand on those points a bit? In particular, what makes it tricky to generate patches when sources live in separate repositories opposed to separated sub-directories in a single repository? And why is that harder to integrate separate repositories?
I'm not saying we should go that way, I just want to understand the trade-offs.
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 say we need to prepare a patch in OBS/IBS to fix some code in one extension or even in many of them in a single shot.
Assuming that we use "git submodules" in our Salt Extension repository and we have a sub-directory per extensions which is a "git submodule":
Then if you run
git format-patch
command on your Git repository root, then you won't get any diff for any of the "git submodules". You have to rungit format-patch
inside each "git submodule" directory to get a patch file which is actually not relative to your main Git repo but to the submodule repository, so we won't be able to apply that generated patch directly in our spec file but we would need to manually adjust it.This is why I say that "git submodules" are not really straight forward when it come to generate patches.
When it comes to the
obs_scm
service (as we want to have a unified workflow for Salt and its extensions), I have not really tested how it behaves with "git submodules".Hth!
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.
Thank you, I understand what you mean now. I agree that using sub-modules in that way is not a good approach. I don't really get the point about patches though, I thought we don't create them anymore with this RFC?
JFI, in the new "SUSE Packaging Git Workflow" git sub-modules are used in "project repositories". Each package that's inside the project is it's own git repository (somewhere else) and they exist inside the project as sub-modules.
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.
For the general mainteance, we don't use patches anymore but there are some cases where patches are still needed, like the embargoed bugs, where the fixes are manually pushed to IBS, using a patch file, and not via GitHub repository until the bug is public.