Skip to content

[8.19] Updated js-yaml to v4 (#190678)#219852

Merged
elena-shostak merged 14 commits intoelastic:8.19from
elena-shostak:backport/8.19/pr-190678
May 2, 2025
Merged

[8.19] Updated js-yaml to v4 (#190678)#219852
elena-shostak merged 14 commits intoelastic:8.19from
elena-shostak:backport/8.19/pr-190678

Conversation

@elena-shostak
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 8.19:

Questions ?

Please refer to the Backport tool documentation

## Summary
Updated `js-yaml` to `4.1.0`.

This PR also introduces a type override for the `js-yaml` load function
to maintain compatibility across the codebase. Specifically, updated
type definition of the load function looks as follows:

```typescript
function load<T = any>(str: string, opts?: jsyaml.LoadOptions): T;
```

The original type definition of the load function in `js-yaml` changed
from `any` to `unknown`. This change would require extensive type
updates throughout the entire repository to accommodate the `unknown`
type. To avoid widespread type changes and potential issues in the
codebase, the type is overriden back to `any` for now.
This is a temporary measure, we plan to address the necessary type
changes in subsequent PRs, where teams will gradually update the
codebase to work with the `unknown` type.

### 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

## Release note
Updated `js-yaml` to `4.1.0`.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Maxim Palenov <maxim.palenov@elastic.co>
(cherry picked from commit 28aa274)

# Conflicts:
#	package.json
#	src/platform/packages/shared/kbn-ftr-common-functional-services/services/saml_auth/serverless/auth_provider.ts
#	src/platform/packages/shared/kbn-ftr-common-functional-services/services/saml_auth/stateful/auth_provider.ts
#	src/platform/packages/shared/kbn-openapi-bundler/tsconfig.json
#	x-pack/platform/plugins/shared/fleet/cypress/tsconfig.json
#	x-pack/platform/plugins/shared/fleet/server/routes/agent_policy/handlers.ts
#	x-pack/platform/plugins/shared/fleet/server/services/epm/agent/agent.ts
#	x-pack/platform/plugins/shared/integration_assistant/server/integration_builder/build_integration.ts
#	x-pack/plugins/fleet/server/services/epm/packages/get_template_inputs.ts
#	x-pack/plugins/integration_assistant/server/integration_builder/build_integration.test.ts
#	x-pack/plugins/observability_solution/observability_onboarding/common/elastic_agent_logs/system_logs/__snapshots__/generate_system_logs_yml.test.ts.snap
#	x-pack/plugins/observability_solution/observability_onboarding/common/elastic_agent_logs/system_logs/generate_system_logs_yml.ts
#	x-pack/plugins/observability_solution/uptime/e2e/tasks/read_kibana_config.ts
#	x-pack/plugins/osquery/docs/openapi/ess/osquery_api_2023_10_31.bundled.schema.yaml
#	x-pack/plugins/osquery/docs/openapi/serverless/osquery_api_2023_10_31.bundled.schema.yaml
#	x-pack/plugins/security_solution/docs/openapi/ess/security_solution_endpoint_management_api_2023_10_31.bundled.schema.yaml
#	x-pack/plugins/security_solution/docs/openapi/ess/security_solution_entity_analytics_api_2023_10_31.bundled.schema.yaml
#	x-pack/plugins/security_solution/docs/openapi/serverless/security_solution_endpoint_management_api_2023_10_31.bundled.schema.yaml
#	x-pack/plugins/security_solution/docs/openapi/serverless/security_solution_entity_analytics_api_2023_10_31.bundled.schema.yaml
#	x-pack/solutions/observability/plugins/observability_onboarding/server/routes/flow/route.ts
#	x-pack/solutions/observability/plugins/observability_onboarding/tsconfig.json
#	x-pack/solutions/security/packages/kbn-securitysolution-lists-common/docs/openapi/ess/security_solution_lists_api_2023_10_31.bundled.schema.yaml
#	x-pack/solutions/security/packages/kbn-securitysolution-lists-common/docs/openapi/serverless/security_solution_lists_api_2023_10_31.bundled.schema.yaml
#	x-pack/solutions/security/plugins/security_solution/docs/openapi/ess/security_solution_detections_api_2023_10_31.bundled.schema.yaml
#	x-pack/solutions/security/plugins/security_solution/docs/openapi/ess/security_solution_timeline_api_2023_10_31.bundled.schema.yaml
#	x-pack/solutions/security/plugins/security_solution/docs/openapi/serverless/security_solution_detections_api_2023_10_31.bundled.schema.yaml
#	x-pack/solutions/security/plugins/security_solution/docs/openapi/serverless/security_solution_timeline_api_2023_10_31.bundled.schema.yaml
#	x-pack/test/observability_onboarding_api_integration/tests/elastic_agent/config.spec.ts
#	yarn.lock
@elena-shostak elena-shostak added the backport This PR is a backport of another PR label May 1, 2025
@elena-shostak elena-shostak enabled auto-merge (squash) May 1, 2025 14:40
@botelastic botelastic bot added ci:project-deploy-observability Create an Observability project Team:Fleet Team label for Observability Data Collection Fleet team Team:obs-ux-infra_services - DEPRECATED DEPRECATED - Use Team:obs-presentation. labels May 1, 2025
@elena-shostak elena-shostak mentioned this pull request May 1, 2025
1 task
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/fleet (Team:Fleet)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented May 1, 2025

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@prodsecmachine
Copy link
Copy Markdown
Collaborator

prodsecmachine commented May 1, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@botelastic botelastic bot added the Team:actionable-obs Formerly "obs-ux-management", responsible for SLO, o11y alerting, significant events, & synthetics. label May 2, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented May 2, 2025

💛 Build succeeded, but was flaky

  • Buildkite Build
  • Commit: 6342713
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-219852-634271359256

Failed CI Steps

Test Failures

  • [job] [logs] Fleet Cypress Tests #1 / Space aware policies creation should allow to update that policy to belong to both test and default space
  • [job] [logs] Fleet Cypress Tests #1 / Space aware policies creation should redirect to the agent policies list when removing the current space from a policy
  • [job] [logs] Fleet Cypress Tests #1 / Space aware policies creation the policy should be visible in the default space

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
apm 1915 1885 -30
cloudDefend 102 72 -30
fleet 1220 1190 -30
synthetics 1223 1193 -30
total -120

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
apm 2.7MB 2.5MB -131.9KB
cloudDefend 228.1KB 96.0KB -132.0KB
fleet 1.8MB 1.6MB -132.5KB
synthetics 1.1MB 961.8KB -131.7KB
total -528.1KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
cloudDefend 9.2KB 9.1KB -77.0B

History

@elena-shostak elena-shostak merged commit 758fd1d into elastic:8.19 May 2, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR ci:project-deploy-observability Create an Observability project Team:actionable-obs Formerly "obs-ux-management", responsible for SLO, o11y alerting, significant events, & synthetics. Team:Fleet Team label for Observability Data Collection Fleet team Team:obs-ux-infra_services - DEPRECATED DEPRECATED - Use Team:obs-presentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants