Skip to content

Conversation

tobio
Copy link
Member

@tobio tobio commented Oct 13, 2025

Related to #1309

Ideally we want to track Kibana spec changes, we already have a tool which track dependency updates, we should use that to keep the Kibana client up to date.

There's some benefits here:

  • We don't have to manage another set of GH permissions for making commits to repos
  • We don't have to re-build the core Renovate functionality (automerge, PR tracking...)
  • We're not building a Rube Goldberg set of Buildkite triggers

There's some downsides though:

  • We're not tracking every commit into Kibana/main. If something breaks we need to check potentially a range of commits to track down the breaking change. It also means this can't be used as a status check on a Kibana PR, Buildkite pipeline to update the Kibana client #1356 introduces a simple Buildkite pipeline that can be used for that though. I think using both means that the overall solution is simpler, Renovate handles bumping all dependencies, and there's a Buildkite pipeline available as a simple validity check.
  • It's hard to skip no-op changes. Any commit to Kibana will result in the digest being updated, even if there are no changes to the OpenAPI spec. Assuming automerge works properly, this really just means a noisy Git history in the provider. I don't like that, but I'm not sure it's an actual issue.

@tobio tobio self-assigned this Oct 13, 2025
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 configures Renovate to automatically track and update Kibana OpenAPI specification dependencies by monitoring the Kibana repository's main branch and triggering client regeneration when changes occur.

Key changes:

  • Adds custom regex manager to track Kibana git digest from Makefile
  • Configures post-upgrade tasks to regenerate Kibana API clients
  • Enables automerge with squash strategy for automatic dependency updates

Comment on lines 3 to 16
"customManagers": [
{
"customType": "regex",
"managerFilePatterns": ["/^generated/kbapi/Makefile$/"],
"matchStrings": ["github_ref \\?= (?<currentDigest>.*?)\\n"],
"currentValueTemplate": "main",
"depNameTemplate": "kibana-openapi-spec",
"packageNameTemplate": "https://github.com/elastic/kibana",
"datasourceTemplate": "git-refs"
}
],
Copy link

Copilot AI Oct 13, 2025

Choose a reason for hiding this comment

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

The regex pattern github_ref \\?= (?<currentDigest>.*?)\\n uses a non-greedy quantifier .*? followed by \\n, but this may not correctly capture git digests which are typically 40-character SHA hashes. Consider using a more specific pattern like github_ref \\?= (?<currentDigest>[a-f0-9]{40}) to ensure only valid git commit hashes are matched.

Copilot uses AI. Check for mistakes.

@tobio tobio force-pushed the renovate-kibana-client branch from 89d5e9f to 48123dc Compare October 13, 2025 03:41
Copy link
Contributor

@nick-benoit nick-benoit left a comment

Choose a reason for hiding this comment

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

Yeah this seems like a good way to keep things up to date. Especially in the near term.

From 1309

One option here is that CI creates a provider PR based on the spec in the Kibana PR. We (i.e the author of the Kibana PR) can then update the provider codebase to handle the changing API, and then merge both provider and Kibana PR's together.

I suppose with this change we are no longer going to pursue this part of 1309?

@tobio tobio merged commit 838da2b into main Oct 14, 2025
53 of 54 checks passed
@tobio tobio deleted the renovate-kibana-client branch October 14, 2025 19:23
@tobio
Copy link
Member Author

tobio commented Oct 14, 2025

Yea, I don't think we'll go down that route at the moment. We'll need to coordinate with Kibana on the best way to handle that case and this seemed like a quick win to keep us moving forward for now. It may end up that this is good enough, and product teams can be directed to rectify any failures via the Renovate PRs.

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.

2 participants