Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bazel] validate packages/BUILD.bazel in CI #127241

Merged
merged 7 commits into from
Mar 15, 2022

Conversation

spalger
Copy link
Contributor

@spalger spalger commented Mar 9, 2022

With #127095 we started generating the packages/BUILD.bazel file. This only happens when you generate a new package though, and can cause unexpected updates when a user generates a package after others have manually updated the file.

To ensure that this file is always up-to-date with the state of the repo and sorted correctly this PR adds node scripts/generate packages_build_manifest. This new command just regenerates the packages/BUILD.bazel file based on the packages discovered. This command also supports a --validate flag which will be run on CI to fail CI when the file is outdated:

image

Additionally, this PR fixes a bug with the default @npm// deps includes in generated BUILD.bazel file that @clintandrewhall caught as he experimented with this new generator, improves the help text for the --web option.

@spalger spalger force-pushed the implement/generate-package-build-file branch 6 times, most recently from f3c4119 to 1dd300b Compare March 9, 2022 16:57
@spalger spalger changed the title [generate] add command to regenerate packages/BUILD.bazel [generate] add command to regenerate packages/BUILD.bazel, ensure up-to-date Mar 9, 2022
@spalger spalger changed the title [generate] add command to regenerate packages/BUILD.bazel, ensure up-to-date [bazel] validate packages/BUILD.bazel in CI Mar 9, 2022
@spalger spalger force-pushed the implement/generate-package-build-file branch 5 times, most recently from 1818f30 to 65876b2 Compare March 10, 2022 00:24
@spalger spalger force-pushed the implement/generate-package-build-file branch from 65876b2 to f406f8f Compare March 10, 2022 16:26
@spalger spalger added Team:Operations Team label for Operations Team release_note:skip Skip the PR/issue when compiling release notes auto-backport Deprecated - use backport:version if exact versions are needed v8.2.0 v8.1.1 labels Mar 10, 2022
@spalger spalger marked this pull request as ready for review March 10, 2022 21:00
@spalger spalger requested a review from a team as a code owner March 10, 2022 21:00
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@spalger spalger enabled auto-merge (squash) March 10, 2022 21:00
Copy link
Member

@jbudz jbudz left a comment

Choose a reason for hiding this comment

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

On Windows this replaces all packages from //packages/ -> //packages\

@spalger
Copy link
Contributor Author

spalger commented Mar 14, 2022

Thanks @jbudz, paths are annoying but I think I've fixed this.

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/bazel-packages 11 5 -6

Any counts in public APIs

Total count of every any typed public API. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats any for more detailed information.

id before after diff
@kbn/bazel-packages 1 0 -1

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
@kbn/bazel-packages 0 1 +1
Unknown metric groups

API count

id before after diff
@kbn/bazel-packages 12 11 -1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@spalger spalger merged commit 9871111 into elastic:main Mar 15, 2022
@spalger spalger deleted the implement/generate-package-build-file branch March 15, 2022 02:34
kibanamachine pushed a commit that referenced this pull request Mar 15, 2022
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.1

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

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Mar 15, 2022
(cherry picked from commit 9871111)

Co-authored-by: Spencer <spencer@elastic.co>
maksimkovalev pushed a commit to maksimkovalev/kibana that referenced this pull request Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v8.1.1 v8.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants