Skip to content

chore: Update dev branches with merge #3474

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

Merged
merged 18 commits into from
Jul 7, 2025
Merged

Conversation

lantoli
Copy link
Member

@lantoli lantoli commented Jul 4, 2025

Description

Update dev branches with merge. Don't use a PR as it will squash the commits and will cause the same conflicts to appear again and again.

It uses merge instead of rebase so history is not altered and changes can be reverted if necessary.

skip-docs-notification label is not needed any more as we don't create a PR here.

Link to any related issue(s): CLOUDP-329420

Type of change:

  • Bug fix (non-breaking change which fixes an issue). Please, add the "bug" label to the PR.
  • New feature (non-breaking change which adds functionality). Please, add the "enhancement" label to the PR. A migration guide must be created or updated if the new feature will go in a major version.
  • Breaking change (fix or feature that would cause existing functionality to not work as expected). Please, add the "breaking change" label to the PR. A migration guide must be created or updated.
  • This change requires a documentation update
  • Documentation fix/enhancement

Required Checklist:

  • I have signed the MongoDB CLA
  • I have read the contributing guides
  • I have checked that this change does not generate any credentials and that they are NOT accidentally logged anywhere.
  • I have added tests that prove my fix is effective or that my feature works per HashiCorp requirements
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code
  • If changes include deprecations or removals I have added appropriate changelog entries.
  • If changes include removal or addition of 3rd party GitHub actions, I updated our internal document. Reach out to the APIx Integration slack channel to get access to the internal document.

Further comments

@lantoli lantoli marked this pull request as ready for review July 4, 2025 17:45
@Copilot Copilot AI review requested due to automatic review settings July 4, 2025 17:45
@lantoli lantoli requested a review from a team as a code owner July 4, 2025 17:45
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR replaces the previous rebase-based dev-branch updates with a merge-based workflow to avoid repeat conflicts caused by squashed commits. Key changes include removing the rebase inputs, adding a commit-count check and an automated git merge, and replacing the PR creation step with direct pushes and Slack notifications.

Comments suppressed due to low confidence (2)

.github/workflows/update-dev-branches.yml:54

  • To ensure you're counting up-to-date master commits, run git fetch origin master (or a full fetch) before computing commits_to_merge, otherwise origin/master may be stale from earlier steps.
 commits_to_merge=$(git rev-list --count origin/${{ matrix.branch }}..origin/master) 

.github/workflows/update-dev-branches.yml:64

  • [nitpick] Consider moving these detailed manual resolution steps to an external documentation page and linking to it here, so the workflow file stays concise and easier to maintain.
 echo "ERROR: Merge conflicts detected. Manual intervention required:" 
Copy link
Collaborator

@maastha maastha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

- name: Config Git
run: |
git config --local user.email svc-api-experience-integrations-escalation@mongodb.com
git config --local user.name svc-apix-bot
- name: Rebase branch with master
id: rebase-check
- name: Merge branch with master
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be cleaner to have this in a separate script?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at the moment I think it's better here because it also need to coordinate with the push step, so it's easier to see what's going on. If it get more complicated I agree to move it

echo "Pushing updated branch ${{ matrix.branch }} to remote"
git push origin ${{ matrix.branch }}
- name: Project check
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be before the Push updated branch?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EspenAlbert as this is to do a merge without PR, I think it's better to avoid to to this manually as much as we can. So if the merge doesn't have conflicts, we push the changes, so later the checks can be fixed easily in a PR.

however if we don't push the changes, somebody has to manually fix it and merge, without a PR.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. I think the best way is to go ahead with this approach, and then later we can revert/change based on experience 👍

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed, thanks

@lantoli lantoli merged commit d5ea3ae into master Jul 7, 2025
41 checks passed
@lantoli lantoli deleted the CLOUDP-329420_update_dev branch July 7, 2025 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants