Skip to content

[8.17] (backport #8359) updatecli: create PRs per active branch and refactor slack notifications #8509

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 3 commits into from
Jun 23, 2025

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jun 15, 2025

What does this PR do?

  • Run on Saturdays, a few hours after VM images are produced.
  • Create PRs per active branch instead of using the backport labels.
  • Use slack composite action.
  • Notify the robots team if something goes wrong with the GH actions.
  • Enable auto approval and auto-merge with Mergify [Need to configure the branch protections accordingly]

Why is it important?

A follow-up from #8211

Checklist

  • I have read and understood the pull request guidelines of this project.
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool
  • I have added an integration test or an E2E test

Disruptive User Impact

How to test this PR locally

$ GITHUB_TOKEN=$(gh auth token) \
  GITHUB_ACTOR=v1v \
  BRANCH_NAME=main updatecli apply \
    --config .ci/updatecli/updatecli-bump-vm-images.yml \
    --values .ci/updatecli/values.d/scm.yml

Produced v1v#7

Then I targeted a different branch

$ GITHUB_TOKEN=$(gh auth token) \
  GITHUB_ACTOR=v1v \
  BRANCH_NAME=main updatecli apply \
    --config .ci/updatecli/updatecli-bump-vm-images.yml \
    --values .ci/updatecli/values.d/scm.yml

Produced v1v#8

Related issues

Questions to ask yourself

  • How are we going to support this in production?
  • How are we going to measure its adoption?
  • How are we going to debug this?
  • What are the metrics I should take care of?
  • ...

This is an automatic backport of pull request #8359 done by [Mergify](https://mergify.com).

@mergify mergify bot added the backport label Jun 15, 2025
@mergify mergify bot requested review from a team as code owners June 15, 2025 19:01
@mergify mergify bot assigned v1v Jun 15, 2025
@mergify mergify bot requested review from blakerouse and swiatekm and removed request for a team June 15, 2025 19:01
v1v
v1v previously approved these changes Jun 15, 2025
@v1v v1v enabled auto-merge (squash) June 15, 2025 19:02
@v1v
Copy link
Member

v1v commented Jun 15, 2025

I somehow thought that buildkite/elastic-agent would run and do nothing if changes are in the list of changes to skip the CI.

However, it's still pending

image

For instance, I've seen it work fine for #8312:

image

Now, what's the reason buildkite/elastic-agent - No changes required CI. Skipped. was not actually skipped but pending in this PR?

Copy link
Contributor Author

mergify bot commented Jun 16, 2025

This pull request has not been merged yet. Could you please review and merge it @v1v? 🙏

1 similar comment
Copy link
Contributor Author

mergify bot commented Jun 23, 2025

This pull request has not been merged yet. Could you please review and merge it @v1v? 🙏

dliappis
dliappis previously approved these changes Jun 23, 2025
Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

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

LGTM

@dliappis dliappis requested review from pkoutsovasilis and removed request for blakerouse and swiatekm June 23, 2025 10:48
pkoutsovasilis
pkoutsovasilis previously approved these changes Jun 23, 2025
@dliappis
Copy link
Contributor

dliappis commented Jun 23, 2025

@v1v re your previous comment, after clicking update branch, there was a rerun which now shows the green tick box in buildkite/elastic-agent (mentioning No changes required in CI. Skipped):

image

Even though it's a green tick box, it seems it's not sufficient for automerge and the requirement for buildkite/elastic-agent isn't met.
I've noticed you've merged other backports of the same PR manually e.g. #8507

Is this something we'll always need to do going forwards?

Copy link
Contributor Author

mergify bot commented Jun 23, 2025

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b mergify/bp/8.17/pr-8359 upstream/mergify/bp/8.17/pr-8359
git merge upstream/8.17
git push upstream mergify/bp/8.17/pr-8359

@dliappis dliappis dismissed stale reviews from pkoutsovasilis, v1v, and themself via 051dbdd June 23, 2025 12:57
Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

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

LGTM fixed a merge conflict after 0cff839

@dliappis dliappis disabled auto-merge June 23, 2025 13:31
@dliappis dliappis merged commit 2d39594 into 8.17 Jun 23, 2025
8 checks passed
@dliappis dliappis deleted the mergify/bp/8.17/pr-8359 branch June 23, 2025 13:31
@v1v
Copy link
Member

v1v commented Jun 25, 2025

Is this something we'll always need to do going forwards?

I'm still figuring out what the path forward is - when I enabled the mergify auto-merge, I think there was some condition that worked as expected:

That mistakenly made me think things were good to move forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants