opensearch-project / OpenSearch

🔎 Open source distributed and RESTful search engine.
https://opensearch.org/docs/latest/opensearch/index/
Apache License 2.0
9.88k stars 1.84k forks source link

[Feature Request] Configure rebasing strategy for dependabot created PRs #16099

Open sandeshkr419 opened 2 months ago

sandeshkr419 commented 2 months ago

Is your feature request related to a problem? Please describe

Majorly with version upgrades, the PR becomes stale and a maintainer needs to manually trigger @dependabot recreate to recreate the PR. Also, with backport PRs the major concerns are with resolving merge conflicts manually because of the tagret/source branch are out of sync.

Describe the solution you'd like

Configuring up rebase-strategy in these cases can help reduce the manual involvement and dependency on maintainers to rebase changes.

Related component

Build

Describe alternatives you've considered

Can use default configuration which is rebase-strategy: auto. Also, can configure it to reduce the frequency of rebasing.

Not sure if we can do the same with opensearch-trigger-bot or not. Presently, as of 9/26, we have 20 open PRs from both these bots combined.

Additional context

This can potentially help us move version upgrades & backport PRs move a lot faster and will certainly reduce the backlog we have built with so many version upgrade languishing PRs.

prateekrai1 commented 2 months ago

Can I take up this issue?

sandeshkr419 commented 2 months ago

That would be great @prateekrai1 - please feel free to jot down your ideas here or/and open up a (draft) PR to discuss if you have something that would solve the issue. I'll assign the issue to you for now.

prateekrai1 commented 2 months ago

Hello @sandeshkr419, I have raised PR . Can you please review it and let me know?

jainankitk commented 1 month ago

Related issue: https://github.com/opensearch-project/OpenSearch/issues/15149

dblock commented 1 month ago

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

prateekrai1 commented 2 days ago

I have come up with a possible solution for backport PRs and Stalled PRs:

I use the Github search API to identify stalled PRs and backport PRs Backport PRs:

  1. Fetch all backport PRs with the backport label.
  2. Handle CHANGELOG.md conflicts by preserving both old and new changes.
  3. Commit and push the resolved file back to the branch.

Stalled PRs:

  1. Fetch all stalled PRs with the stalled label.
  2. Rebase PRs onto the latest target branch and push updates.

I will integrate it with Jenkins and will trigger a pipeline whenever a Stalled PR or Backport PR is created. Do I need to store the old CHANGELOG.md files in a separate folder explicitly or is the github versioning enough?