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

[Ops] Fix serverless startup issue around importing @kbn/dev-utils #165311

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

delanni
Copy link
Contributor

@delanni delanni commented Aug 31, 2023

Summary

Fixes kibana-serverless issues of this nature: https://elastic.slack.com/archives/C04L3JE8LV6/p1693450827486199 or https://elastic.slack.com/archives/C04L3JE8LV6/p1693473384616049

After #162673 - serverless images started breaking: https://github.com/elastic/serverless-gitops/commits/main/services/kibana/versions.yaml
The issue is probably that the library @kbn/dev-utils is a devDependency, thus it doesn't show up in the serverless image, but it's required for the serve script. This doesn't show up locally (or probably in other kibana distros) because dev/prod dependencies are also installed together.

To solve this, I inlined the token (as it doesn't depend on anything else, it's just saved in a central place for code deduplication) - if it's a better solution, we can just move the @kbn/dev-utils to the prod dependencies, but I don't know enough about the context to make that decision.

  • fix(kibana-serverless): inline dev service account token - in the serverless images the @kbn/dev-utils package is not linked

…verless images the @kbn/dev-utils package is not linked
@delanni delanni marked this pull request as ready for review August 31, 2023 11:06
@delanni delanni requested a review from a team as a code owner August 31, 2023 11:06
@delanni delanni added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting Team:Operations Team label for Operations Team labels Aug 31, 2023
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@watson watson left a comment

Choose a reason for hiding this comment

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

There's probably a better way to do this without resorting to duplication, but currently I can't see it. I'm approving for now to unblock - then we can follow up later to clean it up.

@delanni delanni enabled auto-merge (squash) August 31, 2023 11:20
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

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

@watson watson disabled auto-merge August 31, 2023 12:19
@watson watson merged commit 8d7aa0b into elastic:main Aug 31, 2023
mistic added a commit that referenced this pull request Aug 31, 2023
…165357)

This is a follow up of #165311

Instead of duplicating the key we are only importing from
`@kbn/dev-utils` if the package is available. The serve file is also
load under dist mode where the devOnly dependencies are not availble and
as such we can't reliable load from them.
@delanni delanni deleted the fix-failing-serverless-startup branch May 2, 2024 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v8.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants