-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected merge importing a pull request #104
Comments
Looking at the git history for the generated project, I see
Looking at the two tips of the commit history:
which is the state of my SoT, and
and the merge:
It's almost like the |
One thing to note when running this again with
Not sure if that's related though... |
Hi Oscar,
Sorry for the late reply.
The reason is a conflict with the labels because this is git to git (we
haven't used this much, we almost always use it for non-git to/from git).
The way to fix it is for your CHANGE_REQUEST workflow use:
destination = git.destination(
url = "https://github.com/ob/cb-sot",
fetch = "master",
integrates = [],
),
The default for integrates is to do a merge with the change
from COPYBARA_INTEGRATE_REVIEW. But in this case it is the change that we
are importing itself.
Note that integrates = [], should only be set in the CHANGE_REQUEST
one. The one from cb-sot -> cb-sot-public should rely on the default (and
have the same expose label).
…On Thu, Nov 14, 2019 at 5:29 PM Oscar Bonilla ***@***.***> wrote:
One thing to note when running this again with -v and reading the logs is
this:
Executing [git '--git-dir=/Users/obonilla/copybara/cache/git_repos/https%3A%2F%2Fgithub%2Ecom%2Fob%2Fcb-sot%2Egit' '--work-tree=/Users/obonilla/copybara/temp/workdir606592250108702709/checkout' merge-base d0b3be83ebc842c8dd6feae051391d7a82adf9b8 21171d13a57703bae681c45dd57b2e76bffb1ab5]
Command 'git' finished in 00:00.011. Process exited with status 1
Not sure if that's related though...
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#104?email_source=notifications&email_token=AAHJWQCPEE2WYM2K7276EYTQTXGK3A5CNFSM4JLJ6XHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEDQ6FI#issuecomment-554110741>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHJWQDUUBDOYPCKZOV2RJ3QTXGK3ANCNFSM4JLJ6XHA>
.
|
No worries Mikel…
Maybe I’m not understanding the flow then. I tried adding the `integrates` attribute, and as you said, it fixed the merge problem but I’m not getting the behavior I expect.
What I’m trying to do is set up a workflow where I have an internal private git repo and an external public git repo. The private one has more than just the piece I’m moving to the public one, thus the `core.move()` calls.
The flow I want is an initial export of the history with some cleanups. Then the public one should become the SoT and the internal one would be more of a testing ground for public PRs.
Does that make sense? I’m having trouble understanding all the labels and attributes in the workflows and what they mean :-)
Thanks for your help!
… On Nov 14, 2019, at 8:02 PM, Mikel Alcon ***@***.***> wrote:
Hi Oscar,
Sorry for the late reply.
The reason is a conflict with the labels because this is git to git (we
haven't used this much, we almost always use it for non-git to/from git).
The way to fix it is for your CHANGE_REQUEST workflow use:
destination = git.destination(
url = "https://github.com/ob/cb-sot",
fetch = "master",
integrates = [],
),
The default for integrates is to do a merge with the change
from COPYBARA_INTEGRATE_REVIEW. But in this case it is the change that we
are importing itself.
Note that integrates = [], should only be set in the CHANGE_REQUEST
one. The one from cb-sot -> cb-sot-public should rely on the default (and
have the same expose label).
On Thu, Nov 14, 2019 at 5:29 PM Oscar Bonilla ***@***.***>
wrote:
> One thing to note when running this again with -v and reading the logs is
> this:
>
> Executing [git '--git-dir=/Users/obonilla/copybara/cache/git_repos/https%3A%2F%2Fgithub%2Ecom%2Fob%2Fcb-sot%2Egit' '--work-tree=/Users/obonilla/copybara/temp/workdir606592250108702709/checkout' merge-base d0b3be83ebc842c8dd6feae051391d7a82adf9b8 21171d13a57703bae681c45dd57b2e76bffb1ab5]
> Command 'git' finished in 00:00.011. Process exited with status 1
>
> Not sure if that's related though...
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#104?email_source=notifications&email_token=AAHJWQCPEE2WYM2K7276EYTQTXGK3A5CNFSM4JLJ6XHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEDQ6FI#issuecomment-554110741>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAHJWQDUUBDOYPCKZOV2RJ3QTXGK3ANCNFSM4JLJ6XHA>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I see. Forget about the integrates then. For some reason I though your SoT
was the private repo.
Then you wouldn't need to use a CHANGE_REQUEST workflow (For now).
This is what I would setup:
1. One workflow from private -> public in ITERATIVE mode. You probably want
to use --ignore-noop. Throw away this workflow once the initial import is
done.
2. Once you have public ready, make public SoT (For public part of the repo)
3. Create an ITERATIVE or SQUASH workflow from public -> private.
git.origin -> git.destination. This will be in charge of importing
submitted code internally.
At this point you can work in the external repo and periodically import to
the internal repo. Now presubmits:
*Checking that external changes don't break internal:*
4. Configure an external -> internal workflow with mode
CHANGE_REQUEST_FROM_SOT. This will be git.github_pr_origin to
git.github_pr_destination. Don't merge this prs, use them for testing only
(we can do something about this later).
*Checking that internal changes don't break external and do changes to
external from internal:*
5. Configure an internal to external workflow using CHANGE_REQUEST mode.
use git.github_pr_origin to git.github_pr_destination. You don't submit in
the the internal repo. You merge/submit in the destination (External).
For 5) sometimes you need to do an incompatible change that needs to change
internal an external. You can chose between breaking the internal repo
temporarily or (What we usually do) when doing an import from step 3),
manually add the pending incompatible commits from internal.
I hope it helps!
On Fri, Nov 15, 2019 at 12:41 PM Oscar Bonilla <notifications@github.com>
wrote:
… No worries Mikel…
Maybe I’m not understanding the flow then. I tried adding the `integrates`
attribute, and as you said, it fixed the merge problem but I’m not getting
the behavior I expect.
What I’m trying to do is set up a workflow where I have an internal
private git repo and an external public git repo. The private one has more
than just the piece I’m moving to the public one, thus the `core.move()`
calls.
The flow I want is an initial export of the history with some cleanups.
Then the public one should become the SoT and the internal one would be
more of a testing ground for public PRs.
Does that make sense? I’m having trouble understanding all the labels and
attributes in the workflows and what they mean :-)
Thanks for your help!
> On Nov 14, 2019, at 8:02 PM, Mikel Alcon ***@***.***>
wrote:
>
> Hi Oscar,
>
> Sorry for the late reply.
>
> The reason is a conflict with the labels because this is git to git (we
> haven't used this much, we almost always use it for non-git to/from git).
>
> The way to fix it is for your CHANGE_REQUEST workflow use:
>
> destination = git.destination(
> url = "https://github.com/ob/cb-sot",
> fetch = "master",
> integrates = [],
> ),
>
> The default for integrates is to do a merge with the change
> from COPYBARA_INTEGRATE_REVIEW. But in this case it is the change that we
> are importing itself.
>
> Note that integrates = [], should only be set in the CHANGE_REQUEST
> one. The one from cb-sot -> cb-sot-public should rely on the default (and
> have the same expose label).
>
> On Thu, Nov 14, 2019 at 5:29 PM Oscar Bonilla ***@***.***>
> wrote:
>
> > One thing to note when running this again with -v and reading the logs
is
> > this:
> >
> > Executing [git
'--git-dir=/Users/obonilla/copybara/cache/git_repos/https%3A%2F%2Fgithub%2Ecom%2Fob%2Fcb-sot%2Egit'
'--work-tree=/Users/obonilla/copybara/temp/workdir606592250108702709/checkout'
merge-base d0b3be83ebc842c8dd6feae051391d7a82adf9b8
21171d13a57703bae681c45dd57b2e76bffb1ab5]
> > Command 'git' finished in 00:00.011. Process exited with status 1
> >
> > Not sure if that's related though...
> >
> > —
> > You are receiving this because you are subscribed to this thread.
> > Reply to this email directly, view it on GitHub
> > <
#104?email_source=notifications&email_token=AAHJWQCPEE2WYM2K7276EYTQTXGK3A5CNFSM4JLJ6XHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEDQ6FI#issuecomment-554110741
>,
> > or unsubscribe
> > <
https://github.com/notifications/unsubscribe-auth/AAHJWQDUUBDOYPCKZOV2RJ3QTXGK3ANCNFSM4JLJ6XHA
>
> > .
> >
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub, or unsubscribe.
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#104?email_source=notifications&email_token=AAHJWQB44YEN7A7WZULKWGDQT3NLRA5CNFSM4JLJ6XHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEGFTZA#issuecomment-554457572>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHJWQDAK6722BMUGK64PO3QT3NLRANCNFSM4JLJ6XHA>
.
|
Hi Oscar, did it work for you? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When trying to import a pull request using the workflow:
I get:
However, that pull request didn't change the
.gitignore
file so I didn't expect this to be a problem.SoT repo: https://github.com/ob/cb-sot, exported repo: https://github.com/ob/cb-sot-public, PR that I'm trying to import: https://github.com/ob/cb-sot-public/pull/1
I don't see why Copybara is trying to merge the two
.gitignore
files, are they treated specially by globs?The text was updated successfully, but these errors were encountered: