Repository navigation
Closed
Closed
Product Outcome
Copy link
Description
In the context of composable packages project, and with the introduction of OTel packages, there are going to be more packages related to the same technology.
Allow to have an additional level of directories, so packages can be grouped by technology. See a POC in #16966.
The main changes will be:
- Allow to store packages with an additional nesting level under the packages directory, so for example the
nginx_input_otelpackage can be stored underpackages/nginx, asinput_otel, along with other packages related to nginx. - Code owners can be defined at the level of a directory containing multiple packages for the same technology. So if the
packages/nginxdirectory contains multiple packages related to NGINX, theCODEOWNERSfile only needs to specify a single entry, forpackages/nginx, instead of an entry for each package. Each package still needs to define its owner accordingly in the manifest. - It should be still possible to define more specific owners, so it is possible to define a different owner for a single package, even if the rest of packages for the same technology are owned by another team.
- In PRs, selective triggering tests per package should also trigger tests of dependent packages.
- Packages can be released individually from their directory, independently of its nested position.
- Packages will be grouped by technology with the help of their maintainer teams.
- Previous model should keep working.
This approach relies on existing features in elastic-package, and only requires changes in the scripts in the integrations repository. These changes need to take into account backwards compatibility with backport branches.
- Update dev tools to validate package names and codeowners. [CI] Add ListPackages and support nested package directories in dev tools #18543
- Update Buildkite scripts to trigger tests, publish and create backport branches. [CI] Support nested package directories in CI scripts #18577
- Update github workflow to automate the creation of the issue templates. Update sync-packages workflow to support nested package directories #18549
integrations/.github/workflows/updatecli/updatecli.d/sync-packages-to-bug-issue-template.yml
Lines 18 to 43 in a710cd1
integration_issue_templates_yml: name: update pkgs in .github/ISSUE_TEMPLATE/integration_*.yml kind: shell scmid: default spec: environments: - name: PATH - name: HOME # This script collects titles and package names (as determined by their # directory name) from source. Then updates the issue template. It uses # 'git diff' to satisfy the conditions needed by updatecli to determine # if any changes occurred. command: | #!/usr/bin/env bash set -eu pkgs=$(for i in $(LC_ALL=C ls packages); do title=$(yq .title packages/$i/manifest.yml) pkg=$i echo "- $title [$pkg]" done | sort -s -f | yq -o json .) yq eval ".body[1].attributes.options = $pkgs" -i '.github/ISSUE_TEMPLATE/integration_bug.yml' yq eval ".body[1].attributes.options = $pkgs" -i '.github/ISSUE_TEMPLATE/integration_feature_request.yml' git diff --name-only HEAD
Metadata
Metadata
Assignees
Labels
No labels
Activity
github-actions commentedon Feb 12, 2026
Claude finished @jsoriano's task in 3m 24s —— View job
Analysis Complete
Based on my investigation, I've analyzed the feature request and the referenced POC in PR #16966.
Recommendation
Follow the approach demonstrated in PR #16966. The POC shows a working implementation that leverages
elastic-package find(Technical Preview) to discover nested packages, requiring modifications to 4 key files:.buildkite/scripts/common.sh,.buildkite/scripts/trigger_integrations_in_parallel.sh,dev/codeowners/codeowners.go, and.github/CODEOWNERS.Findings
Current Architecture
The repository uses a flat package structure under
packages/:list_all_directories()incommon.sh:831usesfind . -maxdepth 1 -mindepth 1 -type ddev/codeowners/codeowners.goexpects packages at exactly one level deeptrigger_integrations_in_parallel.shiterates flat packagesis_pr_affected()usesgit diffwith pattern^packages/${package}/Key Constraints
elastic-package findalready supports nested packages via--depthflag (default: 2, meaning it can findpackages/nginx/input_otel)nginx/input_otelinstead ofnginx_input_otel)POC Analysis (PR #16966)
The POC makes these changes:
list_all_directories(): Changed fromfindtoelastic-package find --depth 2 --output-info dir_name${package/\\//-}) since Buildkite step keys can't contain/filepath.WalkDir()to recursively find packages andfindOwnerForFile()to traverse parent directories for matching CODEOWNERS rules/packages/nginx/Detailed Action Plan
Phase 1: Shell Script Changes
File:
.buildkite/scripts/common.shModify
list_all_directories()(line 831-833):Update
is_pr_affected()(line 778) to handle nested package paths:Update
process_package()(line 1034) to handle the nested path whenpushd:File:
.buildkite/scripts/trigger_integrations_in_parallel.shuse_elastic_packagecall after line 11 to ensure binary is availableFile:
.buildkite/scripts/test_one_package.shpushd packages > /dev/null(line 28) to handle nested paths:File:
.buildkite/scripts/build_packages.shfind . -maxdepth 1 -mindepth 1 -type d(line 53) withelastic-package find:Phase 2: Go Code Changes
File:
dev/codeowners/codeowners.goUpdate
validatePackages()(line 65-97) to usefilepath.WalkDir():Add
findOwnerForFile()helper function:Update
checkManifest()to use the new helper:Update
PackageOwners()function (line 33-54) for nested package lookupPhase 3: CODEOWNERS Migration (Done Per-Technology)
For each technology grouping (starting with nginx as the POC):
packages/nginx/input_otel/Phase 4: Testing & Validation
elastic-package finddiscovers nested packages correctlymage checkto validate CODEOWNERSBackwards Compatibility Considerations
elastic-packageversion in go.mod (currently v0.118.0) - ensurefindcommand is availablemage isElasticPackageDependencyLessThanto conditionally fall back to old behavior on backport brancheselastic-package findcommand is in Technical Preview but functionalRelated Issues and Pull Requests
Related Files
list_all_directories()andis_pr_affected()need updates for nested pathsbuild_packages()usesfindthat needs replacementlist_all_directories()for package iterationvalidatePackages()needs recursive discovery,checkManifest()needs parent traversalmage checkWhy is Claude responding? | Type
@claudeto interact furtherGive us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
mrodm commentedon Mar 25, 2026
Once the support for the additional level of directories is added, it needs to be revisited also the CI workflows/pipelines that rely on just one level of directories.
As example of one of these workflows: #17879
Check other Github Workflows in case they need to be updated too.
theletterf commentedon Mar 25, 2026
@alaudazzi @jmikell821 @bmorelli25 FYI. Docs locations could change.
[ci] Support nested package paths in docs validation trigger
[ci] Add blocking PR check for package docs using docs-builder (#17879)
alaudazzi commentedon Mar 25, 2026
@theletterf @jsoriano
Is this going to impact the content in the integrations-docs repo?
theletterf commentedon Mar 25, 2026
I'm checking.
theletterf commentedon Mar 25, 2026
In theory, it should hold. @jsoriano is EPR going to change the way they expose files as a result of this?
docs/reference/${name}.md. A name with a / would create unexpected directory nesting. But EPR package names typically use hyphens, not slashes.
jsoriano commentedon Mar 26, 2026
No, EPR responses won't change, and neither will do the package names.
This change only offers new options to store the source files in this repository, nothing should change once packages are built and published.
mrodm commentedon Mar 31, 2026
It should be taken into account that the changes included in
.buildkitefolder and others are also copied into the process of creating new backport branches created. It could happen that these folder do not supportelastic-package findcommand because in those branches are installing an older elastic-package version that does not support that command.jsoriano commentedon Apr 6, 2026
These older branches wouldn't either be using the new structure, so they won't need this functionality. But it is true that we might need to wrap it so they fall back to the old functionality when
elastic-package findis not available.mrodm commentedon Apr 16, 2026
@jsoriano Not sure how to check for these dependent packages.
Should it be taken into account the
requiredefinitions in the package manifest:https://github.com/elastic/package-spec/blob/8c7fcac97545da93310e4edd301a697fe271d113/test/packages/good_requires/manifest.yml#L12-L22
Or the ones in the test configuration:
https://github.com/elastic/package-spec/blob/8c7fcac97545da93310e4edd301a697fe271d113/test/packages/good_requires/_dev/test/config.yml#L1-L9
One option would be to consider the list from the package manifest. But maybe those dependent packages are not affected by the changes in the given package if they use pinned versions of the packages.
Considering the ones from the test configuration, it could be problematic to check whether or not they refer to the same package since there could be relative paths.
WDYT ?
This would require some refactors in the buildkite scripts (bash) to achieve this.
jsoriano commentedon Apr 17, 2026
@mrodm at the end input package dependencies are going to be pinned, and resolved at build time, so it is not so risky to check dependent packages, they will be checked when they update their dependencies.
After #17404 dependabot-like PRs will be automatically created, and the affected packages will be tested before being upgraded.
So we can probably skip this step, and reconsider the situation after #17404. Maybe an option is to create a daily job, similar to what we do with snapshot stack versions.
mrodm commentedon Apr 29, 2026
Closing issue after being merged this PR #18577
Updated: