Commit graph

6 commits

Author SHA1 Message Date
Gerard Soldevila
8efc526314
APEX-72 Enforce Kibana >= 8.18.0; Remove switchToModelVersionAt (#220985)
## Summary

* Address https://github.com/elastic/kibana/issues/217145 - Put in place
a check to ensure we're upgrading from Kibana 8.18.0 or newer.
* Address https://github.com/elastic/kibana/issues/220521 - New attempt
at removing the `switchToModelVersionAt` property, inspired on
https://github.com/elastic/kibana/pull/219029.

The previous attempt caused a regression: index meta information started
storing _modelVersions_ that were older than the previously stored ones,
which were defaulting to 10.0.0 for SO types that did NOT define
`modelVersions`.

This was due to the removal of the applyTypeDefaults, which was ensuring
all SOs had the `switchToModelVersionAt` property set.

This flag was then used by
`src/core/packages/saved-objects/base-server-internal/src/model_version/version_map.ts`
to determine whether to use `modelVersions` or the legacy `migrations`
property in order to determine the latest model version for a given
type.

When removing the `switchToModelVersionAt` flag (and its default
backfill), the logic started defaulting to the latest `migrations`
version for those SO types that were not defining any `modelVersion`,
resulting in older versions that those stored in the SO indices. This
caused incident https://elasticco.atlassian.net/browse/INC-3818.

This regression has been shipped in 9.0.0 (the PR was
[backported](https://github.com/elastic/kibana/pull/219329)), so in top
of the cleanup, we now need to address
https://github.com/elastic/kibana/issues/220521 to ensure a smooth
transition _OnPrem => Serverless_.

---------

Co-authored-by: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-20 16:41:54 +02:00
Gerard Soldevila
852f416a01
APEX-54 Stricter type checking for unsafe_transform functions (#222973)
Address https://github.com/elastic/kibana/issues/216061

Adds an indirection layer in the definition of the `transformFn:`, which
forces devs to explicitly define the types of the documents being
transformed.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-13 12:29:13 +02:00
Colleen McGinnis
fbda17de2d
[docs] Fix various syntax and rendering errors (#218883)
Fixes various syntax and rendering errors that might include:

* Fixing broken images
* Hardcoding book-level substitution values
* Fixing incorrectly closed blocks (admonitions, tab sets, code blocks,
dropdowns etc.)
* Fixing poorly migrated complex tables
* Fixing poorly migrated lists
* Fixing poorly migrated tab sets
* Removing inline text formatting from directive titles where they won't
be rendered (for example, inline `code` formatting in dropdown titles)
* Specifying if a version is trying to communicate if a feature was
added, deprecated, or coming (for example, during migration
`deprecated:[8.15.0]` became `[8.15.0]`, which doesn't give any
information about _what_ happened in 8.15.0)
* Note: I used an `{admonition}` for this, but you can change it to
prose or some other kind of admonition if you want.
* Fixing nested dropdowns / definition lists
* Fixing poorly migrated footnotes
* Updating references to prerelease `9.0.0` versions (using a repo-level
substitution until there is a solution to
https://github.com/elastic/docs-builder/issues/737)

Links to pages that were updated:

| Before | After |
|---|---|
| https://www.elastic.co/docs/extend/kibana/development-documentation |
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/development-documentation
|
| https://www.elastic.co/docs/extend/kibana/development-security |
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/development-security
|
| https://www.elastic.co/docs/extend/kibana/development-tests |
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/development-tests
|
|
https://www.elastic.co/docs/extend/kibana/external-plugin-functional-tests
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/external-plugin-functional-tests
|
| https://www.elastic.co/docs/extend/kibana/external-plugin-localization
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/external-plugin-localization
|
| https://www.elastic.co/docs/extend/kibana/interpreting-ci-failures |
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/interpreting-ci-failures
|
| https://www.elastic.co/docs/extend/kibana/plugin-list |
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/plugin-list
|
| https://www.elastic.co/docs/extend/kibana/sample-data |
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/sample-data
|
| https://www.elastic.co/docs/extend/kibana/saved-objects-service |
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/saved-objects-service
|
| https://www.elastic.co/docs/extend/kibana/sharing-saved-objects |
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/sharing-saved-objects
|
| https://www.elastic.co/docs/extend/kibana/stability |
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/extend/stability
|
| https://www.elastic.co/docs/reference/kibana/advanced-settings |
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/advanced-settings
|
|
https://www.elastic.co/docs/reference/kibana/configuration-reference/ai-assistant-settings
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/configuration-reference/ai-assistant-settings
|
|
https://www.elastic.co/docs/reference/kibana/configuration-reference/fleet-settings
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/configuration-reference/fleet-settings
|
|
https://www.elastic.co/docs/reference/kibana/configuration-reference/general-settings
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/configuration-reference/general-settings
|
|
https://www.elastic.co/docs/reference/kibana/configuration-reference/monitoring-settings
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/configuration-reference/monitoring-settings
|
|
https://www.elastic.co/docs/reference/kibana/configuration-reference/reporting-settings
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/configuration-reference/reporting-settings
|
|
https://www.elastic.co/docs/reference/kibana/configuration-reference/task-manager-settings
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/configuration-reference/task-manager-settings
|
|
https://www.elastic.co/docs/reference/kibana/connectors-kibana/cases-webhook-action-type
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/connectors-kibana/cases-webhook-action-type
|
|
https://www.elastic.co/docs/reference/kibana/connectors-kibana/email-action-type
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/connectors-kibana/email-action-type
|
|
https://www.elastic.co/docs/reference/kibana/connectors-kibana/pre-configured-connectors
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/connectors-kibana/pre-configured-connectors
|
|
https://www.elastic.co/docs/reference/kibana/connectors-kibana/servicenow-action-type
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/connectors-kibana/servicenow-action-type
|
|
https://www.elastic.co/docs/reference/kibana/connectors-kibana/servicenow-itom-action-type
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/connectors-kibana/servicenow-itom-action-type
|
|
https://www.elastic.co/docs/reference/kibana/connectors-kibana/servicenow-sir-action-type
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/connectors-kibana/servicenow-sir-action-type
|
|
https://www.elastic.co/docs/reference/kibana/connectors-kibana/thehive-action-type
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/connectors-kibana/thehive-action-type
|
|
https://www.elastic.co/docs/reference/kibana/connectors-kibana/webhook-action-type
|
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/connectors-kibana/webhook-action-type
|
| https://www.elastic.co/docs/reference/kibana/kibana-audit-events |
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/kibana-audit-events
|
| https://www.elastic.co/docs/reference/kibana/kibana-plugins |
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/reference/kibana-plugins
|
| https://www.elastic.co/docs/release-kibana/notes/index |
https://docs-v3-preview.elastic.dev/elastic/kibana/pull/218883/release-notes/index
|

---------

Co-authored-by: wajihaparvez <wajiha.parvez@elastic.co>
2025-05-22 10:10:07 +02:00
Alejandro Fernández Haro
75c0f9543a
Revert "Removed switchToModelVersionAt from SO API definition (#219029)" (#220059)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-05-05 16:01:45 +02:00
Christiane (Tina) Heiligers
19c017a111
Removed switchToModelVersionAt from SO API definition (#219029)
## Summary
Part of https://github.com/elastic/kibana/issues/201807

**Strategy**:
This PR assumes that `switchToModelVersionAt` has done it’s job and all
SO type owners now use `modelVersions` instead of `migrations`.
It takes the approach of trusting that this is fine™

**Changes in this PR:**
- `switchToModelVersionAt` removed from all registered saved objects, so
their mapping hash had to be updated.
- Implements `globalSwitchToModelVersionAt` directly in `version_map`
- Updates logic to prioritize `modelVersions` over `migrations` in
`getLatestMappingsModelVersion`, that previously relied on
`switchToModelVersionAt` being set
- Updates unit tests to match the refactored logic
- Updates snapshots
- Adapts SO types registered in the **cases**, **SLO** and **encrypted
saved objects** plugins.
- Updates docs

**Risks**:
- Plugin developers disregard the deprecated status of `migrations` and
introduce new versions, which will not be BWC. Saved object type hash
changes will notify the core team for a code owner review. The core team
needs to investigate the related changes and provide feedback.


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-26 08:00:09 -07:00
Colleen McGinnis
1814c60017
[docs] Migrate docs from AsciiDoc to Markdown (#212558)
Migrate docs from AsciiDoc to Markdown. The preview can be built after
#212557 is merged.

@florent-leborgne please tag reviewers, add the appropriate label(s),
and take this out of draft when you're ready.

Note: More files are deleted than added here because the content from
some files was moved to
[elastic/docs-content](https://github.com/elastic/docs-content).

**What has moved to
[elastic/docs-content](https://github.com/elastic/docs-content)?**

Public-facing narrative and conceptual docs have moved. Most can now be
found under the following directories in the new docs:
- explore-analyze: Discover, Dashboards, Visualizations, Reporting,
Alerting, dev tools...
- deploy-manage: Stack management (Spaces, user management, remote
clusters...)
- troubleshooting: .... troubleshooting pages

**What is staying in the Kibana repo?**

- Reference content (= anything that is or could be auto-generated):
Settings, syntax references
- Release notes
- Developer guide

---------

Co-authored-by: Florent Le Borgne <florent.leborgne@elastic.co>
2025-03-04 14:56:07 +01:00