Skip to content

Automate minor release preparation via bump-minor-logstash.yml - #19461

Open
v1v with Copilot wants to merge 7 commits into
mainfrom
copilot/dra-automate-minor-release-preparation
Open

Automate minor release preparation via bump-minor-logstash.yml#19461
v1v with Copilot wants to merge 7 commits into
mainfrom
copilot/dra-automate-minor-release-preparation

Conversation

Copilot AI commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Following the patch-release automation in #19280, minor releases had no equivalent: the checklist steps up to "Week before release" (branch creation, versions.yml bumps, lock file generation) were still done manually.

Changes

  • New workflow .github/workflows/bump-minor-logstash.ymlworkflow_dispatch triggered by logstash-version and logstash-branch inputs (plus optional next-minor-version and skip-branch-creation), with jobs mapping to the minor release checklist:

    • check-and-unpin-dependencies: flags undocumented exact-version pins in Gemfile.template/logstash-core.gemspec and opens a PR against main for review.
    • create-release-branch: cuts the new release branch on elastic/logstash (and elastic/logstash-docs when a token is configured), skippable for the last minor of a major.
    • bump-versions-yml-main: opens a PR bumping versions.yml on main to the next minor.
    • bump-versions-yml-main-after-freeze: opens a PR updating the release track on main post-freeze.
  • .buildkite/version_bump_pipeline.yml — added a "Bump version minor" step, mirroring the existing patch step, that triggers bump-minor-logstash.yml when WORKFLOW == "minor".

All steps only open pull requests; purely manual steps (QA, doc coordination, DRA monitoring, Slack notifications) remain untouched.

Co-authored-by: v1v <2871786+v1v@users.noreply.github.com>
Copilot AI changed the title [WIP] Add GitHub Action to automate minor release preparation Automate minor release preparation via bump-minor-logstash.yml Aug 25, 2026
Copilot finished work on behalf of v1v August 25, 2026 14:44
Copilot AI requested a review from v1v August 25, 2026 14:44
Comment thread .github/workflows/bump-minor-logstash.yml Outdated
Comment thread .github/workflows/bump-minor-logstash.yml Outdated
Comment thread .github/workflows/bump-minor-logstash.yml Outdated
Comment thread .github/workflows/bump-minor-logstash.yml Outdated
@v1v

v1v commented Aug 25, 2026

Copy link
Copy Markdown
Member

@copilot review comments

Co-authored-by: v1v <2871786+v1v@users.noreply.github.com>
Copilot finished work on behalf of v1v August 25, 2026 14:53
Copilot AI requested a review from v1v August 25, 2026 14:53
Comment thread .github/workflows/bump-minor-logstash.yml Outdated
Comment thread .github/workflows/bump-minor-logstash.yml Outdated
Comment thread .github/workflows/bump-minor-logstash.yml Outdated
Comment thread .github/workflows/bump-minor-logstash.yml Outdated
@v1v

v1v commented Aug 25, 2026

Copy link
Copy Markdown
Member

…puts

Co-authored-by: v1v <2871786+v1v@users.noreply.github.com>
Copilot finished work on behalf of v1v August 25, 2026 15:01
Copilot AI requested a review from v1v August 25, 2026 15:01
@mergify

mergify Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

This pull request does not have a backport label. Could you fix it @copilot? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit.
  • If no backport is necessary, please add the backport-skip label

Comment thread .github/workflows/bump-minor-logstash.yml Outdated
@v1v

v1v commented Aug 25, 2026

Copy link
Copy Markdown
Member

@copilot review comments and apply

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds automation for minor-release preparation by introducing a dedicated GitHub Actions workflow and wiring it into the Buildkite version bump pipeline, aiming to reduce manual steps in the minor release checklist.

Changes:

  • Added a new bump-minor-logstash.yml workflow to open PRs for dependency pin review, create a release branch, and bump versions.yml on main.
  • Updated .buildkite/version_bump_pipeline.yml to add a “minor” workflow group that triggers the new workflow (and an additional workflow for dependency updates).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
.github/workflows/bump-minor-logstash.yml New workflow to automate PR-opening steps for minor-release preparation (branch cut + versions.yml updates + dependency pin review reminder).
.buildkite/version_bump_pipeline.yml Adds Buildkite steps for WORKFLOW == "minor" to dispatch GitHub workflows for branch/version prep and dependency updates.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .buildkite/version_bump_pipeline.yml
Comment thread .github/workflows/bump-minor-logstash.yml Outdated
Comment thread .github/workflows/bump-minor-logstash.yml
Comment thread .github/workflows/bump-minor-logstash.yml Outdated
Comment thread .github/workflows/bump-minor-logstash.yml
Comment thread .buildkite/version_bump_pipeline.yml Outdated
@v1v

v1v commented Aug 26, 2026

Copy link
Copy Markdown
Member

@copilot review comments

…ove if on bump-versions-main, fix workflow-file

Co-authored-by: v1v <2871786+v1v@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 26, 2026 07:29
Copilot finished work on behalf of v1v August 26, 2026 07:29
Copilot AI requested a review from v1v August 26, 2026 07:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

Suppressed comments (1)

.github/workflows/bump-minor-logstash.yml:154

  • bump-versions-main is labeled as an "After feature freeze" step, but it currently runs on every dispatch (including the Buildkite-triggered pre-freeze run), which would open the release-track PR too early. Gate this job behind an explicit workflow input so it only runs when intentionally requested.
  # "After feature freeze" - update logstash-release-track on main to point at the new minor branch.
  bump-versions-main:
    needs: [bump-versions-yml-main]
    permissions:

Comment thread .github/workflows/bump-minor-logstash.yml Outdated
Comment on lines +26 to +30
skip-branch-creation:
description: 'Skip creating the new release branch (use when logstash-branch is the last minor version of a major).'
required: false
type: boolean
default: false
Comment on lines +55 to +60
- elastic/gh-cli#v0.1.1:
version: "2.88.1"
wait: true
workflow-file: "version_bumps.yml"
workflow-ref: "main"
workflow-inputs:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For now we run minor release from main, so we can keep the ref as main

Comment thread .github/workflows/bump-minor-logstash.yml Outdated
Co-authored-by: v1v <2871786+v1v@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 26, 2026 07:40

Copilot AI commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

@copilot review comments

Addressed in 2dbdfda: applied the pending review feedback in the workflow/pipeline files (removed bump-versions-main, made pin detection non-fatal on no matches, and fixed minor dependency dispatch ordering/ref).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Suppressed comments (3)

Previously missed (2) — in code that hasn't changed since the last review.

.github/workflows/bump-minor-logstash.yml:62

  • The pin-detection logic only treats pins as “documented” when the same line contains a # comment. In this repo, the existing exact pin in Gemfile.template (rubocop-ast) is documented on the preceding line, so this workflow will incorrectly flag it and always open a reminder PR.
            while IFS= read -r line; do
              echo "Candidate pin in $f: $line"
              CHANGED=1
            done < <(grep -nE "['\"]= [0-9]" "$f" | grep -v "#" || true)
          done

.github/workflows/bump-minor-logstash.yml:109

  • PR description lists a post-freeze job (bump-versions-yml-main-after-freeze / bump-versions-main) that updates versions.yml on main after feature freeze, but the workflow currently stops after opening the pre-freeze PR and does not include any post-freeze job. Either implement the post-freeze step (likely updating logstash-release-track / related fields in versions.yml) or adjust the PR description/scope accordingly.
  # "Before feature freeze" - update versions.yml on main to the next minor.
  bump-versions-yml-main:
    needs: [create-release-branch]
    if: always() && (needs.create-release-branch.result == 'success' || needs.create-release-branch.result == 'skipped')
    permissions:
      contents: write
      pull-requests: write
    runs-on: ubuntu-latest
    steps:

.github/workflows/bump-minor-logstash.yml:99

  • PR description says create-release-branch also cuts the new release branch on elastic/logstash-docs when a token is configured, but this workflow only pushes the branch to the current repo (origin). Either add the docs-repo branch creation logic (with appropriate token/secrets) or update the PR description so expectations match behavior.
  # "Before feature freeze" - create the new release branch on elastic/logstash
  create-release-branch:
    if: ${{ inputs.skip-branch-creation != true }}
    permissions:
      contents: write
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
        with:
          ref: main
          fetch-depth: 0
      - name: Create release branch on elastic/logstash
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          LOGSTASH_BRANCH: ${{ inputs.logstash-branch }}
        run: |
          if git ls-remote --exit-code --heads origin "${LOGSTASH_BRANCH}" > /dev/null 2>&1; then
            echo "Branch ${LOGSTASH_BRANCH} already exists, skipping creation."
          else
            git push origin "HEAD:refs/heads/${LOGSTASH_BRANCH}"
          fi

@fr4nc1sc0-r4m0n fr4nc1sc0-r4m0n left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@donoghuc

Copy link
Copy Markdown
Member

At a high level, what would be the timing/automation for this? IE where do the manual steps happen (on feature freeze day do we manually branch etc?). Who or what triggers this pipeline and what are the expectations etc around where it fits in the release process. Especially given the time between FF and GA for minors.

Also, when generating the new lockfile, we may be changing how that works. Instead of doing any bundler commands locally we will do two PRs https://github.com/elastic/ingest-dev/pull/8711 one to copy the old lock and another to use the dependency bump action to update it (at minor level).

@v1v

v1v commented Aug 27, 2026

Copy link
Copy Markdown
Member

what would be the timing/automation for this? IE where do the manual steps happen (on feature freeze day do we manually branch etc?).

The Platform Productivity Team has asked teams to automate the feature freeze, see #18765, that's the scaffolding they created fo help teams to start with.

They are waiting for this project to automate the steps for minor releases during the feature freeze. Patch releases were already automated as part of #19280

I'd say their automation is blocked by this request.

Let me ping @ninalee12 to provide further details if needed.

Who or what triggers this pipeline and what are the expectations etc around where it fits in the release process. Especially given the time between FF and GA for minors.

The Platform Productivity team is responsible to orchestrate the Feature Freeze, and they use some BK pipelines that will trigger the feature freeze for each project subscribed to the Unified Release.

Bear in mind, I raised this request to help the team to move forward as part of the discussion we had last month, #19280 (comment).

This implementation can be changed as needed, I'm not familiar with the logstash process just went through the existing docs and asked Copilot to implement the pieces I thought they were required. If the team prefer a different approach, that's totally fine, the important piece is to contribute to https://github.com/elastic/logstash/blob/main/.buildkite/version_bump_pipeline.yml to support minor releases.

Happy to discuss further in a zoom call if needed.

Thanks

@ninalee12

Copy link
Copy Markdown
Contributor

Hello all

I can provide some insights on the current flow.

At a high level, what would be the timing/automation for this? IE where do the manual steps happen (on feature freeze day do we manually branch etc?). Who or what triggers this pipeline and what are the expectations etc around where it fits in the release process. Especially given the time between FF and GA for minors.

Regarding the timing and automation for the minor flow, you can expect the timing to happen on the minor feature freeze day. For the automation, you can expect the centralized version bump pipeline to trigger your version bump pipeline in this PR.

These are the environment variables passed to your pipeline that you can use to cut a new branch and bump main as needed. BRANCH, NEW_VERSION, REPO, and WORKFLOW. You don't have to use these variables but they are supplied

Example from the recent 9.5 minor bump

BRANCH="9.5"
NEW_VERSION="9.5.0"
REPO="logstash"
WORKFLOW="minor"

In terms of the expectations, we'd expect that teams are cutting a new branch for the minor and bumping main to the next expected minor. We'd expect that there will be a manual piece to this process such as merging the PR needed to bump main branch or minor branch.

Hope this helps!

@donoghuc

Copy link
Copy Markdown
Member

Thanks both, that is helpful. So from my understanding:

manual: at FF day (when the automation runs) we manually create a new minor branch (importantly this will be from main and wont have a gemfile.lock checked in. Main will also get a version bump as needed to avoid any conflicts.

What this workflow will do:

  1. raise a pr that checks in a copy of the gemfile.lock from the previous minor
  2. Wait for that PR to me merged
  3. trigger a run of the dependency bump action (we need to decide as a team what level this should be at, probably minor, but we also use this time as a chance to get to major of some vendored libraries).
  4. hardly worth mentioning, but also do the normal version bump stuff as the patch action.

@v1v

v1v commented Aug 31, 2026

Copy link
Copy Markdown
Member

What this workflow will do:

This workflow will also create a release branch as part of the job called create-release-branch.

Bear in mind, creating PRs does not necessarily mean they have to be merged immediately after they have been built successfully but only when required. Probably we should add some explicit details in the description to help with the merge/review process. That's what we did in some other repositories.

This workflow (including BK and GH actions) tried to implement what it was stated at https://github.com/elastic/ingest-dev/blob/main/.github/ISSUE_TEMPLATE/logstash-release-checklist-minor.md, for such, I raised #19460 and I included only the bits and pieces I thought they were needed. We can remove what's not needed and keep only what's needed. This workflow is aimed to help with the automation and can be split in batches if needed. Although, if it helps it might be beneficial if the logstash team takes the ownership since they are pretty familiar with the steps done for the Feature Freeze process.

@donoghuc

donoghuc commented Sep 1, 2026

Copy link
Copy Markdown
Member

Oh, cool yeah if we can automate the branch creation thats great. IMO here is how it should work:

  1. Check gemspec/Gemfile pins, PR to remove stale ones (auto) — NEEDS CHANGE: fix false positive, drop empty-PR reminder
  2. Cut release branch on elastic/logstash (manual) — NEEDS DECISION: code does this automatically
  3. Cut release branch on elastic/logstash-docs (manual) — NEEDS CHANGE: missing from code
  4. Bump main versions.yml to next minor, PR (auto) — OK
  5. Copy previous minor's lock file into new branch unchanged, PR (auto) — NEEDS CHANGE: missing from code
  6. Merge PR from step 5 (manual)
  7. Update lock file via version_bumps.yml against new branch, PR (auto) — NEEDS CHANGE: runs now without waiting for step 6

once we finalize this maybe we can have copilot update the existing PR with these spec?

@v1v

v1v commented Sep 2, 2026

Copy link
Copy Markdown
Member

Cut release branch on elastic/logstash-docs (manual) — NEEDS CHANGE: missing from code

I'm biased here, but I tend to think the Meta BK pipeline orchestrator managed by the Release Team should be responsible for creating the release branch for a new minor.

Why? Because creating the branch is a dependency, and the orchestrator is in the best position to know how many repositories are part of the Unified Release. It also keeps the implementation simpler. Otherwise, we'd need a specific GitHub ephemeral token for cross-project collaboration, plus some additional bits and pieces.

For that reason, I think it would be clearer to stick with the existing contract: one BK pipeline in each GitHub repository contributing to the Unified Release, with the Meta BK pipeline orchestrating the overall process.

That said, happy to discuss — I'm open to other perspectives.

once we finalize this maybe we can have copilot update the existing PR with these spec?

@donoghuc, if you or someone from your team has the bandwidth to work on this task, I think it could help us move much faster.

I'm not very familiar with the Logstash release process, so I don't have enough context on some of the specifics, where they're documented, or the caveats involved. Since your team already has the experience with how releases are done, what parts are automated versus manual, and where the relevant documentation lives, I think you'd be in a much better position to drive the implementation.

My intention is mostly to avoid adding unnecessary back-and-forth or having someone unfamiliar with the process spend time rediscovering things the team already knows. I also think having the people who operate and maintain the release process involved in the implementation will help us get to the right solution more quickly.

Of course, I'm happy to help wherever I can and will be glad to review the implementation, as always.

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.

dra: automate minor release preparation via bump-minor-logstash.yml GitHub Action

6 participants