-
Notifications
You must be signed in to change notification settings - Fork 198
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
compose: Add rpmostree.rpmmd-repo metadata to commits by default #1079
Conversation
This is a revisit of a PR for client-side layering: coreos#1072 Here though we're doing this by default for server-side composes. There are a few reasons to do this; first, I'm seeing an issue in some of our Jenkins jobs for Fedora that hit "mirror roulette" and end up creating commits that "revert" to older versions temporarily. While I've [certainly pitched](https://lists.fedoraproject.org/archives/list/[email protected]/message/IMPE6KCRBHCEJH5VBE6ZFIRLPAD743JT/) this as a feature, I think we really want something like `--force-older-timestamp` - basically error out if the timestamps on one or more input repos were older. Not doing that in this patch, but it paves the way to do so. Second, I'd like to use this data in the `ostree.source-title` metadata key down the line. Something like: `└ rpmmd: fedora-26 (20170310), fedora-26-updates (20171101)` (This could be a lot nicer if we drive versioning in to the rpm-md repo info, and e.g. there's some friendly "week number" style versioning for the updates repo now that it's batched...for now we have timestamps) For CentOS/RHELAH this gets interesting and potentially more verbose, to the point where we may want to render it more explicitly. But anyways, let's do this now, as it will be useful even without an explicit rendering, since users can do e.g. `ostree show` on a base commit hash to dump the data. I had a concern that some users may not want to emit this metadata; they can currently do `--add-metadata-string rpmostree.rpmmd-repos ''` and that will "win".
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.
Makes sense. Just a minor indentation nit, but meh, not worth another round trip.
g_variant_builder_init (&repo_builder, (GVariantType*)"a{sv}"); | ||
DnfRepo *repo = repos->pdata[i]; | ||
const char *id = dnf_repo_get_id (repo); | ||
g_variant_builder_add (&repo_builder, "{sv}", "id", g_variant_new_string (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.
Minor: indentation off here.
This is a revisit of a PR for client-side layering: #1072 Here though we're doing this by default for server-side composes. There are a few reasons to do this; first, I'm seeing an issue in some of our Jenkins jobs for Fedora that hit "mirror roulette" and end up creating commits that "revert" to older versions temporarily. While I've [certainly pitched](https://lists.fedoraproject.org/archives/list/[email protected]/message/IMPE6KCRBHCEJH5VBE6ZFIRLPAD743JT/) this as a feature, I think we really want something like `--force-older-timestamp` - basically error out if the timestamps on one or more input repos were older. Not doing that in this patch, but it paves the way to do so. Second, I'd like to use this data in the `ostree.source-title` metadata key down the line. Something like: `└ rpmmd: fedora-26 (20170310), fedora-26-updates (20171101)` (This could be a lot nicer if we drive versioning in to the rpm-md repo info, and e.g. there's some friendly "week number" style versioning for the updates repo now that it's batched...for now we have timestamps) For CentOS/RHELAH this gets interesting and potentially more verbose, to the point where we may want to render it more explicitly. But anyways, let's do this now, as it will be useful even without an explicit rendering, since users can do e.g. `ostree show` on a base commit hash to dump the data. I had a concern that some users may not want to emit this metadata; they can currently do `--add-metadata-string rpmostree.rpmmd-repos ''` and that will "win". Closes: #1079 Approved by: jlebon
@rh-atomic-bot retry |
💥 Test timed out |
@rh-atomic-bot retry |
☀️ Test successful - status-atomicjenkins |
This is a revisit of a PR for client-side layering: #1072
Here though we're doing this by default for server-side composes.
There are a few reasons to do this; first, I'm seeing an issue
in some of our Jenkins jobs for Fedora that hit "mirror roulette"
and end up creating commits that "revert" to older versions temporarily.
While I've certainly pitched this as a feature, I think
we really want something like
--force-older-timestamp
- basicallyerror out if the timestamps on one or more input repos were older.
Not doing that in this patch, but it paves the way to do so.
Second, I'd like to use this data in the
ostree.source-title
metadata key down the line. Something like:
└ rpmmd: fedora-26 (20170310), fedora-26-updates (20171101)
(This could be a lot nicer if we drive versioning in to the rpm-md repo info,
and e.g. there's some friendly "week number" style versioning for the updates
repo now that it's batched...for now we have timestamps)
For CentOS/RHELAH this gets interesting and potentially more verbose,
to the point where we may want to render it more explicitly.
But anyways, let's do this now, as it will be useful even without
an explicit rendering, since users can do e.g.
ostree show
ona base commit hash to dump the data.
I had a concern that some users may not want to emit this metadata;
they can currently do
--add-metadata-string rpmostree.rpmmd-repos ''
and that will "win".