Code Monkey home page Code Monkey logo

Comments (21)

jeff-mccoy avatar jeff-mccoy commented on May 23, 2024 3

Okay I think if @RothAndrew concurs we'll proceed.

from zarf.

jeff-mccoy avatar jeff-mccoy commented on May 23, 2024 1

I think so but let's wait post-merge of the big pr because I don't want to know what a force push will do to the rebasing on that branch.

from zarf.

YrrepNoj avatar YrrepNoj commented on May 23, 2024 1

I'm not worried about in-progress branches with this approach. git rebase -i is simple enough and we can use git rerere if there are early conflicts with the rebase.

I think I need a little more info to understand what you mean by rewriting the old branches to fix the partially verified commits.

Either way, I think this is the best approach and something we should get out of the way sooner than later.

from zarf.

jeff-mccoy avatar jeff-mccoy commented on May 23, 2024 1

That's a speculation on partially verified. What I was trying to say is that partially verified issue exists already and this branch doesn't immediately fix that. It has to do with how GitHub is evaluating PRs associated with a commit. This is not a git thing, this branch fixes the git signature issue properly. But GitHub has some magic it does for PRs tagged in a commit, if you click on one you'll see that's what's breaking.

from zarf.

RothAndrew avatar RothAndrew commented on May 23, 2024 1

LGTM

from zarf.

RothAndrew avatar RothAndrew commented on May 23, 2024 1

LGTM

from zarf.

RothAndrew avatar RothAndrew commented on May 23, 2024

@jeff-mccoy is this still something we need to do? If so is it something you have to do or can one of us do it with a little guidance?

from zarf.

RothAndrew avatar RothAndrew commented on May 23, 2024

Assigning @jeff-mccoy since I believe he is specifically the person that needs to do this.

from zarf.

jeff-mccoy avatar jeff-mccoy commented on May 23, 2024

I think you do too 😂, but thanks I'll do mine.

from zarf.

RothAndrew avatar RothAndrew commented on May 23, 2024

Oh? I'm not aware of me needing to do anything. AFAIK I've been doing signed commits since I started in August since we turned on the requirement right around that time. I think this is to go back and sign old commits prior to August, which would have just been you and Josh

from zarf.

jeff-mccoy avatar jeff-mccoy commented on May 23, 2024

there are 4 commits at the beginning from Josh, initially we had two separate repos working similar problems, pushed everything to his repo so we could work together, but they ended up moving to another project instead. There's actually no code left from that initial work he pushed so not sure if we need to have him sign it or just squash it. I have most of the missing sigs early on, but you have some too: https://github.com/defenseunicorns/zarf/commits?after=acd5dc445c5131a7afd39ec7acbde8d308d27caa+34&author=RothAndrew

Screen Shot 2022-02-04 at 5 51 29 PM

from zarf.

RothAndrew avatar RothAndrew commented on May 23, 2024

Gotcha. I'll go take a look at those. https://superuser.com/a/1123928 is still the right way to do it? We'll have to turn off the branch protection on master to force push to it.

from zarf.

RothAndrew avatar RothAndrew commented on May 23, 2024

We could, like, not do it at all 😜 . Force pushing to change history always gives me the willies.

from zarf.

jeff-mccoy avatar jeff-mccoy commented on May 23, 2024

Nice...but no we need proper attribution of code in the repo.

from zarf.

jeff-mccoy avatar jeff-mccoy commented on May 23, 2024

Okay now that we had to do a force-push tonight to get #237 merged without breaking it's signatures, I think this is the right time to also fix this issues to avoid another force-push in the future. I’ve experimented with different ways to do this and think that using git rebase --signoff is the most logic choice. Basically every method causes some sort of rewrite, but this preserves the author, message, contents and timestamp for the commits, it's also a built-in feature of git. Some more notes on this can be found at https://stackoverflow.com/a/1962112/467373.

I used the command git rebase --signoff --root --committer-date-is-author-date -s recursive -X ours and then made a final commit to fix some small README.MD merge messiness (there were dozens of merge conflicts within that file for some reason on rebase).

You can see at the master-signature-test that this actually annotated every commit all the way back to the first one so now all have a verified signature.

I did see that some merge-ceptions that say partially verified, but I think we'd have to go and rewrite those old branches to fix that issue as the secondary PRs themselves have unverified commits somehow.

Before:
Screen Shot 2022-02-08 at 2 03 21 AM

After:
Screen Shot 2022-02-08 at 2 03 24 AM

Github:
Screen Shot 2022-02-08 at 3 29 00 AM

from zarf.

jeff-mccoy avatar jeff-mccoy commented on May 23, 2024

I should also mention even though this will rewrite history and all hashes, moving in-progress branches isn't super hard, just need to use reset soft + stash to move the affected files. The hardest part would be if you had a lot of commits ahead and you wanted to preserve them with messages, you'd have to do the same process but one reset/stash per commit.

from zarf.

jeff-mccoy avatar jeff-mccoy commented on May 23, 2024

Confirmed with @RothAndrew @YrrepNoj and @mike-winberry, proceeding with the force-push

from zarf.

mike-winberry avatar mike-winberry commented on May 23, 2024

LGTM too!

from zarf.

jeff-mccoy avatar jeff-mccoy commented on May 23, 2024

Couple notes on updating master locally that I had to do (alternative could be just reclone or delete local master):

git config pull.rebase true
git pull --force  --allow-unrelated-histories

from zarf.

RothAndrew avatar RothAndrew commented on May 23, 2024

Can we call this backlog item done?

from zarf.

jeff-mccoy avatar jeff-mccoy commented on May 23, 2024

Yeah I guess GitHub didn't know how to auto-close the tagged issue on history rewrite 😂

from zarf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.