I think I got the github web repo set up to use LFS (anyone with existing forks/checkouts will probably have to rebase).
@Sean I don't think I can see the org capacity settings for LFS - if I'm reading the docs right it's actually a 1GB size limit, so I'm not sure how useful that's really going to be...
lets see if it's actually a limit
yea i also read that 1 gb is the limit for lfs for orgs if i remember correctly
I'm just wondering if it's a hard limit. They used to have documented that there was a limit on repos to, but then that turned out to just be documentation, not an actual limit imposed.
it was a soft limit to get communities to at least try to not use too much space, not a limit on orgs that genuinely need to go over
could be a hard limit. easy enough to find out.
Here's 1GB of docs... https://brlcad.org/BRL-CAD_V_and_V_Documentation.7z
is this seriously a 1gb file?
1024172845 bytes, 977M
ooh
nearly all our docs related to verification and validation, official report published, user docs, administrative docs, etc.
@starseeker What's up with all the web repo closures? Some of the ones outstanding needed work while others were conflicting efforts (some that broke others). Did you clean them up?
I didn't deliberately close them - it looks like I may have inadvertently done that while enabling the LFS bits.
Crud.
@Sean I tried to restore the repository to the point before I made changes, but doesn't seem to have allowed me to reopen the pull requests.
They might have to be resubmitted, but the repo history should now again match what's being used in the forks
We'll have to decide what we're going to do about that at some point - it looks like to "properly" migrate the repo to LFS the change is disruptive. Maybe the better thing to do is just make a separate repo for the timeline and other doc heavy content and then have the web repo treat it as a submodule?
I guess the thing to do is post an explanatory note on the closed pull requests so people know to resubmit them?
I doubt people will, super confusing, but maybe. Seems odd that it can't be undone -- this didn't work? https://help.github.jp/enterprise/2.11/user/articles/deleting-and-restoring-branches-in-a-pull-request/
in theory the branch and the commits should still be there
I doubt it because of the way I had to restore.
what do you mean? what'd you do? o.O
yeah, it's saying "this branch has no history in common with BRL-CAD:master" .. so it won't allow them to be reopened
When I did the LFS migration I rewrote part of the Git history - when you pointed out that closed the patches I put back an older forked copy without those changes, but Github doesn't recognize that the old copy is back
oh man
The SHA1s should match again, so the forks will "see" the same repo they forked from, but Github doesn't know that.
My apologies - I should have foreseen that as a possible consequence, but it didn't occur to me
according to the closed pull requests, it does know and sees them as yet another forced push that doesn't match the original
No, those are both from yesterday - the revert push was earlier today
ah, hrm
If you check out one of the forks, and clone the current repo, and look at the SHA1 in the logs, you should see that they match now.
That wiped out the timeline commits of course, but that won't matter - the key point is the history that the forks are using should be back. It's just not a situation the github pull system was designed for.
Can I do that though, or does the submitter need to do it?
I wouldn't think they should need to. The info should be accessible.
looks like you might have to do it locally, commit to a new branch, push that new branch, and then do a PR from the new branch (i.e., recreate it on their behalf).. which is probably as much work as simply cherry picking all their commits and merging properly
Except I thought the pull requests weren't ready to be merged?
man sh!t happens, but that really sucks... there's at least weeks of work in those pull requests.
The work isn't lost
That's an aspect of Git I'm not familiar with, but I can try to grab their patches and submit pull requests.
they were all in different states. some just simply hadn't been reviewed or tested. some had minor conflicts because another pull request made theirs non-automatic. others had undesirable changes mixed in with super desirable changes (like the big front-page cleanup -- it was awesome except it changed the menu not for the better imho)
I'm just leery of screwing something up even worse.
probably safe if you don't use a force flag, no history rewriting... ;)
I still don't even fully understand what happened.. this is not something I've seen before.
Well, let me try one and see - so I do a clone, use gh pr to get the patch, apply it, and then push? Or do I fork to my own account, apply the patch, and submit from my own account?
It's my screw-up, pure and simple.
maybe wait and see if github catches up and lets them be reopened automatically
could be a latent update process that takes time for it to notice and update all caches
I tried to make LFS the default for our PDF files, and before doing that I scrubbed four spam PDFs out of the history so they wouldn't get fossilized in LFS. Then I did a migrate so the big existing PDFs would also be on LFS. Both of those ended up rewriting the history, which broke the SHA1s, which broke the pull requests.
starseeker said:
Well, let me try one and see - so I do a clone, use gh pr to get the patch, apply it, and then push? Or do I fork to my own account, apply the patch, and submit from my own account?
yeah, that I'm not sure about
I didn't save quite an old enough backup, so I had to restore the history from one of the forks - that worked, but may not have saved any internal pull request info github stashed in the repo (if that's what it needs to "restore" the pull requests.)
https://github.com/letsencrypt/website/issues/639
seems to indicate it updates slowly, might be reopenable on a case-by-case given enough time
OK, so give it a week or so looks like?
3 days should be plenty
if it's not by then, I suggest we simply work on cherry-picking all the commits in those half dozen prs to close them out. shouldn't take more than a day I'd hope to review and cull the undesirable bits and merge the rest.
Sounds like a plan, although I'm not skilled enough at web stuff to do those merges with any assurance of a working output...
Or do you mean cherry pick them as branches on the main repo and merge from there?
I mean cherry pick and merge/commit the work (i.e., lets just process the pull requests) ... or alternatively create new PRs with the commits, so it doesn't get lose out-of-sight-out-of-mind.
it's pretty simple to clone out the repo and test from some ~/public_html subdirs, or even clone locally and point firefox. I don't think we have any remaining dynamic bits.
Well, the cute trick doesn't work:
gh pr checkout 37
git push origin HEAD:refs/pull/37/head
! [remote rejected] HEAD -> refs/pull/37/head (deny updating a hidden ref)
error: failed to push some refs to 'git@github.com:BRL-CAD/web.git'
Can't restore the pr that way
what was this all about? git pull origin master --allow-unrelated-histories
might that tell origin to allow them?
That will pull the upstream into a locally altered copy of the repository, even though the local SHA1s don't have anything to do with the upstream
"push" would try to send something back to origin, but I did that accidentally once working with my local cad conversion tests - it really made a mess
@Sean Will this work? https://github.com/BRL-CAD/web/pull/50
Doesn't re-create the comment history in the pull request, but if We link to the closed PR in the comment everything's still tied together.
If that's acceptable that's not too hard to do, and should restore all of them - it'll show them coming from my account, but it looks like the commits are all correctly attributed to their actual author.
Main problem would be if there is more work done by the original authors in their downstream forks - in that case they'd still need to make a new pull request.
@Sean I think I've got everything resubmitted as pull requests
okay, thank for the reparo .. I really need to spend a day merging outstanding requests soon. :/
/me nods. At some point we also need to decide what to do about LFS and scrubbing out spam files from the history (this time with an awareness of the consequences). Even with the pull requests closed cleaning that up will still inevitably diverge the repo from external forks regardless - people will need to "re-fork" and rebase. We might be able to turn on LFS just for files going forward, but when I tried that each clone operation printed out a list of files that matched the LFS filters that hadn't been migrated (harmless but rather annoying). Even if we did that though, it still would leave the spam files in the existing repo history.
Also, do we want to consider using submodules for specific pieces of the website (like the timeline) so we can alter portions of the site more radically without disturbing the full history?
Last updated: Jan 09 2025 at 00:46 UTC