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

[Feature Request] Backports fail often due to CHANGELOG conflicts #15149

Open
jainankitk opened this issue Aug 7, 2024 · 8 comments
Open

[Feature Request] Backports fail often due to CHANGELOG conflicts #15149

jainankitk opened this issue Aug 7, 2024 · 8 comments
Labels
Build Build Tasks/Gradle Plugin, groovy scripts, build tools, Javadoc enforcement. enhancement Enhancement or improvement to existing feature or request

Comments

@jainankitk
Copy link
Collaborator

Is your feature request related to a problem? Please describe

The backport fails for most PR due to conflicts on CHANGELOG.md. I am wondering if there is better way around this.

Describe the solution you'd like

Maybe provide some conflict resolution hints specifically for CHANGELOG.md?

Related component

Build

Describe alternatives you've considered

No response

Additional context

No response

@jainankitk jainankitk added enhancement Enhancement or improvement to existing feature or request untriaged labels Aug 7, 2024
@github-actions github-actions bot added the Build Build Tasks/Gradle Plugin, groovy scripts, build tools, Javadoc enforcement. label Aug 7, 2024
@dblock
Copy link
Member

dblock commented Aug 7, 2024

Good idea. In the case where the diff is a 1-liner, try to apply both by default.

@sandeshkr419
Copy link
Contributor

Agreed @ankitkala on unnecessary blockers caused by this. The most frustrating part is users not able to edit the changelog in UI and then commit it right away. The part where you have to manually checkout the code and raise a manual backport PR is irritating. Also, chances for human errors - what if I mistakenly edit other files.

In the case where the diff is a 1-liner, try to apply both by default.

I think for changelog failures - in CI for backport PRs, we can automate this.

Probably need to trigger something like git-merge-file --union in case of conflicts in changelog, haven't checked the exact usage, but looks like we can edit our CI to do a concatenate in changelog. Also, this can also be a comment command to github-actions to run a script and resolve conflicts, and commit changes.
Reference: https://git-scm.com/docs/git-merge-file

@dblock
Copy link
Member

dblock commented Aug 26, 2024

[Catch All Triage - 1, 2, 3, 4, 5]

@rursprung
Copy link
Contributor

coming from here: #15915 (comment) (CC @reta)

IMHO this isn't just about backports, also normal PRs need to be rebased very regularly due to changelog conflicts. i'm not contributing that often here, but it's somewhat annoying 🙈

quoting what i wrote in the other PR:

i'm a big fan of having a changelog, but it's causing a lot of merge conflicts here 🙁
i've seen another repo (don't remember which, but i have a vague feeling that it was even in the opensearch org?) which had a subfolder where you created one file per PR for the changelog and some automated tooling then collected all of that together and merged it into the main changelog file for the release (and deleted the other files). maybe that might be an idea here as well to avoid the merge conflicts?

as a detail: i guess you could then do the equivalent of CHANGELOG.md and CHANGELOG-3.0.md by having a dedicated folder for the upcoming release and once you're ready to release that you remove the normal folder and rename the one for the upcoming release.

@andrross
Copy link
Member

i've seen another repo (don't remember which, but i have a vague feeling that it was even in the opensearch org?)

@rursprung I suspect you're referring to OpenSearch-Dashboards: https://github.com/opensearch-project/OpenSearch-Dashboards/tree/main/changelogs

Full details about that solution are here. We should definitely look at moving to that approach if it is working well for the dashboards repo.

@dbwiddis
Copy link
Member

Most common problem: Everyone's adding their Change log entry to the bottom of the list. That's why they conflict.

Simple fix: Add your entry in numeric sorting order. If higher numbered PRs have already been merged this will minimize conflicts.

@andrross
Copy link
Member

While somewhat disruptive in the short term, moving to the process implemented by OpenSearch_Changelog_Workflow will completely eliminate these merge conflict problems. OpenSearch-Dashboards is already using that approach. @dbwiddis @jainankitk What do you think?

@dbwiddis
Copy link
Member

While somewhat disruptive in the short term

We can minimize the disruption by timing the switch with a minor version bump.

I'm not clear from that proposal how we handle the 2.x and 3.x sections separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Build Tasks/Gradle Plugin, groovy scripts, build tools, Javadoc enforcement. enhancement Enhancement or improvement to existing feature or request
Projects
None yet
Development

No branches or pull requests

6 participants