mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
# Backport This will backport the following commits from `main` to `8.19`: - [Updated js-yaml to v4 (#190678)](https://github.com/elastic/kibana/pull/190678) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Elena Shostak","email":"165678770+elena-shostak@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-09-19T10:25:03Z","message":"Updated js-yaml to v4 (#190678)\n\n## Summary\r\nUpdated `js-yaml` to `4.1.0`.\r\n\r\nThis PR also introduces a type override for the `js-yaml` load function\r\nto maintain compatibility across the codebase. Specifically, updated\r\ntype definition of the load function looks as follows:\r\n\r\n```typescript\r\nfunction load<T = any>(str: string, opts?: jsyaml.LoadOptions): T;\r\n```\r\n\r\nThe original type definition of the load function in `js-yaml` changed\r\nfrom `any` to `unknown`. This change would require extensive type\r\nupdates throughout the entire repository to accommodate the `unknown`\r\ntype. To avoid widespread type changes and potential issues in the\r\ncodebase, the type is overriden back to `any` for now.\r\nThis is a temporary measure, we plan to address the necessary type\r\nchanges in subsequent PRs, where teams will gradually update the\r\ncodebase to work with the `unknown` type.\r\n\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## Release note\r\nUpdated `js-yaml` to `4.1.0`.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Maxim Palenov <maxim.palenov@elastic.co>","sha":"28aa274f665b1aff891bf055a592851c8ec53d30","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","Team:Security","backport:skip","Team:Fleet","v9.0.0","Team:Obs AI Assistant","ci:project-deploy-observability","Team:obs-ux-infra_services","Team:obs-ux-management","apm:review"],"title":"Updated js-yaml to v4","number":190678,"url":"https://github.com/elastic/kibana/pull/190678","mergeCommit":{"message":"Updated js-yaml to v4 (#190678)\n\n## Summary\r\nUpdated `js-yaml` to `4.1.0`.\r\n\r\nThis PR also introduces a type override for the `js-yaml` load function\r\nto maintain compatibility across the codebase. Specifically, updated\r\ntype definition of the load function looks as follows:\r\n\r\n```typescript\r\nfunction load<T = any>(str: string, opts?: jsyaml.LoadOptions): T;\r\n```\r\n\r\nThe original type definition of the load function in `js-yaml` changed\r\nfrom `any` to `unknown`. This change would require extensive type\r\nupdates throughout the entire repository to accommodate the `unknown`\r\ntype. To avoid widespread type changes and potential issues in the\r\ncodebase, the type is overriden back to `any` for now.\r\nThis is a temporary measure, we plan to address the necessary type\r\nchanges in subsequent PRs, where teams will gradually update the\r\ncodebase to work with the `unknown` type.\r\n\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## Release note\r\nUpdated `js-yaml` to `4.1.0`.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Maxim Palenov <maxim.palenov@elastic.co>","sha":"28aa274f665b1aff891bf055a592851c8ec53d30"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/190678","number":190678,"mergeCommit":{"message":"Updated js-yaml to v4 (#190678)\n\n## Summary\r\nUpdated `js-yaml` to `4.1.0`.\r\n\r\nThis PR also introduces a type override for the `js-yaml` load function\r\nto maintain compatibility across the codebase. Specifically, updated\r\ntype definition of the load function looks as follows:\r\n\r\n```typescript\r\nfunction load<T = any>(str: string, opts?: jsyaml.LoadOptions): T;\r\n```\r\n\r\nThe original type definition of the load function in `js-yaml` changed\r\nfrom `any` to `unknown`. This change would require extensive type\r\nupdates throughout the entire repository to accommodate the `unknown`\r\ntype. To avoid widespread type changes and potential issues in the\r\ncodebase, the type is overriden back to `any` for now.\r\nThis is a temporary measure, we plan to address the necessary type\r\nchanges in subsequent PRs, where teams will gradually update the\r\ncodebase to work with the `unknown` type.\r\n\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## Release note\r\nUpdated `js-yaml` to `4.1.0`.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Maxim Palenov <maxim.palenov@elastic.co>","sha":"28aa274f665b1aff891bf055a592851c8ec53d30"}}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
34 lines
1.2 KiB
JavaScript
34 lines
1.2 KiB
JavaScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the "Elastic License
|
|
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
|
* Public License v 1"; you may not use this file except in compliance with, at
|
|
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
|
* License v3.0 only", or the "Server Side Public License, v 1".
|
|
*/
|
|
|
|
require('../src/setup_node_env');
|
|
|
|
var yaml = require('js-yaml');
|
|
var fs = require('fs');
|
|
var path = require('path');
|
|
|
|
var manifestsJsonPath = path.resolve(__dirname, '../.buildkite/ftr_configs_manifests.json');
|
|
console.log(manifestsJsonPath);
|
|
var manifestsSource = JSON.parse(fs.readFileSync(manifestsJsonPath, 'utf8'));
|
|
var allManifestPaths = Object.values(manifestsSource).flat();
|
|
|
|
try {
|
|
for (var manifestRelPath of allManifestPaths) {
|
|
var manifest = yaml.load(fs.readFileSync(manifestRelPath, 'utf8'));
|
|
if (manifest.enabled) {
|
|
manifest.enabled.forEach(function (x) {
|
|
console.log(x);
|
|
});
|
|
} else {
|
|
console.log(`${manifestRelPath} has no enabled FTR configs`);
|
|
}
|
|
}
|
|
} catch (e) {
|
|
console.log(e);
|
|
}
|