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

[elasticsearch] Disable transform validation in system tests #12840

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

mrodm
Copy link
Contributor

@mrodm mrodm commented Feb 19, 2025

Proposed commit message

This PR adds a new system test configuration file to disable validation of transforms in elasticsearch package.

In the following version of elastic-package it is added support to read source indices in transforms defined as a comma-separated list of strings elastic/elastic-package#2388. This will cause that the following elastic-package version detects that the transform should be validated because it matches some of the datastream (index, index_recovery and index_summary data streams).
However, the validation fail with this error:

[400 Bad Request] {"error":{"root_cause":[{"type":"status_exception","reason":"Source indices have been deleted or closed."}],"type":"status_exception","reason":"Source indices have been deleted or closed."},"status":400}

If they are not skip, system tests for index, index_recovery and index_summary data streams would fail as in this Buildkite build: https://buildkite.com/elastic/integrations/builds/22461

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

Author's Checklist

How to test this PR locally

Related issues

@mrodm mrodm changed the title Disable transform validation in system tests [elasticsearch] Disable transform validation in system tests Feb 19, 2025
@elastic-vault-github-plugin-prod

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

Comment on lines 9 to 11
# Currently, when trying to run the preview of the transform logs-elasticsearch.index_pivot-default-0.1.0, fails with this error:
# [400 Bad Request] {"error":{"root_cause":[{"type":"status_exception","reason":"Source indices have been deleted or closed."}],"type":"status_exception","reason":"Source indices have been deleted or closed."},"status":400}
skip_transform_validation: true
Copy link
Contributor Author

@mrodm mrodm Feb 19, 2025

Choose a reason for hiding this comment

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

When testing with a newer stack version (tested with 8.17.1, 8.17.2 and 8.18.0-SNAPSHOT), there are no errors.

However, testing with the current stack version set in the manifest (8.10.1), this is failing with the error mentioned in the comment

  • Maybe is this caused due to the destination index is not created?

failed to preview transform "logs-elasticsearch.index_pivot-default-0.2.0": [400 Bad Request] {"error":{"root_cause":[{"type":"status_exception","reason":"Source indices have been deleted or closed."}],"type":"status_exception","reason":"Source indices have been deleted or closed."},"status":400}

Using other Elastic stack versions 8.14.0, 8.16.0 and 8.17.0, the error is different:

  • Maybe the filters/query in the transform cause that there are no documents to be processed?

failed to preview transform "logs-elasticsearch.index_pivot-default-0.2.0": [400 Bad Request] {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"must specify at least one document in [docs]"}],"type":"illegal_argument_exception","reason":"must specify at least one document in [docs]"},"status":400}

Copy link
Contributor Author

@mrodm mrodm Feb 19, 2025

Choose a reason for hiding this comment

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

Just found in the documentation, that it looks like it is expected that this transform just works in 8.17.1 and onward

For version 8.17.1+ of the module and collected data, the integration also installs a transform job called `logs-elasticsearch.index_pivot-default-{VERSION}`. This transform **isn't started by default** (Stack management > Transforms), but will perform the following once activated:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What would it be better here ? @jsoriano

I was thinking to rephrase the comment set here (and keep disabled the transform validation):

# Current `index_pivot` transform is expected to work just on stack versions >=8.17.1
# remove this setting once the kibana constraint in the package manifest is >=8.17.1
skip_transform_validation: true

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, lets keep this validation disabled by now if it is going to be problematic.

@mrodm mrodm self-assigned this Feb 19, 2025
@elasticmachine
Copy link

💚 Build Succeeded

History

cc @mrodm

Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@mrodm mrodm marked this pull request as ready for review February 20, 2025 11:30
@mrodm mrodm requested a review from a team as a code owner February 20, 2025 11:30
@mrodm mrodm added Integration:elasticsearch Elasticsearch Team:Stack Monitoring Stack Monitoring team [elastic/stack-monitoring] labels Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Integration:elasticsearch Elasticsearch Team:Stack Monitoring Stack Monitoring team [elastic/stack-monitoring]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants