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

[Fleet] Fix 500 in Fleet API when request to product versions endpoint throws ECONNREFUSED #172850

Merged
merged 2 commits into from Dec 7, 2023

Conversation

kpollich
Copy link
Member

@kpollich kpollich commented Dec 7, 2023

Summary

Network-level errors will cause fetch to throw rather than resolving with a status code. This PR updates our logic to handle this case for airgapped environments where ECONNREFUSED style errors squash HTTP requests at the DNS level.

@kpollich kpollich added release_note:fix Team:Fleet Team label for Observability Data Collection Fleet team backport:prev-minor Backport to the previous minor version (i.e. one version back from main) labels Dec 7, 2023
@kpollich kpollich self-assigned this Dec 7, 2023
@kpollich kpollich requested a review from a team as a code owner December 7, 2023 16:31
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

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

@kpollich kpollich enabled auto-merge (squash) December 7, 2023 17:06
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Detection Engine - Security Solution Cypress Tests #6 / Alert user assignment - ESS & Serverless Basic rendering alert with many assignees (collapsed into badge) in alert's details flyout alert with many assignees (collapsed into badge) in alert's details flyout

Metrics [docs]

✅ unchanged

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @kpollich

@kpollich kpollich merged commit be6fbc4 into elastic:main Dec 7, 2023
39 checks passed
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 7, 2023
…t throws ECONNREFUSED (elastic#172850)

## Summary

Network-level errors will cause `fetch` to `throw` rather than resolving
with a status code. This PR updates our logic to handle this case for
airgapped environments where `ECONNREFUSED` style errors squash HTTP
requests at the DNS level.

(cherry picked from commit be6fbc4)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 7, 2023
…t throws ECONNREFUSED (elastic#172850)

## Summary

Network-level errors will cause `fetch` to `throw` rather than resolving
with a status code. This PR updates our logic to handle this case for
airgapped environments where `ECONNREFUSED` style errors squash HTTP
requests at the DNS level.

(cherry picked from commit be6fbc4)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.11
8.12

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Dec 7, 2023
…endpoint throws ECONNREFUSED (#172850) (#172865)

# Backport

This will backport the following commits from `main` to `8.12`:
- [[Fleet] Fix 500 in Fleet API when request to product versions
endpoint throws ECONNREFUSED
(#172850)](#172850)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Kyle
Pollich","email":"kyle.pollich@elastic.co"},"sourceCommit":{"committedDate":"2023-12-07T18:14:35Z","message":"[Fleet]
Fix 500 in Fleet API when request to product versions endpoint throws
ECONNREFUSED (#172850)\n\n## Summary\r\n\r\nNetwork-level errors will
cause `fetch` to `throw` rather than resolving\r\nwith a status code.
This PR updates our logic to handle this case for\r\nairgapped
environments where `ECONNREFUSED` style errors squash HTTP\r\nrequests
at the DNS
level.","sha":"be6fbc4dcc8fff7e7419cf3fa9b05a6b13e3edba","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Fleet","backport:prev-minor","v8.12.0","v8.13.0","v8.11.3"],"number":172850,"url":"#172850
Fix 500 in Fleet API when request to product versions endpoint throws
ECONNREFUSED (#172850)\n\n## Summary\r\n\r\nNetwork-level errors will
cause `fetch` to `throw` rather than resolving\r\nwith a status code.
This PR updates our logic to handle this case for\r\nairgapped
environments where `ECONNREFUSED` style errors squash HTTP\r\nrequests
at the DNS
level.","sha":"be6fbc4dcc8fff7e7419cf3fa9b05a6b13e3edba"}},"sourceBranch":"main","suggestedTargetBranches":["8.12","8.11"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"#172850
Fix 500 in Fleet API when request to product versions endpoint throws
ECONNREFUSED (#172850)\n\n## Summary\r\n\r\nNetwork-level errors will
cause `fetch` to `throw` rather than resolving\r\nwith a status code.
This PR updates our logic to handle this case for\r\nairgapped
environments where `ECONNREFUSED` style errors squash HTTP\r\nrequests
at the DNS
level.","sha":"be6fbc4dcc8fff7e7419cf3fa9b05a6b13e3edba"}},{"branch":"8.11","label":"v8.11.3","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Kyle Pollich <kyle.pollich@elastic.co>
kibanamachine added a commit that referenced this pull request Dec 7, 2023
…endpoint throws ECONNREFUSED (#172850) (#172864)

# Backport

This will backport the following commits from `main` to `8.11`:
- [[Fleet] Fix 500 in Fleet API when request to product versions
endpoint throws ECONNREFUSED
(#172850)](#172850)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Kyle
Pollich","email":"kyle.pollich@elastic.co"},"sourceCommit":{"committedDate":"2023-12-07T18:14:35Z","message":"[Fleet]
Fix 500 in Fleet API when request to product versions endpoint throws
ECONNREFUSED (#172850)\n\n## Summary\r\n\r\nNetwork-level errors will
cause `fetch` to `throw` rather than resolving\r\nwith a status code.
This PR updates our logic to handle this case for\r\nairgapped
environments where `ECONNREFUSED` style errors squash HTTP\r\nrequests
at the DNS
level.","sha":"be6fbc4dcc8fff7e7419cf3fa9b05a6b13e3edba","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Fleet","backport:prev-minor","v8.12.0","v8.13.0","v8.11.3"],"number":172850,"url":"#172850
Fix 500 in Fleet API when request to product versions endpoint throws
ECONNREFUSED (#172850)\n\n## Summary\r\n\r\nNetwork-level errors will
cause `fetch` to `throw` rather than resolving\r\nwith a status code.
This PR updates our logic to handle this case for\r\nairgapped
environments where `ECONNREFUSED` style errors squash HTTP\r\nrequests
at the DNS
level.","sha":"be6fbc4dcc8fff7e7419cf3fa9b05a6b13e3edba"}},"sourceBranch":"main","suggestedTargetBranches":["8.12","8.11"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"#172850
Fix 500 in Fleet API when request to product versions endpoint throws
ECONNREFUSED (#172850)\n\n## Summary\r\n\r\nNetwork-level errors will
cause `fetch` to `throw` rather than resolving\r\nwith a status code.
This PR updates our logic to handle this case for\r\nairgapped
environments where `ECONNREFUSED` style errors squash HTTP\r\nrequests
at the DNS
level.","sha":"be6fbc4dcc8fff7e7419cf3fa9b05a6b13e3edba"}},{"branch":"8.11","label":"v8.11.3","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Kyle Pollich <kyle.pollich@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to the previous minor version (i.e. one version back from main) release_note:fix Team:Fleet Team label for Observability Data Collection Fleet team v8.11.3 v8.12.0 v8.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants