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

chore(deps): upgrade supertest and superagent #163716

Merged
merged 8 commits into from
Aug 16, 2023

Conversation

afharo
Copy link
Member

@afharo afharo commented Aug 11, 2023

Summary

I noticed that we cannot reenable the SSL redirect tests (#131192) because supertest/superagent fails to read the headers of the original request when creating the follow-up request.

await supertest.get('/').redirects(1).expect('location', '/spaces/enter').expect(302);

This is the relevant piece of code failing in the library:

Following any redirects makes Node.js crash because it's accessing req._headers, which is deprecated.

There's a known issue in the latest version of superagent when using the abort() method, though. There's a PR open to fix it ladjs/superagent#1774, and I updated the tests to workaround the bug.

For maintainers

@afharo afharo self-assigned this Aug 11, 2023
@afharo afharo added chore release_note:skip Skip the PR/issue when compiling release notes backport:all-open Backport to all branches that could still receive a release labels Aug 11, 2023
@afharo afharo force-pushed the upgrade/superagent-supertest branch from 7a7a220 to 0ef4fb7 Compare August 11, 2023 14:02
@afharo
Copy link
Member Author

afharo commented Aug 14, 2023

The tests that rely on request.abort() are failing due to a bug in superagent. I submitted ladjs/superagent#1774 to fix it on the library's end.

@afharo afharo force-pushed the upgrade/superagent-supertest branch from 8b43e16 to e264670 Compare August 14, 2023 13:13
@afharo afharo marked this pull request as ready for review August 14, 2023 14:36
@afharo afharo requested review from a team as code owners August 14, 2023 14:36
@afharo
Copy link
Member Author

afharo commented Aug 14, 2023

@elasticmachine merge upstream

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

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

@afharo afharo added the Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc label Aug 14, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@afharo
Copy link
Member Author

afharo commented Aug 14, 2023

@elasticmachine merge upstream

@afharo afharo enabled auto-merge (squash) August 14, 2023 16:27
@titanism
Copy link

v8.1.0 released which fixes this issue, thank you

npm install superagent@8.1.0

release notes @ https://github.com/ladjs/superagent/releases/tag/v8.1.0

Copy link
Contributor

@jloleysens jloleysens left a comment

Choose a reason for hiding this comment

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

LGTM, did not test locally but happy to merge this with a happy CI

@afharo afharo disabled auto-merge August 16, 2023 07:30
@afharo afharo removed the request for review from a team August 16, 2023 08:05
@afharo afharo enabled auto-merge (squash) August 16, 2023 08:05
Copy link
Member

@sorenlouv sorenlouv left a comment

Choose a reason for hiding this comment

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

apm change lgtm

@afharo
Copy link
Member Author

afharo commented Aug 16, 2023

@elasticmachine merge upstream

@afharo
Copy link
Member Author

afharo commented Aug 16, 2023

@elasticmachine merge upstream

@afharo afharo merged commit 24312ab into elastic:main Aug 16, 2023
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #30 / Synthetics API Tests EnableDefaultAlerting returns the created alerted when called

Metrics [docs]

✅ unchanged

History

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

cc @afharo

@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
7.17 Backport failed because of merge conflicts

You might need to backport the following PRs to 7.17:
- Upgrade ESLint to v8 (#162309)
8.9

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 163716

Questions ?

Please refer to the Backport tool documentation

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 16, 2023
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 24312ab)
kibanamachine added a commit that referenced this pull request Aug 16, 2023
…64053)

# Backport

This will backport the following commits from `main` to `8.9`:
- [chore(deps): upgrade `supertest` and `superagent`
(#163716)](#163716)

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

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

<!--BACKPORT [{"author":{"name":"Alejandro Fernández
Haro","email":"alejandro.haro@elastic.co"},"sourceCommit":{"committedDate":"2023-08-16T11:12:43Z","message":"chore(deps):
upgrade `supertest` and `superagent` (#163716)\n\nCo-authored-by: Kibana
Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"24312ab384cb2e5d3ac892619fcb654aed14b6da","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","Team:Core","Team:APM","release_note:skip","backport:all-open","v8.10.0"],"number":163716,"url":"https://github.com/elastic/kibana/pull/163716","mergeCommit":{"message":"chore(deps):
upgrade `supertest` and `superagent` (#163716)\n\nCo-authored-by: Kibana
Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"24312ab384cb2e5d3ac892619fcb654aed14b6da"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/163716","number":163716,"mergeCommit":{"message":"chore(deps):
upgrade `supertest` and `superagent` (#163716)\n\nCo-authored-by: Kibana
Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"24312ab384cb2e5d3ac892619fcb654aed14b6da"}}]}]
BACKPORT-->

Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
hop-dev pushed a commit to hop-dev/kibana that referenced this pull request Aug 16, 2023
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
afharo added a commit to afharo/kibana that referenced this pull request Aug 17, 2023
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 24312ab)

# Conflicts:
#	package.json
#	yarn.lock
@afharo
Copy link
Member Author

afharo commented Aug 17, 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

afharo added a commit that referenced this pull request Aug 17, 2023
…164142)

# Backport

This will backport the following commits from `main` to `7.17`:
- [chore(deps): upgrade `supertest` and `superagent`
(#163716)](#163716)

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

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

<!--BACKPORT [{"author":{"name":"Alejandro Fernández
Haro","email":"alejandro.haro@elastic.co"},"sourceCommit":{"committedDate":"2023-08-16T11:12:43Z","message":"chore(deps):
upgrade `supertest` and `superagent` (#163716)\n\nCo-authored-by: Kibana
Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"24312ab384cb2e5d3ac892619fcb654aed14b6da","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","Team:Core","Team:APM","release_note:skip","backport:all-open","v8.10.0","v8.9.1"],"number":163716,"url":"https://github.com/elastic/kibana/pull/163716","mergeCommit":{"message":"chore(deps):
upgrade `supertest` and `superagent` (#163716)\n\nCo-authored-by: Kibana
Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"24312ab384cb2e5d3ac892619fcb654aed14b6da"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/163716","number":163716,"mergeCommit":{"message":"chore(deps):
upgrade `supertest` and `superagent` (#163716)\n\nCo-authored-by: Kibana
Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"24312ab384cb2e5d3ac892619fcb654aed14b6da"}},{"branch":"8.9","label":"v8.9.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/164053","number":164053,"state":"MERGED","mergeCommit":{"sha":"3b64c613d2a9e279a4504c340a5fe766d4c99678","message":"[8.9]
chore(deps): upgrade `supertest` and `superagent` (#163716)
(#164053)\n\n# Backport\n\nThis will backport the following commits from
`main` to `8.9`:\n- [chore(deps): upgrade `supertest` and
`superagent`\n(#163716)](https://github.com/elastic/kibana/pull/163716)\n\n<!---
Backport version: 8.9.7 -->\n\n### Questions ?\nPlease refer to the
[Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT
[{\"author\":{\"name\":\"Alejandro
Fernández\nHaro\",\"email\":\"alejandro.haro@elastic.co\"},\"sourceCommit\":{\"committedDate\":\"2023-08-16T11:12:43Z\",\"message\":\"chore(deps):\nupgrade
`supertest` and `superagent` (#163716)\\n\\nCo-authored-by:
Kibana\nMachine\n<42973632+kibanamachine@users.noreply.github.com>\",\"sha\":\"24312ab384cb2e5d3ac892619fcb654aed14b6da\",\"branchLabelMapping\":{\"^v8.10.0$\":\"main\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"chore\",\"Team:Core\",\"Team:APM\",\"release_note:skip\",\"backport:all-open\",\"v8.10.0\"],\"number\":163716,\"url\":\"https://github.com/elastic/kibana/pull/163716\",\"mergeCommit\":{\"message\":\"chore(deps):\nupgrade
`supertest` and `superagent` (#163716)\\n\\nCo-authored-by:
Kibana\nMachine\n<42973632+kibanamachine@users.noreply.github.com>\",\"sha\":\"24312ab384cb2e5d3ac892619fcb654aed14b6da\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[],\"targetPullRequestStates\":[{\"branch\":\"main\",\"label\":\"v8.10.0\",\"labelRegex\":\"^v8.10.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/163716\",\"number\":163716,\"mergeCommit\":{\"message\":\"chore(deps):\nupgrade
`supertest` and `superagent` (#163716)\\n\\nCo-authored-by:
Kibana\nMachine\n<42973632+kibanamachine@users.noreply.github.com>\",\"sha\":\"24312ab384cb2e5d3ac892619fcb654aed14b6da\"}}]}]\nBACKPORT-->\n\nCo-authored-by:
Alejandro Fernández Haro <alejandro.haro@elastic.co>"}}]}] BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@mistic mistic added v8.9.2 and removed v8.9.1 labels Aug 17, 2023
@mistic
Copy link
Member

mistic commented Aug 17, 2023

This pr didn't make it into the build candidate for v8.9.1. Updating the labels.

bryce-b pushed a commit that referenced this pull request Aug 22, 2023
Co-authored-by: Kibana Machine <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:all-open Backport to all branches that could still receive a release chore release_note:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.17.13 v8.9.2 v8.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants