Skip to content
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

cmd/cueckoo: track original commit we import #33

Open
myitcv opened this issue Mar 16, 2023 · 1 comment
Open

cmd/cueckoo: track original commit we import #33

myitcv opened this issue Mar 16, 2023 · 1 comment

Comments

@myitcv
Copy link
Member

myitcv commented Mar 16, 2023

Right now, an import performs a couple of commit rewrites (altering the commit message only) which by definition means we find ourselves with a different commit hash in Gerrit to that sitting in GitHub. We cannot avoid this. However, we should track somewhere the original commit hash for reference, but also to help debug situations where there is a race condition on someone force pushing a commit to a PR at around the time the import is being performed (this has happened).

One additional/alternative measure here would be to have cmd/cueckoo importpr write a message to the PR at the time the PR is imported, including the commit hash that was imported as well as the resulting change ID. This does not totally prevent a race condition, but would greatly help the debugging.

cc @mvdan FYI.

myitcv added a commit that referenced this issue Mar 16, 2023
When we import a PR from GitHub we immediately lose track of the
original commit sha because of necessary commit message rewriting.
Currently this means we have no easy way of anyone tracking exactly what
was imported.

Per a suggestion from @mvdan, we can simply add this to the "Closes"
message for now, and later consider writing a message back to the PR
from which we are importing with more information.

For #33.
myitcv added a commit that referenced this issue Mar 16, 2023
When we import a PR from GitHub we immediately lose track of the
original commit sha because of necessary commit message rewriting.
Currently this means we have no easy way of anyone tracking exactly what
was imported.

Per a suggestion from @mvdan, we can simply add this to the "Closes"
message for now, and later consider writing a message back to the PR
from which we are importing with more information.

For #33.
mvdan pushed a commit that referenced this issue Mar 16, 2023
When we import a PR from GitHub we immediately lose track of the
original commit sha because of necessary commit message rewriting.
Currently this means we have no easy way of anyone tracking exactly what
was imported.

Per a suggestion from @mvdan, we can simply add this to the "Closes"
message for now, and later consider writing a message back to the PR
from which we are importing with more information.

For #33.
@myitcv
Copy link
Member Author

myitcv commented Mar 22, 2023

fa87e85 adds the short commit hash to "Closes" for importpr. Will leave this open in case we feel like adding the writing of a PR comment at the point of import.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant