Skip to content

Conversation

@spalger
Copy link
Contributor

@spalger spalger commented Jan 30, 2023

This adds the --serverless CLI arg (only available in dev mode, you can also use yarn start-serverless), which will load the new config/kibana.serverless.yml file. For now, this file is not included in the build artifact, though we might include a --serverless flag which replaces the kibana.yml file with kibana.serverless.yml. @jbudz will follow up after this PR with the build related changes to get this working with PR cloud deploys, which will be enough changes for us to start iterating on UI specific changes based on running in a serverless environment.

Additionally, support for the undocumented KBN_CONFIG_PATHS env var is added, which should contain a comma-separated list of paths to kibana config files. These files are loaded, in the specified order, before any of the config files listed in the CLI but after the kibana.yml config file.

@spalger spalger added Team:Operations Kibana-Operations Team release_note:skip Skip the PR/issue when compiling release notes labels Jan 30, 2023
@elasticmachine
Copy link
Contributor

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

@spalger spalger requested a review from jbudz January 30, 2023 19:14
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.

~/dev/kibana1 (pr/149878) » node scripts/kibana --dev
FATAL CLI ERROR Error: EISDIR: illegal operation on a directory, read
    at Object.readSync (node:fs:738:3)
    at tryReadSync (node:fs:438:20)
    at readFileSync (node:fs:484:19)
    at readYaml (read_config.ts:16:57)
    at getConfigFromFiles (read_config.ts:46:18)
    at RawConfigService.loadConfig (raw_config_service.ts:51:52)

@spalger
Copy link
Contributor Author

spalger commented Jan 30, 2023

@jbudz doh 6eec315 (#149878)

@kibana-ci
Copy link

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #5 / console app XJSON inline http request should have optional query parameters

Metrics [docs]

✅ unchanged

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

@spalger spalger merged commit e07a65e into elastic:main Jan 30, 2023
@spalger spalger deleted the implement/serverless-config branch January 30, 2023 22:12
@kibanamachine kibanamachine added v8.7.0 backport:skip This PR does not require backporting labels Jan 30, 2023
kqualters-elastic pushed a commit to kqualters-elastic/kibana that referenced this pull request Feb 6, 2023
…ly (elastic#149878)

This adds the `--serverless` CLI arg (only available in dev mode, you
can also use `yarn start-serverless`), which will load the new
`config/kibana.serverless.yml` file. For now, this file is not included
in the build artifact, though we might include a `--serverless` flag
which replaces the `kibana.yml` file with `kibana.serverless.yml`.
@jbudz will follow up after this PR with the build related changes to
get this working with PR cloud deploys, which will be enough changes for
us to start iterating on UI specific changes based on running in a
serverless environment.

Additionally, support for the undocumented `KBN_CONFIG_PATHS` env var is
added, which should contain a comma-separated list of paths to kibana
config files. These files are loaded, in the specified order, before any
of the config files listed in the CLI but after the kibana.yml config
file.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@delanni delanni mentioned this pull request Jun 1, 2023
1 task
delanni added a commit that referenced this pull request Jun 5, 2023
## Summary
Fixes: #155154 (introduced in #149878), builds on #155436 .

- Adds tests to ensure the configuration merging order, check those for
reference.
- Updates the README to explain the intention
 
For the tests, I needed to output something to the logs. I hope it's not
a big issue to log it. If needed, I might hide that behind a verbose- or
feature flag.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Jun 5, 2023
## Summary
Fixes: elastic#155154 (introduced in elastic#149878), builds on elastic#155436 .

- Adds tests to ensure the configuration merging order, check those for
reference.
- Updates the README to explain the intention

For the tests, I needed to output something to the logs. I hope it's not
a big issue to log it. If needed, I might hide that behind a verbose- or
feature flag.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit c57589e)
kibanamachine added a commit that referenced this pull request Jun 5, 2023
# Backport

This will backport the following commits from `main` to `8.8`:
- [Fix config stacking order
(#158827)](#158827)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Alex
Szabo","email":"alex.szabo@elastic.co"},"sourceCommit":{"committedDate":"2023-06-05T13:15:07Z","message":"Fix
config stacking order (#158827)\n\n## Summary\r\nFixes: #155154
(introduced in #149878), builds on #155436 .\r\n\r\n- Adds tests to
ensure the configuration merging order, check those
for\r\nreference.\r\n- Updates the README to explain the intention\r\n
\r\nFor the tests, I needed to output something to the logs. I hope it's
not\r\na big issue to log it. If needed, I might hide that behind a
verbose- or\r\nfeature flag.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"c57589ec57e5e8265a66cd9c8c2102005736f6d8","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:fix","backport:prev-minor","v8.9.0"],"number":158827,"url":"https://github.com/elastic/kibana/pull/158827","mergeCommit":{"message":"Fix
config stacking order (#158827)\n\n## Summary\r\nFixes: #155154
(introduced in #149878), builds on #155436 .\r\n\r\n- Adds tests to
ensure the configuration merging order, check those
for\r\nreference.\r\n- Updates the README to explain the intention\r\n
\r\nFor the tests, I needed to output something to the logs. I hope it's
not\r\na big issue to log it. If needed, I might hide that behind a
verbose- or\r\nfeature flag.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"c57589ec57e5e8265a66cd9c8c2102005736f6d8"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/158827","number":158827,"mergeCommit":{"message":"Fix
config stacking order (#158827)\n\n## Summary\r\nFixes: #155154
(introduced in #149878), builds on #155436 .\r\n\r\n- Adds tests to
ensure the configuration merging order, check those
for\r\nreference.\r\n- Updates the README to explain the intention\r\n
\r\nFor the tests, I needed to output something to the logs. I hope it's
not\r\na big issue to log it. If needed, I might hide that behind a
verbose- or\r\nfeature flag.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"c57589ec57e5e8265a66cd9c8c2102005736f6d8"}}]}]
BACKPORT-->

---------

Co-authored-by: Alex Szabo <alex.szabo@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Operations Kibana-Operations Team v8.7.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants