*** haleyb is now known as haleyb|away | 01:36 | |
opendevreview | OpenStack Proposal Bot proposed openstack/project-config master: Normalize projects.yaml https://review.opendev.org/c/openstack/project-config/+/897881 | 02:46 |
---|---|---|
opendevreview | Merged openstack/project-config master: Normalize projects.yaml https://review.opendev.org/c/openstack/project-config/+/897881 | 12:59 |
*** d34dh0r5- is now known as d34dh0r53 | 13:05 | |
jproque-dell | Hello there. Is there a documented way to get a commit ID from a patch ID? | 13:53 |
jproque-dell | I tried ssh -p 29418 happystacker@review.opendev.org gerrit query | 13:53 |
jproque-dell | But it denies my public key | 13:53 |
fungi | jproque-dell: is it the same public key you uploaded to your gerrit account settings? | 13:54 |
fungi | jproque-dell: also just to be clear, when you say "patch ID" and "commit ID" what specifically are you referring to? there's the hash of the commit (i suspect this is your "commit ID") but for the "patch ID" there is a unique integer change identifier used in gerrit change urls as well as a Change-ID footer in commit messages which are only guaranteed unique to a project+branch | 13:57 |
fungi | combination | 13:57 |
fungi | if you want to know the Commit-Id you can find it in the commit message already with no need to query gerrit for it. if you want the change number then you can find it in git notes served by gerrit as long as you configure your git client to fetch +refs/notes/*:refs/notes/* from the gerrit remote | 14:00 |
jproque-dell | Yes this is the same key | 14:00 |
jproque-dell | Commit ID is the SHA1 that I can find in the git log command | 14:00 |
*** pmatulis1 is now known as pmatulis | 14:01 | |
jproque-dell | I thought that Patch D was the 6 digits patch ref | 14:02 |
fungi | jproque-dell: this is what you're trying, right? https://paste.opendev.org/show/buJ5dDA6PrJYpz2pCWay/ | 14:02 |
fungi | if you're getting an authentication error, then either the username is wrong, or the ssh key is wrong, or your command is hitting the default ssh port (22/tcp) instead of the one you specified with the -p option | 14:03 |
fungi | adding -vvv to the ssh command will give you some more detail about the authentication your client tried too | 14:04 |
jproque-dell | Absolutely this is what I'm trying | 14:05 |
jproque-dell | My username/key looks correct and I'm hitting the 29418 port | 14:05 |
fungi | jproque-dell: i don't see any indication that the happyhacker account attempted connection to the gerrit's sshd on 29418/tcp. is it possible there's a network device on the network you're connecting from that is intercepting that connection for some reason? | 14:08 |
jproque-dell | let me try again | 14:09 |
fungi | for comparison, i've attempted connecting to that ssh port with an invalid username, and with an invalid key, and in both cases the sshd logs the username i supplied in an auth failure message | 14:09 |
jproque-dell | ok | 14:10 |
fungi | so if your connection is actually getting through to the server, then i should see some mention of your username in the ssh log | 14:10 |
jproque-dell | now it works, It turns out that I completely forgot to specify the port with -p | 14:10 |
jproque-dell | sorry for that | 14:10 |
fungi | that would do it! | 14:10 |
jproque-dell | thanks | 14:10 |
fungi | no worries, happy to help | 14:11 |
fungi | jproque-dell: keep in mind that you can also anonymously query that information through gerrit's rest api, so if you're scripting something that might be an easier approach | 14:11 |
jproque-dell | oh yes | 14:12 |
jproque-dell | understood | 14:12 |
fungi | the documentation link at the top of the page on https://review.opendev.org/ has sections on the rest api and the ssh command line, if you need details | 14:12 |
jproque-dell | last thing, is there an easy way to check if a patch is present in a branch for all branches of a project? | 14:13 |
fungi | jproque-dell: not always, since it will depend on how that patch was added to each branch. by convention, openstack's stable branch backport policy relies on cherry-picking commits from the master branch onto stable branches, so you can check for the presence of the same Change-Id footer in commit messages in each branch's history | 14:15 |
fungi | you can query gerrit by the Change-Id string to get a list of changes which match, and the details should include the branch and whether the change is merged/open/abandoned/et cetera | 14:16 |
jproque-dell | would you mind provide an example? | 14:17 |
fungi | jproque-dell: https://paste.opendev.org/show/bd73LQRFym6lC0WuRu4V/ | 14:18 |
fungi | that returns all changes with a Change-Id of I78b08edfcb8115cddd7de9c6c788c0a57c8218a8 and in each one you can see a branch field as well as a status (new, merged...) | 14:19 |
jproque-dell | oh great nice! | 14:20 |
fungi | don't hesitate to ask if you have other questions | 14:21 |
jproque-dell | I tried on a patch and I hade this result | 14:21 |
jproque-dell | https://paste.opendev.org/show/bMJagYGHDPy6pPTCBJbX/ | 14:21 |
jproque-dell | in that case we have master and Xena? Aren't we supposed to have alle releases from master to Xena? | 14:22 |
fungi | what you're likely seeing there is that the change merged to master and stable/xena before the stable/yoga branch was created, so there was no separate change for stable/yoga because the change that merged to master appeared in the branch history of the commit which was the branch point for stable/yoga (and all later branches) | 14:23 |
fungi | helen proposed two changes with id I5b660776190f3026296d6d3237bd3b0d609f769f: change 778907 to master and then change 816695 to stable/xena | 14:25 |
fungi | change 778907 merged to master before stable/yoga existed, so there was no separate change proposed for the stable/yoga branch | 14:26 |
jproque-dell | ok but it'll be present in all branches between stable/xena and our current master? | 14:29 |
fungi | jproque-dell: in those cases, you can do something like this (though there are a variety of ways to approach the problem): https://paste.opendev.org/show/b2obqHoc3WXGXOVxsqMA/ | 14:29 |
jproque-dell | That's what I did as well, but SHA1 changes when cherry-picking | 14:30 |
fungi | as long as you have an updated checkout of the repository, asking git to tell you what branches contain the commit from the master branch change (i used the -a flag because i don't have those branches checked out) | 14:30 |
fungi | right, use the master branch commit id in that case, to see the branches where the commit was inherited when the branch was created, rather than having been cherry-picked | 14:31 |
fungi | so in your example, commit ee1b5e2b756f49a384d348555e9611526c0c1217 (the master branch commit for I5b660776190f3026296d6d3237bd3b0d609f769f) is in the history of stable/yoga, stable/zed, stable/2023.1, stable/2023.2, and master | 14:33 |
jproque-dell | I took the same patch as an example and the differences I got from the commands don't make sense to me | 14:34 |
jproque-dell | https://paste.opendev.org/show/bkxZ0O3DbAoyd4TLyp0j/ | 14:34 |
fungi | and then there was a separate commit for the backport to stable/xena, which you don't see reported by git branch --contains because the commit id of that cherry-pick differs, which is why looking those up by their Change-Id field is useful, but you need both to get the complete picture | 14:34 |
jproque-dell | ok so have a combination of the two commands is the final solution I guess | 14:36 |
fungi | basically, `git branch -a --contains <master_commit_id>` gives you the branches which were created after the master branch change merged, and `gerrit query <change_id>` gives you the branches to which the same patch was backported | 14:36 |
jproque-dell | ok | 14:36 |
jproque-dell | but why I don't see stable/zed in the query command? | 14:37 |
fungi | because stable/zed was created from master after the change merged to the master branch, it shows up in the git branch --contains list instead | 14:37 |
jproque-dell | hum, still unclear but ok I think I get the picture | 14:38 |
fungi | maybe a timeline would help... | 14:39 |
fungi | 1. stable/xena branched from master | 14:39 |
fungi | 2. a change was proposed to master to fix some bug | 14:39 |
fungi | 3. that change merged to the master branch | 14:39 |
fungi | 3. a backport of the change was created to fix the bug on the existing stable/xena branch | 14:39 |
fungi | er, that was supposed to be 4 | 14:39 |
fungi | 5. the cherry-picked backport change merged to stable/xena | 14:40 |
fungi | 6. the stable/yoga branch was created from master, and inherited the master branch history, including the bug fix which had already merged there | 14:40 |
fungi | 7. the stable/zed branch was created from master, also inheriting the merged commit | 14:41 |
fungi | 8. stable/2023.1 created, same situation... | 14:41 |
jproque-dell | ok I think I need more training and skills on that | 14:41 |
jproque-dell | but thanks | 14:41 |
fungi | put another way, the fix merged to master during the yoga development cycle when there was not yet a stable/yoga branch, and was backported to the existing stable/xena branch. at the conclusion of the yoga development cycle, the stable/yoga branch was created from master and so inherited all the commits which existed in the master branch history | 14:43 |
jproque-dell | a bit more clear thank fungi | 14:44 |
jproque-dell | you were very responsive and helpful | 14:44 |
fungi | later releases (zed, 2023.1, 2023.2) also include that commit in their stable branches because they're created from the master branch as well, where that commit is already in the branch history | 14:44 |
fungi | you're welcome! | 14:45 |
jproque-dell | the thing that confused me is that it doesn't appear in the query command | 14:45 |
fungi | yeah, gerrit query is querying gerrit changes, which basically represent the code review that happened which led to the commit eventually merging | 14:45 |
fungi | the commit which ended up in the stable/yoga branch was reviewed as a change for the master branch, because that occurred during the yoga development cycle when the master branch represented the state of the future yoga release | 14:46 |
jproque-dell | thank you so much! | 14:47 |
fungi | jproque-dell: if it helps, this is a crude diagram of what the release and branching for openstack projects looks like: https://paste.opendev.org/show/bc0aOdtjAGq4lK3ySlnr/ | 14:53 |
fungi | that may help provide some context | 14:53 |
jproque-dell | thank you | 14:55 |
*** haleyb|away is now known as haleyb|out | 15:05 | |
opendevreview | Jan Marchel proposed openstack/project-config master: Add NebulOuS repos: exn and gui https://review.opendev.org/c/openstack/project-config/+/898023 | 20:29 |
opendevreview | Jan Marchel proposed openstack/project-config master: Add NebulOuS repos: exn and gui https://review.opendev.org/c/openstack/project-config/+/898023 | 20:37 |
opendevreview | Jan Marchel proposed openstack/project-config master: Add NebulOuS repos: exn and gui https://review.opendev.org/c/openstack/project-config/+/898023 | 21:00 |
opendevreview | Jan Marchel proposed openstack/project-config master: Add NebulOuS repos: exn and gui https://review.opendev.org/c/openstack/project-config/+/898023 | 21:11 |
opendevreview | Jan Marchel proposed openstack/project-config master: Add NebulOuS repos: exn and gui https://review.opendev.org/c/openstack/project-config/+/898023 | 21:29 |
opendevreview | Ghanshyam proposed openstack/project-config master: End gate and update acl for retiring js-openstack-lib https://review.opendev.org/c/openstack/project-config/+/898015 | 21:58 |
opendevreview | Jan Marchel proposed openstack/project-config master: Add NebulOuS repos: exn and gui https://review.opendev.org/c/openstack/project-config/+/898023 | 22:12 |
-opendevstatus- NOTICE: Another short Gerrit outage for updates on review.opendev.org. This update ensures we are using the current versions of all Gerrit plugins. | 23:46 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!