Friday, 2022-07-15

*** rlandy|bbl is now known as rlandy|out01:10
*** dviroel|rover|afk is now known as dviroel|rover01:17
*** ysandeep|out is now known as ysandeep01:37
opendevreviewOpenStack Proposal Bot proposed openstack/project-config master: Normalize projects.yaml  https://review.opendev.org/c/openstack/project-config/+/84990902:25
*** ysandeep is now known as ysandeep|afk03:45
*** ysandeep|afk is now known as ysandeep06:16
*** chandankumar is now known as chkumar|rover06:59
opendevreviewdaniel.pawlik proposed openstack/ci-log-processing master: Push container images as latest tag after merge  https://review.opendev.org/c/openstack/ci-log-processing/+/84788007:04
*** akekane_ is now known as abhishekk08:04
*** rlandy|out is now known as rlandy10:31
opendevreviewMerged openstack/project-config master: Normalize projects.yaml  https://review.opendev.org/c/openstack/project-config/+/84990911:22
*** dviroel|rover is now known as dviroel11:28
*** ysandeep is now known as ysandeep|afk11:56
opendevreviewJames Page proposed openstack/project-config master: Add OpenStack K8S charms  https://review.opendev.org/c/openstack/project-config/+/84999612:18
opendevreviewJames Page proposed openstack/project-config master: Add OpenStack K8S charms  https://review.opendev.org/c/openstack/project-config/+/84999612:19
opendevreviewJames Page proposed openstack/project-config master: Add OpenStack K8S charms  https://review.opendev.org/c/openstack/project-config/+/84999612:21
*** dasm|off is now known as dasm|ruck13:33
*** ysandeep|afk is now known as ysandeep14:16
*** blarnath is now known as d34dh0r5315:02
*** dviroel is now known as dviroel|lunch15:16
*** ysandeep is now known as ysandeep|out15:28
*** rlandy is now known as rlandy|brb15:42
*** rlandy|brb is now known as rlandy16:05
dansmithfungi: clarkb: fwiw, I just pushed up another glance patch to a completely unrelated stack of patches and had to --no-thin again16:08
dansmithI was thinking that was just some transient thing about the specific tree I was working on, but I wonder if it's something now out of sync in the repo?16:09
dansmithor my copy maybe?16:09
clarkbdansmith: I believe it is a known problem with jgit. Its been an issue since liek 201216:09
clarkbthe jgit maintainers apparently understand it but fixing it is difficult16:09
clarkbI had a thread with upstream gerrit about the problem a year or two ago aroudn when we added the override to git review16:09
fungiand yeah, it's likely nothing to do with your system, just luck of the draw between the state of the remote branch and your local branch16:10
fungiare both stacks currently based on the same remote branch tip?16:11
fungithat may increase the odds that one hits this if the other does16:11
*** akekane_ is now known as ahishekk16:14
dansmithfungi: meaning are they rebased on master? No, in both cases this has been me stacking a patch on top of another without rebasing the author's version16:16
dansmithclarkb: ack I know it's a known issue with no known solution, I was just saying I was surprised to hit it all of a sudden in two different unrelated patch stacks16:18
clarkbI think its mostly chance unless you're operating on the same dag structures as fungi points out16:19
dansmithI've just not hit this (that I know of before) and then twice in two days seems like long odds, but okay, just wanted to highlight it in case there's something up with glance's repo itself16:20
clarkbwere both changes to glance?16:20
clarkband were both based on the same parent?16:20
dansmiththey were both to glance and no, they were totally unrelated16:22
clarkbok, my hunch is that there is something with how jgit is currently internally modeling the history of glance and that it isn't entirely random as a result16:22
dansmithI mean I guess it's possible they were both rebased on master at the same time, but seems unlikely16:22
clarkbit is my understanding that this issue is largely harmless other than the user needing to push with --no-thin16:23
dansmithyeah, different parents for sure, just checked16:23
dansmithwell, I know, but if something were to get stuck such that everyone has to use the flag for glance forever that would kinda suck16:24
dansmithespecially because I'll just alias it locally for all my pushes :)16:24
clarkbI don't disagree but if the jgit experts have already said fixing this is super difficult for them I don't have a good answer for how I'd fix it16:24
dansmithyeah, not pushing for a fix, just pointing it out16:25
clarkbI just pushed https://review.opendev.org/c/openstack/glance/+/850028 based on glance master and it went through fine. I don't think this is a universal issue thankfully16:26
dansmithyeah, let me rebase that on one of the other parents16:26
dansmithhrm, I can't rebase onto a merge commit I guess16:29
dansmithbah, whatever16:30
fungirebase via the gerrit webui, or locally?16:30
dansmithlocally16:30
fungiif locally using git, you should be able to rebase onto a merge commit without issue16:30
fungii usually do something like `git rebase -i origin/master`16:30
fungi(after remote update of course)16:31
dansmithI'm trying to rebase to the specific commit that is the parent of the one I was having trouble with, which isn't ending up the same16:32
*** dviroel|lunch is now known as dviroel16:32
dansmithbut whatever, it's not a big deal, I'll just keep quiet. it just seemed like an incredible coincidence and wanted to point it out in case there's some corruption going on16:33
fungiahh16:33
fungiand yes, it does seem like an odd coincidence, i agree16:33
clarkbre corruption it is my understanding (and this was based on upstream discussions and its been a year or two so maybe I've got it wrong) that your --no-thin would fail if corruption was the cause16:34
clarkbthe --no-thin succeeding implies it is purely at the negotiation level and not the repo level that the failrue is occuring16:35
dansmithokay16:35
fungialso possible that if you repacked your local repo and then cherry-picked those commits onto a new topic branch the situation would be sufficiently different as to not result in the same exact push16:36
fungisince the cherry-picking would create new commit ids16:37
dansmithyeah, often what I'm trying to do is not disturb the patch underneath me so as not to create conflicts from someone who is also working on their copy of the base patch simulataneously16:37
fungiright16:38
fungiand also that's a lot of effort for what's effectively a known issue16:38
fungijust noting it's how we initially worked around the problem whenever it showed up, until the relationship to thin pushes was discovered16:39
dansmithis it likely to be less of an issue if you're not passing -R (no rebase)? 16:40
dansmithbecause making the default --no-thin when -R is passed might be a nice optimization, which is definitely less frequent than regular review pushes16:40
clarkb-R is largely a noop in modern git-review now16:40
dansmithhow so? if I don't use -R it rebases the base patch every time16:40
dansmith(I mean, assuming master has moved)16:41
clarkbdansmith: the way modern git-review (for like the last 5 years?) should work is it does a local test rebase but then resets to the original state if the rebase succeeds and pushes as is16:41
fungi-R tells git-review not to perform a test rebase. git-review doesn't keep the rebase16:41
clarkbif the rebase fails it bails out then and there and tells you you have a merge conflict you should deal with before pushing16:41
dansmithyou mean it might not push the rebased version up, but still tries the local rebase right?16:41
clarkbdansmith: it should never push the rebased version up. It should only do a test one locally16:42
fungiright, without -R it attempts a rebase and then rolls it back whether it succeeds or fails16:42
fungithe attempted rebase is simply done so that it can warn you whether the change you're asking to propose has a merge conflict16:42
dansmithI'm pretty sure that's not the behavior I see, however it doesn't matter, because when I'm pushing on top of someone else's patch, I'm often doing it because I'm offering them some contribution that is going to iterate from their patch, and so a local rebase *will* hit conflicts quite often16:43
dansmithbut I guess your point is that it shouldn't have any impact on the need for  --no-thin right?16:43
clarkbdansmith: correct it should never affect that as it doesn't chagne what you are pushing16:43
clarkbbasically -R should only be used if you want to push a change with a merge conflict16:43
dansmithI must be running some old version, because I've definitely had it push up a rebased base patch in the last year or so16:44
clarkbdansmith: ime people who run into that are using cherry picks and don't realize that a cherry pick is an auto rebase16:44
dansmithgit-review version 2.2.016:44
clarkbcherry picking changes the timestamp which changes the commit sha and is a common way people get in trouble and then think it is related to git review rebeasing behavior from a decade ago (which it did do then)16:45
fungilooking in the git-review source, if rebase is enabled (not -R) and if force rebase is disabled (not -F) then the undo_rebase() function is called after rebasing16:49
fungiundo_rebase() runs `git reset --hard` to the original head from before the rebase16:50
fungiso if the test rebase sticks around (without passing -F) then that seems like a bug16:50
dansmithokay well maybe I'm misremembering or confusing multiple things that are going on along with historical calcified beliefs, I dunno16:51
fungithe undo_rebase() function itself was last touched in 2013, and the call to it in 2012, so in theory should have worked like that for the past 9-10 years16:52
dansmithwhen I'm augmenting other people16:52
dansmithpeople's patches I do a lot of review -R because I want to give them some stuff, but not rebase their patch either locally or remotely16:52
dansmithand both of the thin problems I had this week were on -R pushes, so I just thought maybe that was more likely to introduce problems with non-matching history, but sounds like not16:53
fungisure. that makes sense. -R is specifically how you tell git-review "yes this may be in merge conflict with the target branch but go ahead and push it anyway"16:53
fungithe --help output from git-review could be a little more clear on that point though, it just says "don't rebase" but fails to explain that it wouldn't automatically push the rebase it's doing anyway16:54
dansmithright, sounds like that needs to be "Don't test for merge conflicts" or "Don't perform a test rebase"16:55
fungithe fact that -R doesn't perform the test rebase actually seems like more of an implementation detail, given the actual use case for it16:55
fungisince the goal is to allow you to push things even if they merge conflict, not specifically to avoid testing for a merge conflict16:56
fungibut if you don't care that there may be a merge conflict, then there's obviously no point in testing for one16:56
dansmithtbh, I really wish that -R was the default, I'm not really sure why it matters.. I assume it's to make sure that what I'm pushing up can be merged against master, but.. that should be my call, IMHO :)16:57
fungiwell, can be merged to whatever branch you're pushing it for, but yes16:57
dansmithwell, right16:57
fungiit's more to let less-experienced contributors know that they'll need to rebase their changes before they can be approved, but that's also something you can toggle in the [gitreview] section of your .git/config if it's annoying16:58
dansmithwell, I'm used to it now, so it's not a big deal16:59
fungii wouldn't expect new contributors to know to explicitly turn on an option that checks for merge conflicts, but we can probably do a much better job of letting seasoned contributors know where to turn it off16:59
dansmithwell, and making it clear what -R actually (is supposed to) mean17:00
fungiyes, i'll have a patch up for that shortly17:00
* dansmith checks his watch17:00
fungiright after my union-mandated tea break, of course! ;)17:02
dansmithlolol17:03
fungidansmith: https://review.opendev.org/850054 Clarify that test rebases are not kept17:29
fungiif you have time, let me know if those edits make sense17:29
fungino rush, obviously17:29
dansmithdone17:31
fungimaybe part of the confusion is that if git-review detects a merge conflict it leaves you in an incomplete rebase so you can fix your merge conflicts, rather than automatically aborting the rebase and expecting you to rerun the rebase yourself. i'm open to ideas on how to make that smoother17:31
dansmithI'm going to pay more attention for the next little while to see if I observe the behavior that I was sure still happens before I opine on that further17:33
dansmithperhaps I'm so muscle-memory'd now that I just don't open the option,17:33
dansmithbut I was sure I had accidentally rebased someone's stack just before the end of 2021 due to forgetting -R17:33
dansmithbut I musta-have dreamed it or rebased locally and forgot, based on what ya'll're saying17:34
dansmith(that's right I can contract a contraction)17:34
fungiwell, by default it will leave you in an incomplete rebase if there's a merge conflict, so it's possible you fixed a change up in that situation. also possible there are bugs. i mean, it's software, so...17:37
fungibut yes, if you do see it do what you described, we definitely consider that incorrect/defective behavior17:38
dansmithI doubt it.. I tend to fear rebases of big stacks, so I would almost certainly abort and then go back and rebase -i it17:38
dansmithbut yeah17:38
clarkbfungi: I left a thought on how you might be more clear about rebase abort behavior17:40
clarkbyes, I tend to git rebase --abort and then  manually restart it myself17:40
dansmithhttps://paste.opendev.org/show/bawnS9EG2zoGc7OyxxLU/17:41
dansmiththis ^ goes against the "it is always aborted" statement right?17:41
fungithough also, git-review is running `git rebase -i` anyway17:42
fungidansmith: yeah, that's what i was getting at with my review comment, in the case of a merge conflict it tells you how to abort and push with the conflict intact instead of fixing it, but doesn't automatically run rebase --abort for you17:43
dansmithack okay17:43
fungiwhich i agree is a hard decision as to which should be the base behavior, since most times a user is probably going to want to fix their merge conflict and push the result, so if git-review does a rebase --abort then they just end up running rebase a second time (which might take a while depending on the repo and the commits)17:45
fungii think the original idea was that not aborting the failed rebase would be the more efficient option, but maybe it's also more confusing at the same time17:46
dansmithI dunno, I just always want to control the rebase myself, knowing exactly what I'm rebasing onto17:46
dansmithso I would just never not abort when some tool said "here, I half-did this for you.. good luck!"17:46
fungiyep, i definitely get that17:47
dansmithand just saying "I couldn't rebase this for you, so check yo'sef" is more consistent with it being a test vs. an intentional rebase17:47
fungii happen to trust it because i know that it actually ran `git rebase -i` (also the output from the tool says that's what it ran), but i understand not trusting that17:47
dansmithbut onto a master commit it just pulled right?17:48
dansmithwhich isn't even my origin/master ref necessarily right?17:48
dansmithlike I assume it does a git fetch from the gerrit remote but if I rebase on my own origin/master right after, it'll change again right?17:48
fungiyes, along the lines of `git remote update && git rebase -i origin/master`17:48
dansmithis it origin or the gerrit remote?17:49
fungiit's gerrit/master in that case so as not to disturb your other remotes17:49
dansmithright, so that's definitely not what I'd be doing if manual17:49
fungiand also because some environments (not ours thankfully) may not keep their gerrit and origin remotes in sync17:49
dansmithright17:49
dansmithsince I'm just as dumb as clarkb thinks I am, I just like to be very deliberate with my rebasing and updating of my origin/master so I don't get confused and have to come here and embarrass myself :)17:50
clarkbfwiw I'm deliberate about it too. I almost always git rebase --abort when git review hits that17:51
fungii'll make the proposed manpage edit better in that regard, and shop around the idea of aborting failed rebases by default (maybe introduce a --keep-rebase option or something)17:51
clarkbthen I update my remotes and rebase by hand17:51
dansmithfungi: to be clear, I don't care if you change it now, it's just not what *I* want the default behavior to be17:52
dansmithhaving my git stuff in my prompt generates a "the right side doesn't look right, better rebase --abort17:52
dansmithknee-jerk reaction :)17:52
clarkbthat prompt stuff is what caused git to do the "does the current user own this repo" check before operating on the repo17:54
clarkbI've since disabled it which is super annoying17:54
clarkbI run git status a lot more now17:55
clarkbbut at least it is deliberate17:55
dansmithyeah, there is just going to have to be some other solution than "don't have git stuff in my prompt"17:59
dansmithlike not running any hooks during show or if the perms don't match or whatever.. 17:59
clarkbya would be nice to see them grow a more limited "safe mode" for stuff like that18:00
clarkbI would definitely make use of it18:00
dansmithyeah18:01
fungi(WIP) https://review.opendev.org/850061 Don't keep incomplete rebase state by default18:29
fungistrawman, so i don't forget18:29
*** tobias-urdin is now known as tobias-urdin_pto19:19
*** dviroel is now known as dviroel|biab20:09
*** dviroel|biab is now known as dviroel21:08
*** dasm|ruck is now known as dasm|off21:37
*** dviroel is now known as dviroel|out21:37

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!