nestauk / daps_utils

Tools for setting up and running pipelines in a Data Analytics and Production System (DAPS).
0 stars 1 forks source link

Action to resolve `VERSION` merge conflicts on all active PRs #79

Closed jaklinger closed 3 years ago

jaklinger commented 3 years ago

After every merge to dev all other active PRs end up with a conflicted VERSION (between the feature head and dev). To resolve this we can implement an action which:

bishax commented 3 years ago

I'd argue that solving a simple merge conflict is less hassle than the following situation:

jaklinger commented 3 years ago

@jooh see Alex's comment (we were discussing this)

Yeah, those are fair points @bishax, in which case a git hook (post commit?) would actually be a better option since it would keep the committer in the loop, and "manually" triggering it would simply be a case of triggering an empty commit.

jooh commented 3 years ago

On further research it it seems a better way to handle this is with a merge driver, which basically would ensure that conflicts for this specific file are always resolved with --ours.

Is there any scenario in which you don't want to resolve merges in this way automatically? Would you ever need to commit to the repo without changing VERSION?

jaklinger commented 3 years ago

If anything, we would want to take that option out of the developers hands all together so the merge driver sounds like the perfect solution, and very very lightweight

jaklinger commented 3 years ago

(and for that specific file it should only ever be ours since the intention of the version is to match the code version to feature branch in question)

jooh commented 3 years ago

I have a prototype for this now. It should be implemented as a PR on ojd_daps right?

jaklinger commented 3 years ago

Both here and there actually, thanks!