Skip to content

[CI] Auto regenerate moon projects#237609

Merged
delanni merged 23 commits intoelastic:mainfrom
delanni:auto-regenerate-moon-projects
Nov 19, 2025
Merged

[CI] Auto regenerate moon projects#237609
delanni merged 23 commits intoelastic:mainfrom
delanni:auto-regenerate-moon-projects

Conversation

@delanni
Copy link
Copy Markdown
Member

@delanni delanni commented Oct 6, 2025

Summary

This is a preparation step for generating moon project markers (moon.yml) for every project in Kibana, and setting up a quick-check to validate/regenerate these.

The generation/regeneration will be turned on in a follow-up PR, where the generated files would be the only addition.

This PR also contains fixes I found randomly in project configs (such as invalid globs looking like **/**.json).

@delanni delanni force-pushed the auto-regenerate-moon-projects branch from 198a646 to 235d05d Compare October 10, 2025 15:28
@delanni delanni force-pushed the auto-regenerate-moon-projects branch from 235d05d to 5a62767 Compare October 10, 2025 15:53
@delanni delanni force-pushed the auto-regenerate-moon-projects branch from 0a75b73 to 32d0070 Compare October 14, 2025 11:43
@delanni delanni marked this pull request as ready for review October 14, 2025 12:45
@delanni delanni requested review from a team as code owners October 14, 2025 12:45
@delanni
Copy link
Copy Markdown
Member Author

delanni commented Oct 14, 2025

/ci

Copy link
Copy Markdown
Contributor

@szwarckonrad szwarckonrad left a comment

Choose a reason for hiding this comment

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

DW code change LGTM!

@elastic elastic deleted a comment from elasticmachine Oct 14, 2025
@delanni delanni requested a review from Copilot October 14, 2025 15:10
Copy link
Copy Markdown
Contributor

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 prepares the infrastructure for auto-generating Moon project configuration files (moon.yml) for every project in Kibana. The PR includes fixes for invalid glob patterns in TypeScript configuration files and establishes the foundation for Moon project management, though the actual generation/regeneration will be enabled in a follow-up PR.

  • Creates a new @kbn/moon package to handle Moon project generation and validation
  • Fixes invalid glob patterns in tsconfig.json files across multiple test plugins (e.g., **/**.json**/*.json)
  • Updates Moon workspace configuration to discover projects across the entire repository structure

Reviewed Changes

Copilot reviewed 39 out of 41 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/kbn-moon/* New package with CLI tools and utilities for Moon project generation
scripts/regenerate_moon_projects.js Entry point script for Moon project regeneration
Multiple tsconfig.json files Fixed invalid glob patterns from **/**.json to **/*.json and **/**/* to **/*
.moon/workspace.yml Updated to use glob patterns for project discovery across all directories
.moon/toolchain.yml Removed hardcoded Node.js version and added TypeScript configuration
.buildkite/scripts/steps/checks/verify_moon_projects.sh Added CI script for Moon project verification (currently commented out)
Comments suppressed due to low confidence (1)

packages/kbn-moon/src/cli/regenerate_moon_projects.ts:1

  • The regex (\s)* captures whitespace in a group but doesn't match effectively. This should be \s* without capturing group, or if you want to remove all whitespace it should be \s+ to match one or more whitespace characters.
/*

@delanni
Copy link
Copy Markdown
Member Author

delanni commented Nov 19, 2025

💚 All backports created successfully

Status Branch Result
9.2
9.1
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Nov 20, 2025
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @delanni

1 similar comment
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @delanni

@kibanamachine kibanamachine mentioned this pull request Nov 24, 2025
3 tasks
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @delanni

4 similar comments
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @delanni

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @delanni

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @delanni

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @delanni

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @delanni

delanni added a commit that referenced this pull request Dec 2, 2025
# Backport

This will backport the following commits from `main` to `8.19`:
- [[CI] Auto regenerate moon projects
(#237609)](#237609)

<!--- Backport version: 10.2.0 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Alex
Szabo","email":"alex.szabo@elastic.co"},"sourceCommit":{"committedDate":"2025-11-19T15:28:39Z","message":"[CI]
Auto regenerate moon projects (#237609)\n\n## Summary\nThis is a
preparation step for generating moon project markers\n(`moon.yml`) for
every project in Kibana, and setting up a quick-check\nto
validate/regenerate these.\n\nThe generation/regeneration will be turned
on in a follow-up PR, where\nthe generated files would be the only
addition.\n\nThis PR also contains fixes I found randomly in project
configs (such as\ninvalid globs looking like
`**/**.json`).\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"c87eb13b26c5c05d5e059ade885151e3daf683cd","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.2.0","v9.3.0","v9.1.6","v8.19.6","ci:beta-faster-pr-build"],"title":"[CI]
Auto regenerate moon
projects","number":237609,"url":"https://github.com/elastic/kibana/pull/237609","mergeCommit":{"message":"[CI]
Auto regenerate moon projects (#237609)\n\n## Summary\nThis is a
preparation step for generating moon project markers\n(`moon.yml`) for
every project in Kibana, and setting up a quick-check\nto
validate/regenerate these.\n\nThe generation/regeneration will be turned
on in a follow-up PR, where\nthe generated files would be the only
addition.\n\nThis PR also contains fixes I found randomly in project
configs (such as\ninvalid globs looking like
`**/**.json`).\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"c87eb13b26c5c05d5e059ade885151e3daf683cd"}},"sourceBranch":"main","suggestedTargetBranches":["9.2","9.1","8.19"],"targetPullRequestStates":[{"branch":"9.2","label":"v9.2.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/237609","number":237609,"mergeCommit":{"message":"[CI]
Auto regenerate moon projects (#237609)\n\n## Summary\nThis is a
preparation step for generating moon project markers\n(`moon.yml`) for
every project in Kibana, and setting up a quick-check\nto
validate/regenerate these.\n\nThe generation/regeneration will be turned
on in a follow-up PR, where\nthe generated files would be the only
addition.\n\nThis PR also contains fixes I found randomly in project
configs (such as\ninvalid globs looking like
`**/**.json`).\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"c87eb13b26c5c05d5e059ade885151e3daf683cd"}},{"branch":"9.1","label":"v9.1.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
delanni added a commit that referenced this pull request Dec 2, 2025
# Backport

This will backport the following commits from `main` to `9.1`:
- [[CI] Auto regenerate moon projects
(#237609)](#237609)

<!--- Backport version: 10.2.0 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Alex
Szabo","email":"alex.szabo@elastic.co"},"sourceCommit":{"committedDate":"2025-11-19T15:28:39Z","message":"[CI]
Auto regenerate moon projects (#237609)\n\n## Summary\nThis is a
preparation step for generating moon project markers\n(`moon.yml`) for
every project in Kibana, and setting up a quick-check\nto
validate/regenerate these.\n\nThe generation/regeneration will be turned
on in a follow-up PR, where\nthe generated files would be the only
addition.\n\nThis PR also contains fixes I found randomly in project
configs (such as\ninvalid globs looking like
`**/**.json`).\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"c87eb13b26c5c05d5e059ade885151e3daf683cd","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.2.0","v9.3.0","v9.1.6","v8.19.6","ci:beta-faster-pr-build"],"title":"[CI]
Auto regenerate moon
projects","number":237609,"url":"https://github.com/elastic/kibana/pull/237609","mergeCommit":{"message":"[CI]
Auto regenerate moon projects (#237609)\n\n## Summary\nThis is a
preparation step for generating moon project markers\n(`moon.yml`) for
every project in Kibana, and setting up a quick-check\nto
validate/regenerate these.\n\nThe generation/regeneration will be turned
on in a follow-up PR, where\nthe generated files would be the only
addition.\n\nThis PR also contains fixes I found randomly in project
configs (such as\ninvalid globs looking like
`**/**.json`).\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"c87eb13b26c5c05d5e059ade885151e3daf683cd"}},"sourceBranch":"main","suggestedTargetBranches":["9.2","9.1","8.19"],"targetPullRequestStates":[{"branch":"9.2","label":"v9.2.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/237609","number":237609,"mergeCommit":{"message":"[CI]
Auto regenerate moon projects (#237609)\n\n## Summary\nThis is a
preparation step for generating moon project markers\n(`moon.yml`) for
every project in Kibana, and setting up a quick-check\nto
validate/regenerate these.\n\nThe generation/regeneration will be turned
on in a follow-up PR, where\nthe generated files would be the only
addition.\n\nThis PR also contains fixes I found randomly in project
configs (such as\ninvalid globs looking like
`**/**.json`).\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"c87eb13b26c5c05d5e059ade885151e3daf683cd"}},{"branch":"9.1","label":"v9.1.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
delanni added a commit that referenced this pull request Dec 2, 2025
# Backport

This will backport the following commits from `main` to `9.2`:
- [[CI] Auto regenerate moon projects
(#237609)](#237609)

<!--- Backport version: 10.2.0 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Alex
Szabo","email":"alex.szabo@elastic.co"},"sourceCommit":{"committedDate":"2025-11-19T15:28:39Z","message":"[CI]
Auto regenerate moon projects (#237609)\n\n## Summary\nThis is a
preparation step for generating moon project markers\n(`moon.yml`) for
every project in Kibana, and setting up a quick-check\nto
validate/regenerate these.\n\nThe generation/regeneration will be turned
on in a follow-up PR, where\nthe generated files would be the only
addition.\n\nThis PR also contains fixes I found randomly in project
configs (such as\ninvalid globs looking like
`**/**.json`).\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"c87eb13b26c5c05d5e059ade885151e3daf683cd","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.2.0","v9.3.0","v9.1.6","v8.19.6","ci:beta-faster-pr-build"],"title":"[CI]
Auto regenerate moon
projects","number":237609,"url":"https://github.com/elastic/kibana/pull/237609","mergeCommit":{"message":"[CI]
Auto regenerate moon projects (#237609)\n\n## Summary\nThis is a
preparation step for generating moon project markers\n(`moon.yml`) for
every project in Kibana, and setting up a quick-check\nto
validate/regenerate these.\n\nThe generation/regeneration will be turned
on in a follow-up PR, where\nthe generated files would be the only
addition.\n\nThis PR also contains fixes I found randomly in project
configs (such as\ninvalid globs looking like
`**/**.json`).\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"c87eb13b26c5c05d5e059ade885151e3daf683cd"}},"sourceBranch":"main","suggestedTargetBranches":["9.2","9.1","8.19"],"targetPullRequestStates":[{"branch":"9.2","label":"v9.2.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/237609","number":237609,"mergeCommit":{"message":"[CI]
Auto regenerate moon projects (#237609)\n\n## Summary\nThis is a
preparation step for generating moon project markers\n(`moon.yml`) for
every project in Kibana, and setting up a quick-check\nto
validate/regenerate these.\n\nThe generation/regeneration will be turned
on in a follow-up PR, where\nthe generated files would be the only
addition.\n\nThis PR also contains fixes I found randomly in project
configs (such as\ninvalid globs looking like
`**/**.json`).\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"c87eb13b26c5c05d5e059ade885151e3daf683cd"}},{"branch":"9.1","label":"v9.1.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine kibanamachine added v9.1.8 v9.2.2 and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels Dec 2, 2025
eokoneyo pushed a commit to eokoneyo/kibana that referenced this pull request Dec 2, 2025
## Summary
This is a preparation step for generating moon project markers
(`moon.yml`) for every project in Kibana, and setting up a quick-check
to validate/regenerate these.

The generation/regeneration will be turned on in a follow-up PR, where
the generated files would be the only addition.

This PR also contains fixes I found randomly in project configs (such as
invalid globs looking like `**/**.json`).

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes v8.19.9 v9.1.9 v9.2.3 v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto-regenerate moon projects