Skip to content

feat: barretenberg PR migrate tool#1193

Merged
ludamad merged 1 commit intomasterfrom
ad/barretenberg-monorepo-migrate-pr
Jul 26, 2023
Merged

feat: barretenberg PR migrate tool#1193
ludamad merged 1 commit intomasterfrom
ad/barretenberg-monorepo-migrate-pr

Conversation

@ludamad
Copy link
Collaborator

@ludamad ludamad commented Jul 25, 2023

Description

Originally this was going to be a short video, then I hit edge cases. I went for a script. Hopefully I can do a video in a bit explaining what is needed to know to understand this, but after this it should be a one liner:

./scripts/migrate_barretenberg_branch.sh <barretenberg-branch> "<commit-message>"

There is a fair bit of error handling and recovery advice as this is a cross-repo stitching and thus edge-case prone.
I hit one big gotcha here that is worked around with any such operation briefly doing a git rm <folder>, and git rm updating .gitmodules surprisingly. This gets rid of this diff, which is 'expected' when git submodules interact with git subrepo.
Also it tosses away the .gitrepo changes, as those we only want if pulling from barretenberg master, not PRs (which will go in as aztec commits).

Checklist:

  • [*] I have reviewed my diff in github, line by line.
  • [*] Every change is related to the PR description.
  • [*] I have linked this pull request to the issue(s) that it resolves.
  • [*] There are no unexpected formatting changes, superfluous debug logs, or commented-out code.
  • [*] The branch has been merged or rebased against the head of its merge target.
  • [*] I'm happy for the PR to be merged at the reviewer's next convenience.

@netlify
Copy link

netlify bot commented Jul 25, 2023

Deploy Preview for preeminent-bienenstitch-606ad0 canceled.

Name Link
🔨 Latest commit 3497303
🔍 Latest deploy log https://app.netlify.com/sites/preeminent-bienenstitch-606ad0/deploys/64c043176fc2c50008f919c1

Copy link
Contributor

@codygunton codygunton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used this to create #1195--worked like a charm. Thanks for making this easy.

Copy link
Contributor

@spalladino spalladino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

This is an edge-case gotcha using git submodules along with git-subrepo.

Should we consider moving completely away from submodules, once we get comfortable with subrepo?

@ludamad ludamad merged commit 3b803c9 into master Jul 26, 2023
@ludamad ludamad deleted the ad/barretenberg-monorepo-migrate-pr branch July 26, 2023 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants