Wednesday, 2023-10-11

*** haleyb is now known as haleyb|away01:36
opendevreviewOpenStack Proposal Bot proposed openstack/project-config master: Normalize projects.yaml  https://review.opendev.org/c/openstack/project-config/+/89788102:46
opendevreviewMerged openstack/project-config master: Normalize projects.yaml  https://review.opendev.org/c/openstack/project-config/+/89788112:59
*** d34dh0r5- is now known as d34dh0r5313:05
jproque-dellHello there. Is there a documented way to get a commit ID from a patch ID?13:53
jproque-dellI tried ssh -p 29418 happystacker@review.opendev.org gerrit query13:53
jproque-dellBut it denies my public key13:53
fungijproque-dell: is it the same public key you uploaded to your gerrit account settings?13:54
fungijproque-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+branch13:57
fungicombination13:57
fungiif 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 remote14:00
jproque-dellYes this is the same key14:00
jproque-dellCommit ID is the SHA1 that I can find in the git log command14:00
*** pmatulis1 is now known as pmatulis14:01
jproque-dellI thought that Patch D was the 6 digits patch ref14:02
fungijproque-dell: this is what you're trying, right? https://paste.opendev.org/show/buJ5dDA6PrJYpz2pCWay/14:02
fungiif 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 option14:03
fungiadding -vvv to the ssh command will give you some more detail about the authentication your client tried too14:04
jproque-dellAbsolutely this is what I'm trying14:05
jproque-dellMy username/key looks correct and I'm hitting the 29418 port14:05
fungijproque-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-delllet me try again14:09
fungifor 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 message14:09
jproque-dellok 14:10
fungiso if your connection is actually getting through to the server, then i should see some mention of your username in the ssh log14:10
jproque-dellnow it works, It turns out that I completely forgot to specify the port with -p14:10
jproque-dellsorry for that14:10
fungithat would do it!14:10
jproque-dellthanks14:10
fungino worries, happy to help14:11
fungijproque-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 approach14:11
jproque-delloh yes14:12
jproque-dellunderstood14:12
fungithe 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 details14:12
jproque-delllast thing, is there an easy way to check if a patch is present in a branch for all branches of a project?14:13
fungijproque-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 history14:15
fungiyou 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 cetera14:16
jproque-dellwould you mind provide an example?14:17
fungijproque-dell: https://paste.opendev.org/show/bd73LQRFym6lC0WuRu4V/14:18
fungithat 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-delloh great nice!14:20
fungidon't hesitate to ask if you have other questions14:21
jproque-dellI tried on a patch and I hade this result14:21
jproque-dellhttps://paste.opendev.org/show/bMJagYGHDPy6pPTCBJbX/14:21
jproque-dellin that case we have master and Xena? Aren't we supposed to have alle releases from master to Xena?14:22
fungiwhat 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
fungihelen proposed two changes with id I5b660776190f3026296d6d3237bd3b0d609f769f: change 778907 to master and then change 816695 to stable/xena14:25
fungichange 778907 merged to master before stable/yoga existed, so there was no separate change proposed for the stable/yoga branch14:26
jproque-dellok but it'll be present in all branches between stable/xena and our current master?14:29
fungijproque-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-dellThat's what I did as well, but SHA1 changes when cherry-picking14:30
fungias 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
fungiright, 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-picked14:31
fungiso 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 master14:33
jproque-dellI took the same patch as an example and the differences I got from the commands don't make sense to me14:34
jproque-dellhttps://paste.opendev.org/show/bkxZ0O3DbAoyd4TLyp0j/14:34
fungiand 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 picture14:34
jproque-dellok so have a combination of the two commands is the final solution I guess14:36
fungibasically, `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 backported14:36
jproque-dellok 14:36
jproque-dellbut why I don't see stable/zed in the query command?14:37
fungibecause stable/zed was created from master after the change merged to the master branch, it shows up in the git branch --contains list instead14:37
jproque-dellhum, still unclear but ok I think I get the picture14:38
fungimaybe a timeline would help...14:39
fungi1. stable/xena branched from master14:39
fungi2. a change was proposed to master to fix some bug14:39
fungi3. that change merged to the master branch14:39
fungi3. a backport of the change was created to fix the bug on the existing stable/xena branch14:39
fungier, that was supposed to be 414:39
fungi5. the cherry-picked backport change merged to stable/xena14:40
fungi6. the stable/yoga branch was created from master, and inherited the master branch history, including the bug fix which had already merged there14:40
fungi7. the stable/zed branch was created from master, also inheriting the merged commit14:41
fungi8. stable/2023.1 created, same situation...14:41
jproque-dellok I think I need more training and skills on that14:41
jproque-dellbut thanks14:41
fungiput 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 history14:43
jproque-della bit more clear thank fungi14:44
jproque-dellyou were very responsive and helpful14:44
fungilater 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 history14:44
fungiyou're welcome!14:45
jproque-dellthe thing that confused me is that it doesn't appear in the query command14:45
fungiyeah, gerrit query is querying gerrit changes, which basically represent the code review that happened which led to the commit eventually merging14:45
fungithe 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 release14:46
jproque-dellthank you so much!14:47
fungijproque-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
fungithat may help provide some context14:53
jproque-dellthank you14:55
*** haleyb|away is now known as haleyb|out15:05
opendevreviewJan Marchel proposed openstack/project-config master: Add NebulOuS repos: exn and gui  https://review.opendev.org/c/openstack/project-config/+/89802320:29
opendevreviewJan Marchel proposed openstack/project-config master: Add NebulOuS repos: exn and gui  https://review.opendev.org/c/openstack/project-config/+/89802320:37
opendevreviewJan Marchel proposed openstack/project-config master: Add NebulOuS repos: exn and gui  https://review.opendev.org/c/openstack/project-config/+/89802321:00
opendevreviewJan Marchel proposed openstack/project-config master: Add NebulOuS repos: exn and gui  https://review.opendev.org/c/openstack/project-config/+/89802321:11
opendevreviewJan Marchel proposed openstack/project-config master: Add NebulOuS repos: exn and gui  https://review.opendev.org/c/openstack/project-config/+/89802321:29
opendevreviewGhanshyam proposed openstack/project-config master: End gate and update acl for retiring js-openstack-lib  https://review.opendev.org/c/openstack/project-config/+/89801521:58
opendevreviewJan Marchel proposed openstack/project-config master: Add NebulOuS repos: exn and gui  https://review.opendev.org/c/openstack/project-config/+/89802322: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/!