parser icon indicating copy to clipboard operation
parser copied to clipboard

how to reduce the collision probability between different PRs

Open zz-jason opened this issue 5 years ago • 7 comments

Feature Request

Is your feature request related to a problem? Please describe:

Background: Once a PR modifies the parser.y file, it needs to regenerate the parser.go file with goyacc tool.

The problem is, when two or more PRs modify the parser.y file, once one of these PRs get merged, all the others are conflicted with the parser.go file.

Describe the feature you'd like:

reduce the collision probability, let PRs merged faster.

Describe alternatives you've considered:

N/A

Teachability, Documentation, Adoption, Migration Strategy:

N/A

zz-jason avatar Nov 06 '19 03:11 zz-jason

@tiancaiamao @kennytm PTAL if free.

zz-jason avatar Nov 06 '19 03:11 zz-jason

Potential solutions

  1. Configure a bot which automatically do the rebase-and-squash operation, which resolves the conflict by running goyacc.
  2. Configure a bot which performs the merge and resolve conflict by running goyacc; still let human to hit the big green button.
  3. Change to another YACC-compatible parser generator, which the parser.go is merge-friendly (likely very difficult).
  4. Change to a YACC-compatible runtime parser generator, thus getting rid of parser.go.
  5. ...

kennytm avatar Nov 06 '19 06:11 kennytm

2 looks like a good idea, maybe we can provide a "/parser.go" command that calls the make parser.go to resolve conflicts automatically? 3 is difficult 4 is not approachable, because Go module requires repeatable build, so we can't generate code at runtime.

tiancaiamao avatar Nov 08 '19 03:11 tiancaiamao

@zhouqiang-cl How do you think idea 2?

zz-jason avatar Nov 08 '19 11:11 zz-jason

test webhook

zhouqiang-cl avatar Nov 12 '19 07:11 zhouqiang-cl

@zhouqiang-cl How do you think idea 2?

sorry. I don't know what I should do

zhouqiang-cl avatar Nov 12 '19 07:11 zhouqiang-cl

@zhouqiang-cl Ping. Could we raise this again to the EE-team? SIG-DDL can't do anything to fix this, since only you guys can add the bots (web hooks), and also pingcap can't use GitHub Actions.

kennytm avatar Feb 08 '20 19:02 kennytm