Skip to content

Add error check for HTTPJSON template execution failure#2151

Merged
jsoriano merged 2 commits intoelastic:mainfrom
efd6:check_httpjson_template
Oct 11, 2024
Merged

Add error check for HTTPJSON template execution failure#2151
jsoriano merged 2 commits intoelastic:mainfrom
efd6:check_httpjson_template

Conversation

@efd6
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

efd6 commented Oct 9, 2024

test integrations

@elastic-vault-github-plugin-prod
Copy link
Copy Markdown

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 force-pushed the check_httpjson_template branch from b1b9c24 to 567d18b Compare October 9, 2024 07:56
@efd6 efd6 marked this pull request as ready for review October 9, 2024 08:57
@efd6 efd6 requested review from jsoriano and mrodm October 9, 2024 08:58
@jsoriano
Copy link
Copy Markdown
Member

jsoriano commented Oct 9, 2024

test integrations

Copy link
Copy Markdown
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?

},
{
// HTTPJSON template error.
includes: regexp.MustCompile(`^error processing response: template: :\d+:\d+: executing "" at <`),
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy link
Copy Markdown

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

@jsoriano
Copy link
Copy Markdown
Member

jsoriano commented Oct 9, 2024

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

@efd6
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

efd6 commented Oct 9, 2024

test integrations

@elastic-vault-github-plugin-prod
Copy link
Copy Markdown

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

@elasticmachine
Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

History

@jsoriano jsoriano merged commit 2a4ae69 into elastic:main Oct 11, 2024
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