You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by "Interrante, John A (GE Research, US)" <in...@research.ge.com> on 2020/11/23 16:34:54 UTC

Rebasing runtime2-2202 on asf/master

Hi devs,

I've merged my pull request and landed the Daffodil C code generator on the "runtime2-2202" development branch.  I squashed my commits to one commit and merged my commit first before trying to rebase runtime2-2202 to get the latest changes in the main branch.  My thinking is that we'll have to continue building out the generator for some period of time before we merge runtime2-2202 into the main branch, so we'll have to figure out how to rebase asf/runtime2-2202 on asf/master and document the process anyway.  However, I've run into trouble with my initial approach and I want to ask for advice and suggestions before I try another approach.

I have a fork of the incubator-daffodil repository in my personal GitHub account (tuxji/incubator-daffodil).  In my clone of that fork, I have "origin" set to my fork and "asf" set to apache/incubator-daffodil.  I ran these commands (more or less) after merging my pull request:

$ git fetch -all  # pull down all the latest asf changes into my clone
$ git switch runtime2-2202  # get latest asf/runtime2-2202 into my clone
$ git switch -c ji/2202-rebase-1  # do my rebasing changes in a new branch
$ git push origin ji/2202-rebase-1  # update my fork
$ git rebase asf/master
<edit and fix conflicts>
$ git rebase -continue  # complete rebase
$ git push origin ji/2202-rebase-1 # update my fork again
<fix a compilation problem found later>
$ git commit -a -no-edit -amend
$ git push -force-with-lease

At this point I had updated my ji/2202-rebase-1 branch to rebase my original commit upon the latest asf/master and this is where I ran into trouble.  I thought I would create a pull request from my fork's ji/2202-rebase-1 branch to the apache repo's runtime2-2202 branch and it would show everyone exactly what the rebase had changed.  The funny thing is that GitHub says my branch has conflicts with the asf/runtime2-2202 branch:

                https://github.com/apache/incubator-daffodil/compare/runtime2-2202...tuxji:ji/2202-rebase-1?expand=1

However, I'd already fixed all the conflicts in my branch, and GitHub says my branch has no conflicts with the asf/master branch:

                https://github.com/apache/incubator-daffodil/compare/master...tuxji:ji/2202-rebase-1?expand=1

GitHub says I can create the pull request anyway, so should I still create the pull request as in the first link above or is there a better way?

John

RE: Rebasing runtime2-2202 on asf/master

Posted by "Interrante, John A (GE Research, US)" <in...@research.ge.com>.
Hi devs,

After receiving two +1's from Mike Beckerle and Steve Lawrence on my PR, I have force-pushed asf/runtime2-2202 to rebase it on the current commits in asf/master.  Anyone who has already checked out the asf/runtime2-2202 branch will need to add the --rebase option to their git pull command (or their .gitconfig file if they want to run pull with rebase = true every time by default).  Doing so will ensure your fork's branch will be updated seamlessly.

$ git status
On branch runtime2-2202
Your branch is up to date with 'asf/runtime2-2202'.

nothing to commit, working tree clean
$ git pull --all --rebase
Fetching origin
Fetching asf
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 1 (delta 0), reused 1 (delta 0), pack-reused 0
Unpacking objects: 100% (1/1), 1.94 KiB | 1.94 MiB/s, done.
From https://github.com/apache/incubator-daffodil
 + 30b793176...0677a7514 runtime2-2202 -> asf/runtime2-2202  (forced update)
First, rewinding head to replay your work on top of it... 
$ git status
On branch runtime2-2202
Your branch is up to date with 'asf/runtime2-2202'.

nothing to commit, working tree clean

As Steve said, let's rebase asf/runtime2-2202 only periodically or when a rebase is needed/planned due to some new feature in master, then send out an email to dev@, wait 72 hours, perform the rebase, and send out an email saying it's been rebased and for people to update their branch.  Also note any open PRs should still remain open and GitHub should do the right thing, although ideally those PRs would be merged before the rebase to avoid any potential issues.

John

-----Original Message-----
From: Interrante, John A (GE Research, US) <in...@research.ge.com> 
Sent: Monday, November 23, 2020 7:15 PM
To: dev@daffodil.apache.org
Subject: EXT: RE: Rebasing runtime2-2202 on asf/master

The merge went fine and everything looked good until I created the merge pull request.  Then GitHub said the apache/incubator-daffodil repository will not allow a merge commit to be created and the asf/runtime2-2202 branch cannot be rebased due to conflicts.  I have decided I will have to skip the formal GitHub pull request mechanism and force-push my rebase of the runtime2-2202 development branch directly to the apache/incubator-daffodil repository after sending an email to the dev list to make sure everyone is okay with the force-push.  I don't want GitHub's pull request mechanism to allow merge commits since doing so might allow someone to accidentally create a PR merge commit on the main branch which we don't want to happen.  

I have verified I can use my SSH key to run "git push --dry-run --force-with-lease asf ji/2202-rebase-1:runtime2-2202" to force-push my rebased branch from my checkout to the apache/incubator-daffodil repository with no problem.  After I get +1 from two other committers on the list, I will remove the "--dry-run" and actually run the force-push.  Likewise, other developers should be able to use "git pull --rebase" to pull down the rebased branch even if they have already pulled the same branch and made changes of their own too (I tried this in my own personal repository a while ago and it appeared to work).

May I have two +1's to force-push the rebased commits?  You can preview the commits in my "merge" pull request (https://github.com/apache/incubator-daffodil/pull/461).

Thanks,
John

-----Original Message-----
From: Beckerle, Mike <mb...@owlcyberdefense.com> 
Sent: Monday, November 23, 2020 1:02 PM
To: dev@daffodil.apache.org
Subject: EXT: Re: Rebasing runtime2-2202 on asf/master

I tried this, checked out runtime2-2202 then git pull asf master. There are like 5 conflicting files, but looks pretty manageable.

I am looking forward to working on runtime2 more soon.



________________________________
From: Interrante, John A (GE Research, US) <in...@research.ge.com>
Sent: Monday, November 23, 2020 10:56:32 AM
To: dev@daffodil.apache.org <de...@daffodil.apache.org>
Subject: RE: Rebasing runtime2-2202 on asf/master

Yes, that makes sense and I believe a merge would actually work.  When I have time later I'll start over, run a git merge asf/master instead of a git rebase asf/master, fix conflicts again, submit a pull request, and it shouldn't have any conflicts this time.

-----Original Message-----
From: Sloane, Brandon <bs...@owlcyberdefense.com>
Sent: Monday, November 23, 2020 11:58 AM
To: dev@daffodil.apache.org
Subject: EXT: Re: Rebasing runtime2-2202 on asf/master

Since runtime2-2202 is such a long-lived branch, it might be worth considering a workflow where we merge master into it instead of rebasing onto master.

Once we are ready to actually put runtime2 into master, we can do a squash+rebase then.

________________________________
From: Interrante, John A (GE Research, US) <in...@research.ge.com>
Sent: Monday, November 23, 2020 11:34 AM
To: dev@daffodil.apache.org <de...@daffodil.apache.org>
Subject: Rebasing runtime2-2202 on asf/master

Hi devs,

I've merged my pull request and landed the Daffodil C code generator on the "runtime2-2202" development branch.  I squashed my commits to one commit and merged my commit first before trying to rebase runtime2-2202 to get the latest changes in the main branch.  My thinking is that we'll have to continue building out the generator for some period of time before we merge runtime2-2202 into the main branch, so we'll have to figure out how to rebase asf/runtime2-2202 on asf/master and document the process anyway.  However, I've run into trouble with my initial approach and I want to ask for advice and suggestions before I try another approach.

I have a fork of the incubator-daffodil repository in my personal GitHub account (tuxji/incubator-daffodil).  In my clone of that fork, I have "origin" set to my fork and "asf" set to apache/incubator-daffodil.  I ran these commands (more or less) after merging my pull request:

$ git fetch -all  # pull down all the latest asf changes into my clone $ git switch runtime2-2202  # get latest asf/runtime2-2202 into my clone $ git switch -c ji/2202-rebase-1  # do my rebasing changes in a new branch $ git push origin ji/2202-rebase-1  # update my fork $ git rebase asf/master <edit and fix conflicts> $ git rebase -continue  # complete rebase $ git push origin ji/2202-rebase-1 # update my fork again <fix a compilation problem found later> $ git commit -a -no-edit -amend $ git push -force-with-lease

At this point I had updated my ji/2202-rebase-1 branch to rebase my original commit upon the latest asf/master and this is where I ran into trouble.  I thought I would create a pull request from my fork's ji/2202-rebase-1 branch to the apache repo's runtime2-2202 branch and it would show everyone exactly what the rebase had changed.  The funny thing is that GitHub says my branch has conflicts with the asf/runtime2-2202 branch:

                https://github.com/apache/incubator-daffodil/compare/runtime2-2202...tuxji:ji/2202-rebase-1?expand=1

However, I'd already fixed all the conflicts in my branch, and GitHub says my branch has no conflicts with the asf/master branch:

                https://github.com/apache/incubator-daffodil/compare/master...tuxji:ji/2202-rebase-1?expand=1

GitHub says I can create the pull request anyway, so should I still create the pull request as in the first link above or is there a better way?

John

RE: Rebasing runtime2-2202 on asf/master

Posted by "Interrante, John A (GE Research, US)" <in...@research.ge.com>.
The merge went fine and everything looked good until I created the merge pull request.  Then GitHub said the apache/incubator-daffodil repository will not allow a merge commit to be created and the asf/runtime2-2202 branch cannot be rebased due to conflicts.  I have decided I will have to skip the formal GitHub pull request mechanism and force-push my rebase of the runtime2-2202 development branch directly to the apache/incubator-daffodil repository after sending an email to the dev list to make sure everyone is okay with the force-push.  I don't want GitHub's pull request mechanism to allow merge commits since doing so might allow someone to accidentally create a PR merge commit on the main branch which we don't want to happen.  

I have verified I can use my SSH key to run "git push --dry-run --force-with-lease asf ji/2202-rebase-1:runtime2-2202" to force-push my rebased branch from my checkout to the apache/incubator-daffodil repository with no problem.  After I get +1 from two other committers on the list, I will remove the "--dry-run" and actually run the force-push.  Likewise, other developers should be able to use "git pull --rebase" to pull down the rebased branch even if they have already pulled the same branch and made changes of their own too (I tried this in my own personal repository a while ago and it appeared to work).

May I have two +1's to force-push the rebased commits?  You can preview the commits in my "merge" pull request (https://github.com/apache/incubator-daffodil/pull/461).

Thanks,
John

-----Original Message-----
From: Beckerle, Mike <mb...@owlcyberdefense.com> 
Sent: Monday, November 23, 2020 1:02 PM
To: dev@daffodil.apache.org
Subject: EXT: Re: Rebasing runtime2-2202 on asf/master

I tried this, checked out runtime2-2202 then git pull asf master. There are like 5 conflicting files, but looks pretty manageable.

I am looking forward to working on runtime2 more soon.



________________________________
From: Interrante, John A (GE Research, US) <in...@research.ge.com>
Sent: Monday, November 23, 2020 10:56:32 AM
To: dev@daffodil.apache.org <de...@daffodil.apache.org>
Subject: RE: Rebasing runtime2-2202 on asf/master

Yes, that makes sense and I believe a merge would actually work.  When I have time later I'll start over, run a git merge asf/master instead of a git rebase asf/master, fix conflicts again, submit a pull request, and it shouldn't have any conflicts this time.

-----Original Message-----
From: Sloane, Brandon <bs...@owlcyberdefense.com>
Sent: Monday, November 23, 2020 11:58 AM
To: dev@daffodil.apache.org
Subject: EXT: Re: Rebasing runtime2-2202 on asf/master

Since runtime2-2202 is such a long-lived branch, it might be worth considering a workflow where we merge master into it instead of rebasing onto master.

Once we are ready to actually put runtime2 into master, we can do a squash+rebase then.

________________________________
From: Interrante, John A (GE Research, US) <in...@research.ge.com>
Sent: Monday, November 23, 2020 11:34 AM
To: dev@daffodil.apache.org <de...@daffodil.apache.org>
Subject: Rebasing runtime2-2202 on asf/master

Hi devs,

I've merged my pull request and landed the Daffodil C code generator on the "runtime2-2202" development branch.  I squashed my commits to one commit and merged my commit first before trying to rebase runtime2-2202 to get the latest changes in the main branch.  My thinking is that we'll have to continue building out the generator for some period of time before we merge runtime2-2202 into the main branch, so we'll have to figure out how to rebase asf/runtime2-2202 on asf/master and document the process anyway.  However, I've run into trouble with my initial approach and I want to ask for advice and suggestions before I try another approach.

I have a fork of the incubator-daffodil repository in my personal GitHub account (tuxji/incubator-daffodil).  In my clone of that fork, I have "origin" set to my fork and "asf" set to apache/incubator-daffodil.  I ran these commands (more or less) after merging my pull request:

$ git fetch -all  # pull down all the latest asf changes into my clone $ git switch runtime2-2202  # get latest asf/runtime2-2202 into my clone $ git switch -c ji/2202-rebase-1  # do my rebasing changes in a new branch $ git push origin ji/2202-rebase-1  # update my fork $ git rebase asf/master <edit and fix conflicts> $ git rebase -continue  # complete rebase $ git push origin ji/2202-rebase-1 # update my fork again <fix a compilation problem found later> $ git commit -a -no-edit -amend $ git push -force-with-lease

At this point I had updated my ji/2202-rebase-1 branch to rebase my original commit upon the latest asf/master and this is where I ran into trouble.  I thought I would create a pull request from my fork's ji/2202-rebase-1 branch to the apache repo's runtime2-2202 branch and it would show everyone exactly what the rebase had changed.  The funny thing is that GitHub says my branch has conflicts with the asf/runtime2-2202 branch:

                https://github.com/apache/incubator-daffodil/compare/runtime2-2202...tuxji:ji/2202-rebase-1?expand=1

However, I'd already fixed all the conflicts in my branch, and GitHub says my branch has no conflicts with the asf/master branch:

                https://github.com/apache/incubator-daffodil/compare/master...tuxji:ji/2202-rebase-1?expand=1

GitHub says I can create the pull request anyway, so should I still create the pull request as in the first link above or is there a better way?

John

Re: Rebasing runtime2-2202 on asf/master

Posted by "Beckerle, Mike" <mb...@owlcyberdefense.com>.
I tried this, checked out runtime2-2202 then git pull asf master. There are like 5 conflicting files, but looks pretty manageable.

I am looking forward to working on runtime2 more soon.



________________________________
From: Interrante, John A (GE Research, US) <in...@research.ge.com>
Sent: Monday, November 23, 2020 10:56:32 AM
To: dev@daffodil.apache.org <de...@daffodil.apache.org>
Subject: RE: Rebasing runtime2-2202 on asf/master

Yes, that makes sense and I believe a merge would actually work.  When I have time later I'll start over, run a git merge asf/master instead of a git rebase asf/master, fix conflicts again, submit a pull request, and it shouldn't have any conflicts this time.

-----Original Message-----
From: Sloane, Brandon <bs...@owlcyberdefense.com>
Sent: Monday, November 23, 2020 11:58 AM
To: dev@daffodil.apache.org
Subject: EXT: Re: Rebasing runtime2-2202 on asf/master

Since runtime2-2202 is such a long-lived branch, it might be worth considering a workflow where we merge master into it instead of rebasing onto master.

Once we are ready to actually put runtime2 into master, we can do a squash+rebase then.

________________________________
From: Interrante, John A (GE Research, US) <in...@research.ge.com>
Sent: Monday, November 23, 2020 11:34 AM
To: dev@daffodil.apache.org <de...@daffodil.apache.org>
Subject: Rebasing runtime2-2202 on asf/master

Hi devs,

I've merged my pull request and landed the Daffodil C code generator on the "runtime2-2202" development branch.  I squashed my commits to one commit and merged my commit first before trying to rebase runtime2-2202 to get the latest changes in the main branch.  My thinking is that we'll have to continue building out the generator for some period of time before we merge runtime2-2202 into the main branch, so we'll have to figure out how to rebase asf/runtime2-2202 on asf/master and document the process anyway.  However, I've run into trouble with my initial approach and I want to ask for advice and suggestions before I try another approach.

I have a fork of the incubator-daffodil repository in my personal GitHub account (tuxji/incubator-daffodil).  In my clone of that fork, I have "origin" set to my fork and "asf" set to apache/incubator-daffodil.  I ran these commands (more or less) after merging my pull request:

$ git fetch -all  # pull down all the latest asf changes into my clone $ git switch runtime2-2202  # get latest asf/runtime2-2202 into my clone $ git switch -c ji/2202-rebase-1  # do my rebasing changes in a new branch $ git push origin ji/2202-rebase-1  # update my fork $ git rebase asf/master <edit and fix conflicts> $ git rebase -continue  # complete rebase $ git push origin ji/2202-rebase-1 # update my fork again <fix a compilation problem found later> $ git commit -a -no-edit -amend $ git push -force-with-lease

At this point I had updated my ji/2202-rebase-1 branch to rebase my original commit upon the latest asf/master and this is where I ran into trouble.  I thought I would create a pull request from my fork's ji/2202-rebase-1 branch to the apache repo's runtime2-2202 branch and it would show everyone exactly what the rebase had changed.  The funny thing is that GitHub says my branch has conflicts with the asf/runtime2-2202 branch:

                https://github.com/apache/incubator-daffodil/compare/runtime2-2202...tuxji:ji/2202-rebase-1?expand=1

However, I'd already fixed all the conflicts in my branch, and GitHub says my branch has no conflicts with the asf/master branch:

                https://github.com/apache/incubator-daffodil/compare/master...tuxji:ji/2202-rebase-1?expand=1

GitHub says I can create the pull request anyway, so should I still create the pull request as in the first link above or is there a better way?

John

RE: Rebasing runtime2-2202 on asf/master

Posted by "Interrante, John A (GE Research, US)" <in...@research.ge.com>.
Yes, that makes sense and I believe a merge would actually work.  When I have time later I'll start over, run a git merge asf/master instead of a git rebase asf/master, fix conflicts again, submit a pull request, and it shouldn't have any conflicts this time.

-----Original Message-----
From: Sloane, Brandon <bs...@owlcyberdefense.com> 
Sent: Monday, November 23, 2020 11:58 AM
To: dev@daffodil.apache.org
Subject: EXT: Re: Rebasing runtime2-2202 on asf/master

Since runtime2-2202 is such a long-lived branch, it might be worth considering a workflow where we merge master into it instead of rebasing onto master.

Once we are ready to actually put runtime2 into master, we can do a squash+rebase then.

________________________________
From: Interrante, John A (GE Research, US) <in...@research.ge.com>
Sent: Monday, November 23, 2020 11:34 AM
To: dev@daffodil.apache.org <de...@daffodil.apache.org>
Subject: Rebasing runtime2-2202 on asf/master

Hi devs,

I've merged my pull request and landed the Daffodil C code generator on the "runtime2-2202" development branch.  I squashed my commits to one commit and merged my commit first before trying to rebase runtime2-2202 to get the latest changes in the main branch.  My thinking is that we'll have to continue building out the generator for some period of time before we merge runtime2-2202 into the main branch, so we'll have to figure out how to rebase asf/runtime2-2202 on asf/master and document the process anyway.  However, I've run into trouble with my initial approach and I want to ask for advice and suggestions before I try another approach.

I have a fork of the incubator-daffodil repository in my personal GitHub account (tuxji/incubator-daffodil).  In my clone of that fork, I have "origin" set to my fork and "asf" set to apache/incubator-daffodil.  I ran these commands (more or less) after merging my pull request:

$ git fetch -all  # pull down all the latest asf changes into my clone $ git switch runtime2-2202  # get latest asf/runtime2-2202 into my clone $ git switch -c ji/2202-rebase-1  # do my rebasing changes in a new branch $ git push origin ji/2202-rebase-1  # update my fork $ git rebase asf/master <edit and fix conflicts> $ git rebase -continue  # complete rebase $ git push origin ji/2202-rebase-1 # update my fork again <fix a compilation problem found later> $ git commit -a -no-edit -amend $ git push -force-with-lease

At this point I had updated my ji/2202-rebase-1 branch to rebase my original commit upon the latest asf/master and this is where I ran into trouble.  I thought I would create a pull request from my fork's ji/2202-rebase-1 branch to the apache repo's runtime2-2202 branch and it would show everyone exactly what the rebase had changed.  The funny thing is that GitHub says my branch has conflicts with the asf/runtime2-2202 branch:

                https://github.com/apache/incubator-daffodil/compare/runtime2-2202...tuxji:ji/2202-rebase-1?expand=1

However, I'd already fixed all the conflicts in my branch, and GitHub says my branch has no conflicts with the asf/master branch:

                https://github.com/apache/incubator-daffodil/compare/master...tuxji:ji/2202-rebase-1?expand=1

GitHub says I can create the pull request anyway, so should I still create the pull request as in the first link above or is there a better way?

John

Re: Rebasing runtime2-2202 on asf/master

Posted by "Sloane, Brandon" <bs...@owlcyberdefense.com>.
Since runtime2-2202 is such a long-lived branch, it might be worth considering a workflow where we merge master into it instead of rebasing onto master.

Once we are ready to actually put runtime2 into master, we can do a squash+rebase then.

________________________________
From: Interrante, John A (GE Research, US) <in...@research.ge.com>
Sent: Monday, November 23, 2020 11:34 AM
To: dev@daffodil.apache.org <de...@daffodil.apache.org>
Subject: Rebasing runtime2-2202 on asf/master

Hi devs,

I've merged my pull request and landed the Daffodil C code generator on the "runtime2-2202" development branch.  I squashed my commits to one commit and merged my commit first before trying to rebase runtime2-2202 to get the latest changes in the main branch.  My thinking is that we'll have to continue building out the generator for some period of time before we merge runtime2-2202 into the main branch, so we'll have to figure out how to rebase asf/runtime2-2202 on asf/master and document the process anyway.  However, I've run into trouble with my initial approach and I want to ask for advice and suggestions before I try another approach.

I have a fork of the incubator-daffodil repository in my personal GitHub account (tuxji/incubator-daffodil).  In my clone of that fork, I have "origin" set to my fork and "asf" set to apache/incubator-daffodil.  I ran these commands (more or less) after merging my pull request:

$ git fetch -all  # pull down all the latest asf changes into my clone
$ git switch runtime2-2202  # get latest asf/runtime2-2202 into my clone
$ git switch -c ji/2202-rebase-1  # do my rebasing changes in a new branch
$ git push origin ji/2202-rebase-1  # update my fork
$ git rebase asf/master
<edit and fix conflicts>
$ git rebase -continue  # complete rebase
$ git push origin ji/2202-rebase-1 # update my fork again
<fix a compilation problem found later>
$ git commit -a -no-edit -amend
$ git push -force-with-lease

At this point I had updated my ji/2202-rebase-1 branch to rebase my original commit upon the latest asf/master and this is where I ran into trouble.  I thought I would create a pull request from my fork's ji/2202-rebase-1 branch to the apache repo's runtime2-2202 branch and it would show everyone exactly what the rebase had changed.  The funny thing is that GitHub says my branch has conflicts with the asf/runtime2-2202 branch:

                https://github.com/apache/incubator-daffodil/compare/runtime2-2202...tuxji:ji/2202-rebase-1?expand=1

However, I'd already fixed all the conflicts in my branch, and GitHub says my branch has no conflicts with the asf/master branch:

                https://github.com/apache/incubator-daffodil/compare/master...tuxji:ji/2202-rebase-1?expand=1

GitHub says I can create the pull request anyway, so should I still create the pull request as in the first link above or is there a better way?

John