Hide Forgot
Description of problem: "oc adm release info --changes-from" assumes the Git repositories that back the images merge changes with merge commits: it uses `git log --merges ...` to list the changes: https://github.com/openshift/oc/blob/538ee42d982c248a704a106a60aba40c513da8b1/pkg/cli/admin/release/git.go#L177 Some repositories (like openshift/insights-operator) are using squash merges, so resulting commit history does not contain merge commits, so the changelog obtained via `oc adm release info` does not contain anything for images built from such repositories. Version-Release number of selected component (if applicable): $ oc version Client Version: 4.8.0-202109210857.p0.git.88e7eba.assembly.stream-88e7eba ^^^ is my workstation but it looks like the current code has the problem too How reproducible: always Steps to Reproduce: 1. oc adm release info --changelog=/tmp/changes --changes-from=registry.ci.openshift.org/ocp/release:4.7.0-0.ci-2021-09-22-002107 registry.ci.openshift.org/ocp/release:4.7.0-0.ci-2021-09-22-183042 Actual results: The command recognized there was a different revision but does not print any changelog for that repo: Cloning into '/tmp/changes/github.com/openshift/insights-operator'... remote: Enumerating objects: 36761, done. remote: Counting objects: 100% (5945/5945), done. remote: Compressing objects: 100% (3266/3266), done. remote: Total 36761 (delta 2643), reused 5067 (delta 2368), pack-reused 30816 Receiving objects: 100% (36761/36761), 40.98 MiB | 10.50 MiB/s, done. Resolving deltas: 100% (16333/16333), done. $ git log --merges --topo-order -z 19b13a7cf1bd5f38a4f1bc4f257ff7fd70803093..acf24a5ca7d9ab4428fa3f55f4f302a9e6e471bf Expected results: $ git log --topo-order -z 19b13a7cf1bd5f38a4f1bc4f257ff7fd70803093..acf24a5ca7d9ab4428fa3f55f4f302a9e6e471bf commit acf24a5ca7d9ab4428fa3f55f4f302a9e6e471bf (HEAD -> release-4.7, origin/release-4.7) Author: Tomas Remes <tremes.github.com> Date: Wed Sep 22 20:26:36 2021 +0200 [release-4.7] Bug 2002539: Gather installed PSP names (#489) (#493) Additional info:
We can't simply switch to `--no-merges` since that would provide a longer history, from all commits. The decision to use `--merges` was to only show summaries. We'll need to figure out a better approach to this.
Perhaps we could fall back to `--no-merges` when `--merges` ends up empty?
This bug hasn't had any activity in the last 30 days. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're marking this bug as "LifecycleStale" and decreasing the severity/priority. If you have further information on the current state of the bug, please update it, otherwise this bug can be closed in about 7 days. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. Additionally, you can add LifecycleFrozen into Whiteboard if you think this bug should never be marked as stale. Please consult with bug assignee before you do that.
IMO still relevant, there is tooling that exposes this information to users
IMO this is still relevant, there is tooling, specifically the release-controller, that exposes this information to users.
What Brad said
To understand the problem, I'm trying to find a suitable release(includes diffs to return data for oc adm release info command) to work on for insights-operator. For example, this PR https://github.com/openshift/insights-operator/pull/605 was merged 5 days ago and I'd expect to see it in changelogs in 4.10 nightly releases https://amd64.ocp.releases.ci.openshift.org/#4.10.0-0.nightly. Only I could have found is that insights-operator is in "rebuilt images without code changes" section ie. https://amd64.ocp.releases.ci.openshift.org/releasestream/4.10.0-0.nightly/release/4.10.0-0.nightly-2022-04-20-102855 Does this https://amd64.ocp.releases.ci.openshift.org/releasestream/ page also use `oc adm release info` to calculate change logs(and thus this is the same problem) or I'm looking at incorrect releases and just have to wait new PR getting merged for insights-operator?
Yes, the release-controller generates the change logs via a "oc adm release info --changelog=/tmp/git <from> <to>" command: https://github.com/openshift/release-controller/blob/a0977a69eeedbc793483ba0229989b1fa14ac2eb/pkg/release-controller/release_info.go#L175-L214
Thanks @Brad. I think, I could have reproduced problem with these releases; oc adm release info --changelog=/tmp/changes --changes-from=registry.ci.openshift.org/ocp/release:4.11.0-0.nightly-2022-04-21-192140 registry.ci.openshift.org/ocp/release:4.11.0-0.nightly-2022-04-22-002610
I've verified bug is fixed with running the command; $ oc adm release info --changelog=/tmp/changes --changes-from=registry.ci.openshift.org/ocp/release:4.11.0-0.nightly-2022-04-26-181148 registry.ci.openshift.org/ocp/release:4.11.0-0.nightly-2022-04-28-102605 Cloning into '/tmp/changes/github.com/openshift/insights-operator'... remote: Enumerating objects: 39597, done. remote: Total 39597 (delta 0), reused 0 (delta 0), pack-reused 39597 Receiving objects: 100% (39597/39597), 41.07 MiB | 1.31 MiB/s, done. Resolving deltas: 100% (19188/19188), done. ### [insights-operator](https://github.com/openshift/insights-operator/tree/14d32dcb8c54eba7aeca1cb140167ea81d6799b2) * [Bug 2079315](https://bugzilla.redhat.com/show_bug.cgi?id=2079315): Gather ODF config data (#614) [#614](https://github.com/openshift/insights-operator/pull/614) * [Full changelog](https://github.com/openshift/insights-operator/compare/95961e7113ce179bf1621ac38842cad691d5b870...14d32dcb8c54eba7aeca1cb140167ea81d6799b2) But I could not see insights-operator changes in that list; https://amd64.ocp.releases.ci.openshift.org/releasestream/4.11.0-0.nightly/release/4.11.0-0.nightly-2022-04-28-102605?from=4.11.0-0.nightly-2022-04-26-181148 Is it possible that release-controller is not using the latest oc binary?
Hey @Ardag
Arda, Yes, unfortunately the release-controller was running a very old version of `oc` for about the last week. I have corrected the problem and you should be able to verify now: ``` sh-4.4$ oc version Client Version: v4.2.0-alpha.0-1457-g9b7fe72 Kustomize Version: v4.5.4 Kubernetes Version: v1.23.5+9ce5071 ```
Arda Guclu: Thanks , double confirmed , the issue has fixed: oc adm release info --changelog=/home/changes --changes-from=registry.ci.openshift.org/ocp/release:4.11.0-0.nightly-2022-04-26-181148 registry.ci.openshift.org/ocp/release:4.11.0-0.nightly-2022-04-28-102605 ...... Cloning into '/home/changes/github.com/openshift/insights-operator'... remote: Enumerating objects: 39597, done. remote: Total 39597 (delta 0), reused 0 (delta 0), pack-reused 39597 Receiving objects: 100% (39597/39597), 41.07 MiB | 11.76 MiB/s, done. Resolving deltas: 100% (19188/19188), done. ### [insights-operator](https://github.com/openshift/insights-operator/tree/14d32dcb8c54eba7aeca1cb140167ea81d6799b2) * [Bug 2079315](https://bugzilla.redhat.com/show_bug.cgi?id=2079315): Gather ODF config data (#614) [#614](https://github.com/openshift/insights-operator/pull/614) * [Full changelog](https://github.com/openshift/insights-operator/compare/95961e7113ce179bf1621ac38842cad691d5b870...14d32dcb8c54eba7aeca1cb140167ea81d6799b2) oc version --client Client Version: 4.11.0-202204270610.p0.g9b7fe72.assembly.stream-9b7fe72 Kustomize Version: v4.5.4
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:5069