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

[Ops] Upgrade to axios 1.4 #163732

Merged
merged 11 commits into from Aug 22, 2023
Merged

Conversation

delanni
Copy link
Contributor

@delanni delanni commented Aug 11, 2023

Summary

upgrade axios to 1.4

  • adjust to header usage, and config optionality
  • Axios' adapters are now resolved from a string key by axios, no need to import/instantiate adapters
  • most of the changed code stems from changes in Axios' types
    • response.config is now optional
    • there was a change in the type of AxiosHeaders <-> InternalAxiosHeaders

Closes: #162661
Closes: #162414

@delanni delanni force-pushed the kib-162661-upgrade-axios branch 2 times, most recently from 9848598 to 3a9a03c Compare August 14, 2023 08:52
@delanni
Copy link
Contributor Author

delanni commented Aug 14, 2023

@elasticmachine merge upstream

@delanni delanni marked this pull request as ready for review August 15, 2023 08:43
@delanni delanni requested review from a team as code owners August 15, 2023 08:43
@delanni
Copy link
Contributor Author

delanni commented Aug 15, 2023

@elasticmachine merge upstream

@botelastic botelastic bot added the Team:APM All issues that need APM UI Team support label Aug 15, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:APM)

@delanni delanni added Team:Operations Team label for Operations Team release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting and removed Team:APM All issues that need APM UI Team support labels Aug 15, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@delanni delanni added the backport:prev-MAJOR Backport to the previous major branch (7.x) and all later branches still in development label Aug 15, 2023
Copy link
Contributor

@yngrdyn yngrdyn left a comment

Choose a reason for hiding this comment

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

APM changes LGTM

Copy link
Member

@dmlemeshko dmlemeshko left a comment

Choose a reason for hiding this comment

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

Appex-QA changes LGTM

@delanni
Copy link
Contributor Author

delanni commented Aug 21, 2023

@elasticmachine merge upstream

Copy link
Member

@tsullivan tsullivan left a comment

Choose a reason for hiding this comment

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

Reporting changes LGTM!

Copy link
Member

@pmuellr pmuellr left a comment

Choose a reason for hiding this comment

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

ResponseOps changes LGTM

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Security Solution Cypress Tests #3 / Exceptions viewer read only "before each" hook for "Cannot add an exception from empty viewer screen" "before each" hook for "Cannot add an exception from empty viewer screen"

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
canvas 1224 1235 +11

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
canvas 1020.3KB 1.0MB +9.4KB
Unknown metric groups

ESLint disabled line counts

id before after diff
actions 21 19 -2

Total ESLint disabled count

id before after diff
actions 23 21 -2

History

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

Copy link
Contributor

@szaffarano szaffarano left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@machadoum machadoum left a comment

Choose a reason for hiding this comment

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

threat-hunting-explore changes LGTM!

@delanni
Copy link
Contributor Author

delanni commented Aug 22, 2023

Thanks everyone for your attention and reviews! 🚀

@delanni delanni merged commit 9d2696b into elastic:main Aug 22, 2023
35 checks passed
@delanni delanni deleted the kib-162661-upgrade-axios branch August 22, 2023 09:47
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 22, 2023
## Summary
upgrade `axios` to 1.4

- adjust to header usage, and config optionality
- Axios' adapters are now resolved from a string key by axios, no need
to import/instantiate adapters
- most of the changed code stems from changes in Axios' types
  - `response.config` is now optional
- there was a change in the type of AxiosHeaders <->
InternalAxiosHeaders

Closes: elastic#162661
Closes: elastic#162414

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 9d2696b)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
7.17 Backport failed because of merge conflicts
8.10
8.9 Backport failed because of merge conflicts

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 163732

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Aug 22, 2023
# Backport

This will backport the following commits from `main` to `8.10`:
- [[Ops] Upgrade to axios 1.4
(#163732)](#163732)

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

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

<!--BACKPORT [{"author":{"name":"Alex
Szabo","email":"alex.szabo@elastic.co"},"sourceCommit":{"committedDate":"2023-08-22T09:47:48Z","message":"[Ops]
Upgrade to axios 1.4 (#163732)\n\n## Summary\r\nupgrade `axios` to
1.4\r\n\r\n- adjust to header usage, and config optionality\r\n- Axios'
adapters are now resolved from a string key by axios, no need\r\nto
import/instantiate adapters\r\n- most of the changed code stems from
changes in Axios' types\r\n - `response.config` is now optional\r\n-
there was a change in the type of AxiosHeaders
<->\r\nInternalAxiosHeaders\r\n\r\nCloses: #162661 \r\nCloses:
#162414\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"9d2696b5c5159870cecf02c9f23090b26c924c87","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","Team:APM","release_note:skip","backport:prev-MAJOR","v7.17.13","v8.11.0"],"number":163732,"url":"#163732
Upgrade to axios 1.4 (#163732)\n\n## Summary\r\nupgrade `axios` to
1.4\r\n\r\n- adjust to header usage, and config optionality\r\n- Axios'
adapters are now resolved from a string key by axios, no need\r\nto
import/instantiate adapters\r\n- most of the changed code stems from
changes in Axios' types\r\n - `response.config` is now optional\r\n-
there was a change in the type of AxiosHeaders
<->\r\nInternalAxiosHeaders\r\n\r\nCloses: #162661 \r\nCloses:
#162414\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"9d2696b5c5159870cecf02c9f23090b26c924c87"}},"sourceBranch":"main","suggestedTargetBranches":["7.17"],"targetPullRequestStates":[{"branch":"7.17","label":"v7.17.13","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"#163732
Upgrade to axios 1.4 (#163732)\n\n## Summary\r\nupgrade `axios` to
1.4\r\n\r\n- adjust to header usage, and config optionality\r\n- Axios'
adapters are now resolved from a string key by axios, no need\r\nto
import/instantiate adapters\r\n- most of the changed code stems from
changes in Axios' types\r\n - `response.config` is now optional\r\n-
there was a change in the type of AxiosHeaders
<->\r\nInternalAxiosHeaders\r\n\r\nCloses: #162661 \r\nCloses:
#162414\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"9d2696b5c5159870cecf02c9f23090b26c924c87"}}]}]
BACKPORT-->

Co-authored-by: Alex Szabo <alex.szabo@elastic.co>
delanni added a commit to delanni/kibana that referenced this pull request Aug 22, 2023
upgrade `axios` to 1.4

- adjust to header usage, and config optionality
- Axios' adapters are now resolved from a string key by axios, no need
to import/instantiate adapters
- most of the changed code stems from changes in Axios' types
  - `response.config` is now optional
- there was a change in the type of AxiosHeaders <->
InternalAxiosHeaders

Closes: elastic#162661
Closes: elastic#162414

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 9d2696b)
@delanni
Copy link
Contributor Author

delanni commented Aug 22, 2023

💚 All backports created successfully

Status Branch Result
7.17

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

Questions ?

Please refer to the Backport tool documentation

delanni added a commit that referenced this pull request Aug 23, 2023
# Backport

This will backport the following commits from `main` to `7.17`:
- [[Ops] Upgrade to axios 1.4
(#163732)](#163732)

<!--- Backport version: 8.9.8 --->

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

<!--BACKPORT [{"author":{"name":"Alex
Szabo","email":"alex.szabo@elastic.co"},"sourceCommit":{"committedDate":"2023-08-22T09:47:48Z","message":"[Ops]
Upgrade to axios 1.4 (#163732)\n\n## Summary\r\nupgrade `axios` to
1.4\r\n\r\n- adjust to header usage, and config optionality\r\n- Axios'
adapters are now resolved from a string key by axios, no need\r\nto
import/instantiate adapters\r\n- most of the changed code stems from
changes in Axios' types\r\n - `response.config` is now optional\r\n-
there was a change in the type of AxiosHeaders
<->\r\nInternalAxiosHeaders\r\n\r\nCloses: #162661 \r\nCloses:
#162414\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"9d2696b5c5159870cecf02c9f23090b26c924c87","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","Team:APM","release_note:skip","backport:prev-MAJOR","v8.10.0","v7.17.13","v8.11.0"],"number":163732,"url":"#163732
Upgrade to axios 1.4 (#163732)\n\n## Summary\r\nupgrade `axios` to
1.4\r\n\r\n- adjust to header usage, and config optionality\r\n- Axios'
adapters are now resolved from a string key by axios, no need\r\nto
import/instantiate adapters\r\n- most of the changed code stems from
changes in Axios' types\r\n - `response.config` is now optional\r\n-
there was a change in the type of AxiosHeaders
<->\r\nInternalAxiosHeaders\r\n\r\nCloses: #162661 \r\nCloses:
#162414\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"9d2696b5c5159870cecf02c9f23090b26c924c87"}},"sourceBranch":"main","suggestedTargetBranches":["7.17"],"targetPullRequestStates":[{"branch":"8.10","label":"v8.10.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"#164409
[Ops] Upgrade to axios 1.4 (#163732) (#164409)\n\n# Backport\n\nThis
will backport the following commits from `main` to `8.10`:\n- [[Ops]
Upgrade to axios
1.4\n(#163732)](#163732
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT
[{\"author\":{\"name\":\"Alex\nSzabo\",\"email\":\"alex.szabo@elastic.co\"},\"sourceCommit\":{\"committedDate\":\"2023-08-22T09:47:48Z\",\"message\":\"[Ops]\nUpgrade
to axios 1.4 (#163732)\\n\\n## Summary\\r\\nupgrade `axios`
to\n1.4\\r\\n\\r\\n- adjust to header usage, and config
optionality\\r\\n- Axios'\nadapters are now resolved from a string key
by axios, no need\\r\\nto\nimport/instantiate adapters\\r\\n- most of
the changed code stems from\nchanges in Axios' types\\r\\n -
`response.config` is now optional\\r\\n-\nthere was a change in the type
of AxiosHeaders\n<->\\r\\nInternalAxiosHeaders\\r\\n\\r\\nCloses:
#162661
\\r\\nCloses:\n#162414\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:
Kibana
Machine\n<42973632+kibanamachine@users.noreply.github.com>\",\"sha\":\"9d2696b5c5159870cecf02c9f23090b26c924c87\",\"branchLabelMapping\":{\"^v8.11.0$\":\"main\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"Team:Operations\",\"Team:APM\",\"release_note:skip\",\"backport:prev-MAJOR\",\"v7.17.13\",\"v8.11.0\"],\"number\":163732,\"url\":\"#163732
to axios 1.4 (#163732)\\n\\n## Summary\\r\\nupgrade `axios`
to\n1.4\\r\\n\\r\\n- adjust to header usage, and config
optionality\\r\\n- Axios'\nadapters are now resolved from a string key
by axios, no need\\r\\nto\nimport/instantiate adapters\\r\\n- most of
the changed code stems from\nchanges in Axios' types\\r\\n -
`response.config` is now optional\\r\\n-\nthere was a change in the type
of AxiosHeaders\n<->\\r\\nInternalAxiosHeaders\\r\\n\\r\\nCloses:
#162661
\\r\\nCloses:\n#162414\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:
Kibana
Machine\n<42973632+kibanamachine@users.noreply.github.com>\",\"sha\":\"9d2696b5c5159870cecf02c9f23090b26c924c87\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[\"7.17\"],\"targetPullRequestStates\":[{\"branch\":\"7.17\",\"label\":\"v7.17.13\",\"labelRegex\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"},{\"branch\":\"main\",\"label\":\"v8.11.0\",\"labelRegex\":\"^v8.11.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"#163732
to axios 1.4 (#163732)\\n\\n## Summary\\r\\nupgrade `axios`
to\n1.4\\r\\n\\r\\n- adjust to header usage, and config
optionality\\r\\n- Axios'\nadapters are now resolved from a string key
by axios, no need\\r\\nto\nimport/instantiate adapters\\r\\n- most of
the changed code stems from\nchanges in Axios' types\\r\\n -
`response.config` is now optional\\r\\n-\nthere was a change in the type
of AxiosHeaders\n<->\\r\\nInternalAxiosHeaders\\r\\n\\r\\nCloses:
#162661
\\r\\nCloses:\n#162414\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:
Kibana
Machine\n<42973632+kibanamachine@users.noreply.github.com>\",\"sha\":\"9d2696b5c5159870cecf02c9f23090b26c924c87\"}}]}]\n\nCo-authored-by:
Alex Szabo
<alex.szabo@elastic.co>"}},{"branch":"7.17","label":"v7.17.13","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"#163732
Upgrade to axios 1.4 (#163732)\n\n## Summary\r\nupgrade `axios` to
1.4\r\n\r\n- adjust to header usage, and config optionality\r\n- Axios'
adapters are now resolved from a string key by axios, no need\r\nto
import/instantiate adapters\r\n- most of the changed code stems from
changes in Axios' types\r\n - `response.config` is now optional\r\n-
there was a change in the type of AxiosHeaders
<->\r\nInternalAxiosHeaders\r\n\r\nCloses: #162661 \r\nCloses:
#162414\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"9d2696b5c5159870cecf02c9f23090b26c924c87"}}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-MAJOR Backport to the previous major branch (7.x) and all later branches still in development release_note:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support Team:Operations Team label for Operations Team v7.17.13 v8.10.0 v8.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade axios to v1.4