fix(airbrake): upgrade http-proxy-middleware to v3 - #10297
Open
Adesanmi1 wants to merge 2 commits into
Open
Conversation
Bump http-proxy-middleware from ^2.0.0 to ^3.0.0 in the airbrake-backend plugin to resolve backstage#629. The plugin's custom pathRewrite already handles the v3 "removed req.url patching" behavior change since it defensively strips any leading path only up to the first "/api" segment and is a no-op otherwise. Signed-off-by: Adesanmi Aderibigbe <60453087+Adesanmi1@users.noreply.github.com>
Signed-off-by: Adesanmi Aderibigbe <60453087+Adesanmi1@users.noreply.github.com>
Contributor
Changed Packages
|
Contributor
|
Hey @Adesanmi1 it looks like the CI is failing on this PR. Can you try running |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey, I just made a Pull Request!
Upgrades
http-proxy-middlewarefrom^2.0.0to^3.0.0in theairbrake-backendplugin, resolving #629.Context
A previous Renovate PR (#406) attempting this same upgrade was closed without merging, since it was suspected to break due to the "pathRewrite (potential behavior change)" note in http-proxy-middleware's v3 migration guide (v3 removes automatic req.url patching, so pathRewrite may see the path already stripped of its mount prefix): https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION_V3.md#pathrewrite-potential-behavior-change
Looking at this plugin's
generateAirbrakePathRewritefunction, it strips any leading path only up through the first/apisegment using a regex, and otherwise leaves the path untouched. This makes it a no-op passthrough when the mount prefix has already been stripped, so it continues to behave correctly whether or not req.url still contains that prefix. This repo'sreport-portal-backendplugin already useshttp-proxy-middleware@^3.0.0successfully with a similar proxy setup, which supports this.No source code changes were needed, only the dependency bump and an accompanying changeset.
Checklist
Closes #629