Skip to content

Conversation

@weronikaolejniczak
Copy link
Contributor

@weronikaolejniczak weronikaolejniczak commented Nov 27, 2025

Summary

  • removed composite GH actions
  • moved all "check changelogs" logic to a Bash script
  • added support for per-package skips

Why are we making this change?

The current changelog job:

  • can at times hang,
  • takes a long time (compared to what it does),
  • doesn't allow to skip the check for specific packages,
  • the matrix strategy spins up several VMs for every single package changed, and there's an overhead for runners - downloading actions, checking out code for a task that takes ms to execute,
  • it's not easy to test because the whole logic is dispersed throughout GH Action specific ✨ stuff ✨.

The proposed job:

  • has all the logic in a separate Bash script and only executes the script, and passes appropriate GH context,
  • it's easy to test because the Bash script can be launched in isolation from GH CI,
  • supports per-package skips,
  • runs in only one job, has less potential for hanging because the main job is not waiting for the response from matrix jobs.

Screenshots #

Impact to users

🟢 None. This is a CI change.

QA

Run the script:

# syntax
./scripts/check_changelogs.sh <PR_NUMBER> "<LABELS>"

# example
./scripts/check_changelogs.sh 1234 "bug|enhancement"

Make sure your fork is not stale:

git fetch && git checkout main && git rebase upstream/main

Testing scenarios

  • the happy path
    • modify a public package: touch packages/eui/somefile.txt
    • create a dummy changelog: touch packages/eui/changelogs/upcoming/1234.md
    • commit the changes
    • run ./scripts/check_changelogs.sh 1234 ""
  • the sad path
    • modify a public package: touch packages/eui/somefile.txt
    • don't create a changelog
    • commit the changes
    • run ./scripts/check_changelogs.sh 1234 ""
  • global skip
    • modify a public package: touch packages/eui/somefile.txt
    • don't create a changelog
    • commit the changes
    • run ./scripts/check_changelogs.sh 1234 "skip-changelog"
  • package-specific skip
    • modify a public package: touch packages/eui/somefile.txt
    • don't create a changelog
    • commit the changes
    • run ./scripts/check_changelogs.sh 1234 "skip-changelog-eui"
  • private package ignored
    • modify a private package: touch packages/website/somefile.txt
    • don't create a changelog
    • commit the changes
    • run ./scripts/check_changelogs.sh 1234 ""
  • no changes
    • run ./scripts/check_changelogs.sh 1234 ""
  • mixed state
    • modify a public package: touch packages/eui/somefile.txt
    • modify a public package: touch packages/eui-theme-borealis/somefile.txt
    • modify a private package: touch packages/website/somefile.txt
    • add changelog only for one: touch packages/eui/changelogs/upcoming/1234.md
    • commit the changes
    • run ./scripts/check_changelogs.sh 1234 ""

@weronikaolejniczak weronikaolejniczak requested a review from a team as a code owner November 27, 2025 17:42
@weronikaolejniczak weronikaolejniczak force-pushed the feat/update-changelog-check branch from ed60e17 to 0d481fb Compare November 27, 2025 17:43
@acstll acstll self-requested a review November 28, 2025 09:48
@acstll
Copy link
Contributor

acstll commented Nov 28, 2025

this looks so much better than what we have currently! and with a fancy "+128 −130" balance, thank you @weronikaolejniczak 💚

I will do the grunty QA testing and scan the code! but it'd be nice if @tkajtoch could take a look as well

@weronikaolejniczak weronikaolejniczak added skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) and removed skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) labels Nov 28, 2025
@weronikaolejniczak weronikaolejniczak self-assigned this Nov 28, 2025
@weronikaolejniczak weronikaolejniczak force-pushed the feat/update-changelog-check branch from bb2b99b to 7cb87f9 Compare November 28, 2025 11:10
@acstll
Copy link
Contributor

acstll commented Nov 28, 2025

tested locally (in random order), at e558aed

working nicely as expected! 🟢

  • the happy path
    • modify a public package: touch packages/eui/somefile.txt
    • create a dummy changelog: touch packages/eui/changelogs/upcoming/1234.md
    • commit the changes
    • run ./scripts/check_changelogs.sh 1234 ""
  • the sad path
    • modify a public package: touch packages/eui/somefile.txt
    • don't create a changelog
    • commit the changes
    • run ./scripts/check_changelogs.sh 1234 ""
  • global skip
    • modify a public package: touch packages/eui/somefile.txt
    • don't create a changelog
    • commit the changes
    • run ./scripts/check_changelogs.sh 1234 "skip-changelog"
  • package-specific skip
    • modify a public package: touch packages/eui/somefile.txt
    • don't create a changelog
    • commit the changes
    • run ./scripts/check_changelogs.sh 1234 "skip-changelog-eui"
  • private package ignored
    • modify a private package: touch packages/website/somefile.txt
    • don't create a changelog
    • commit the changes
    • run ./scripts/check_changelogs.sh 1234 ""
  • no changes
    • run ./scripts/check_changelogs.sh 1234 ""
  • mixed state
    • modify a public package: touch packages/eui/somefile.txt
    • modify a public package: touch packages/eui-theme-borealis/somefile.txt
    • modify a private package: touch packages/website/somefile.txt
    • add changelog only for one: touch packages/eui/changelogs/upcoming/1234.md
    • commit the changes
    • run ./scripts/check_changelogs.sh 1234 ""

@weronikaolejniczak
Copy link
Contributor Author

Thank you, Arturo 🙏🏻 I appreciate your attention to detail 💚

@weronikaolejniczak weronikaolejniczak force-pushed the feat/update-changelog-check branch from a4664ff to 24e1247 Compare December 2, 2025 17:20
@weronikaolejniczak weronikaolejniczak force-pushed the feat/update-changelog-check branch from 24e1247 to 352b966 Compare December 2, 2025 17:30
@weronikaolejniczak
Copy link
Contributor Author

weronikaolejniczak commented Dec 2, 2025

@tkajtoch thank you for your suggestions, we shaved off 26 lines 💪🏻 I updated the fetch-depth to be 2, it scopes it to PR changes and makes CI much quicker (11s now). ubuntu-slim was a great tip to save on CI resources.

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @weronikaolejniczak

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @weronikaolejniczak

needs: changelog-checks
runs-on: ubuntu-latest
if: always()
runs-on: ubuntu-slim
Copy link
Member

Choose a reason for hiding this comment

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

🎉

Copy link
Member

@tkajtoch tkajtoch left a comment

Choose a reason for hiding this comment

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

The changes look great! Thanks for taking time to update the script

@weronikaolejniczak weronikaolejniczak merged commit 02fbc34 into elastic:main Dec 3, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants