Skip to content

[CI] Add features/* branch support to changeset detection and publish pipeline#18962

Merged
mrodm merged 5 commits into
elastic:mainfrom
mrodm:updadd_feature_branches_support
May 14, 2026
Merged

[CI] Add features/* branch support to changeset detection and publish pipeline#18962
mrodm merged 5 commits into
elastic:mainfrom
mrodm:updadd_feature_branches_support

Conversation

@mrodm
Copy link
Copy Markdown
Collaborator

@mrodm mrodm commented May 12, 2026

Proposed commit message

WHAT

Extends CI branch handling to treat feature/* branches the same as backport-* branches in two places:

common.shget_from_changeset / get_to_changeset

  • The outer guard in both functions previously only matched main and backport-*, making the inner feature/ check inside get_from_changeset unreachable (dead code) — feature/* branches never entered the block.
  • Both outer guards are updated to ^(backport-|feature/) so feature/* branches benefit from the same previous-successful-commit logic.
  • On the first push of a feature/* branch (no previous successful build), from is set to BUILDKITE_COMMIT rather than origin/${BUILDKITE_BRANCH}^, avoiding spurious full-repo diffs that would trigger unnecessary package testing.

catalog-info.yamlintegrations pipeline

  • branch_configuration extended from "main backport-*" to "main backport-* feature/*" so the integrations pipeline is triggered for feature/* branches.
  • cancel_intermediate_builds_branch_filter and skip_intermediate_builds_branch_filter updated to include !feature/* so intermediate builds on feature/* branches are properly cancelled/skipped, consistent with main and backport-*.

docs/ci_pipelines.md

  • Updated the pipeline trigger description, build-cancellation bullet, and changeset-detection bullet to include feature/* alongside main and backport-*.
  • Added a new "Feature branches" section documenting that changes are integrated via Pull Requests with CI checks, that changeset detection follows the same logic as backport-* branches, and that publishing is restricted to main and backport-* only.

WHY

feature/* branches are used for long-lived feature development that requires the same CI protections as backport-* branches: accurate changeset detection against a baseline and CI build triggering. The integrations-publish pipeline intentionally remains restricted to main and backport-* branches only.

Author's Checklist

  • Verified that feature/* branches were previously excluded from the get_from_changeset/get_to_changeset logic (dead code — inner check was unreachable)
  • Verified that integrations-publish pipeline does NOT trigger on feature/* branches
  • Updated docs/ci_pipelines.md to document the new feature/* branch workflow

This PR was drafted with the assistance of Claude (claude-sonnet-4-6).

mrodm and others added 2 commits May 12, 2026 13:22
…ions pipeline

Extend CI branch handling to treat feature/* branches the same as
backport-* branches:

- common.sh: fix dead-code bug in get_from_changeset and
  get_to_changeset where the outer guard only matched main/backport-*,
  making the inner feature/ check unreachable. Unified both guards to
  ^(backport-|feature/) and use BUILDKITE_COMMIT as the diff base on
  the first push of a new feature/* branch, consistent with backport
  behaviour.
- catalog-info.yaml: add feature/* to the integrations pipeline
  branch_configuration and intermediate-build filters so feature/*
  branches trigger CI builds and benefit from build cancellation/
  skipping.

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Update docs/ci_pipelines.md to include feature/* branches:
- Add feature/* to the pipeline trigger description and the
  build-cancellation and changeset-detection bullet points.
- Add a new "Feature branches" section explaining that changes
  are integrated via Pull Requests with CI checks, that changeset
  detection follows the same logic as backport-* branches, and
  that publishing is restricted to main and backport-* only.

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@mrodm mrodm self-assigned this May 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

✅ Vale Linting Results

No issues found on modified lines!


The Vale linter checks documentation changes against the Elastic Docs style guide.

To use Vale locally or report issues, refer to Elastic style guide for Vale.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

🔍 Preview links for changed docs

@elastic-vault-github-plugin-prod
Copy link
Copy Markdown

elastic-vault-github-plugin-prod Bot commented May 12, 2026

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@mrodm mrodm marked this pull request as ready for review May 12, 2026 15:54
@mrodm mrodm requested a review from a team as a code owner May 12, 2026 15:54
@andrewkroh andrewkroh added the documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. label May 12, 2026
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Comment thread .buildkite/scripts/common.sh Outdated
mrodm and others added 2 commits May 13, 2026 15:57
Extract the repeated `^(backport-|feature/)` regex into a single
readonly LONG_RUNNING_BRANCH_PATTERN constant, replacing three
inline occurrences in common.sh.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

TL;DR

The failed jobs are not failing in package code/tests; they are failing in Buildkite infrastructure hooks before tests start. Immediate action: re-run the build, and if it fails again, investigate agent egress/auth connectivity to AWS STS and GitHub.

Remediation

  • Re-run Buildkite build 42796 (or only the 6 failed jobs). This appears transient (curl timeout/reset to sts.amazonaws.com:443 and git fetch timeout to github.com:443).
  • If it reproduces, check Buildkite agent/network path and OIDC auth plugin health for:
    • elastic/oblt-aws-auth#v0.1.0 (STS connectivity)
    • repository post-checkout git fetch connectivity to GitHub
  • After infra/network is healthy, re-run package checks to confirm package tests execute.
Investigation details

Root Cause

All 6 failures occur before integration tests run, in CI setup hooks/plugins:

  1. AWS auth plugin pre-command failure (4 jobs)

    • Logs show curl: (28) Failed to connect to sts.amazonaws.com port 443 ... Connection timed out or curl: (35) ... Connection reset by peer.
    • Then Buildkite reports: plugin oblt-aws-auth-buildkite-plugin pre-command hook exited.
  2. Repository post-checkout network failure (2 jobs)

    • Logs show fatal: unable to access 'https://github.com/elastic/integrations.git/': Failed to connect to github.com port 443 ... Connection timed out.
    • Then Buildkite reports: repository post-checkout hook exited with status 128.

Relevant code paths confirm these failures happen in pipeline infra steps, not package logic:

  • .buildkite/scripts/trigger_integrations_in_parallel.sh#L79-L87 adds elastic/oblt-aws-auth#v0.1.0 and elastic/oblt-google-auth#v1.3.0 plugins to each generated package test step.
  • .buildkite/hooks/post-checkout#L28 runs git fetch -v origin "${target_branch}" during PR merge checkout.
  • .buildkite/hooks/post-checkout#L70 always invokes checkout_merge for PR jobs.

The PR commit itself only touched:

  • .buildkite/scripts/build_packages.sh
  • .buildkite/scripts/common.sh

No evidence these changes caused the observed hook-level network/auth timeouts.

Evidence

  • Build: https://buildkite.com/elastic/integrations/builds/42796
  • Failed jobs:
    • Check integrations atlassian_jira (exit 28)
    • Check integrations google_secops (exit 35)
    • Check integrations jupiter_one (exit 28)
    • Check integrations miniflux (exit 28)
    • Check integrations aws_bedrock (exit 128)
    • Check integrations journald (exit 128)
  • Key log excerpts:
    • curl: (28) Failed to connect to sts.amazonaws.com port 443 ...
    • curl: (35) OpenSSL SSL_connect: Connection reset by peer in connection to sts.amazonaws.com:443
    • fatal: unable to access 'https://github.com/elastic/integrations.git/': Failed to connect to github.com port 443 ...

Verification

  • Not run locally: failures occur in Buildkite agent infra/auth/network hooks prior to package test execution.

Follow-up

If a retry still fails with the same errors, escalate to CI/platform owners with this build URL and the two failing surfaces (oblt-aws-auth pre-command and repository post-checkout git fetch).

Note

🔒 Integrity filter blocked 7 items

The following items were blocked because they don't meet the GitHub integrity level.

  • [CI] Add features/* branch support to changeset detection and publish pipeline #18962 pull_request_read: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #18962 pull_request_read: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • 8404d86 list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • 54eab69 list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • e908652 list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • 401a954 list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • 17ce815 list_commits: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
  github:
    min-integrity: approved  # merged | approved | unapproved | none

What is this? | From workflow: PR Buildkite Detective

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

@mrodm mrodm merged commit 6a9d08b into elastic:main May 14, 2026
10 of 11 checks passed
@mrodm mrodm deleted the updadd_feature_branches_support branch May 14, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation. Applied to PRs that modify *.md files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants