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

Add error check for HTTPJSON template execution failure #2151

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

efd6
Copy link
Contributor

@efd6 efd6 commented Oct 9, 2024

We don't know if this will result in failures in existing integrations, so running test integrations with a view to resolving them if they exist before this is merged.

Sadly, it needs to be relaxed, but it's better than nothing.

ref: elastic/integrations#11361 (comment)

@efd6
Copy link
Contributor Author

efd6 commented Oct 9, 2024

test integrations

@elastic-vault-github-plugin-prod

Created or updated PR in integrations repository to test this version. Check elastic/integrations#11370

@efd6 efd6 force-pushed the check_httpjson_template branch 2 times, most recently from 85d4351 to b1b9c24 Compare October 9, 2024 04:52
@efd6 efd6 marked this pull request as ready for review October 9, 2024 08:57
@efd6 efd6 requested review from mrodm and jsoriano October 9, 2024 08:58
@jsoriano
Copy link
Member

jsoriano commented Oct 9, 2024

test integrations

Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

Thanks for adding this. It LGTM, would it be possible to add a test case?

@@ -120,6 +120,15 @@ var (
regexp.MustCompile(`Component state changed .* \(HEALTHY->DEGRADED\): Degraded: pid .* missed .* check-in`),
},
},
{
// HTTPJSON template error.
includes: regexp.MustCompile(`^error processing response: template: :\d+:\d+: executing "" at <`),
Copy link
Member

Choose a reason for hiding this comment

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

Would it be possible to have a test case that reproduces this issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How is this done?

Copy link
Member

Choose a reason for hiding this comment

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

We could maybe add a false positives test case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The current HTTPJSON false positive case is already hitting this logic.

@elastic-vault-github-plugin-prod

Created or updated PR in integrations repository to test this version. Check elastic/integrations#11370

@jsoriano
Copy link
Member

jsoriano commented Oct 9, 2024

There seems to be still a related failure in elastic/integrations#11370

@efd6
Copy link
Contributor Author

efd6 commented Oct 9, 2024

Expanded the set of unfortunate false positives. This cannot be worked around in the HTTPJSON template.

@efd6
Copy link
Contributor Author

efd6 commented Oct 9, 2024

test integrations

@elastic-vault-github-plugin-prod

Created or updated PR in integrations repository to test this version. Check elastic/integrations#11370

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

@jsoriano jsoriano merged commit 2a4ae69 into elastic:main Oct 11, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants