fix(deps): update module github.com/redhatinsights/platform-go-middlewares to v2 - #456
Conversation
…wares to v2 Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
|
WalkthroughThe PR updates ChangesPlatform Go Middlewares V2 Upgrade
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@go.mod`:
- Line 15: main.go still imports the v1 path for the middleware; update the
import to "github.com/redhatinsights/platform-go-middlewares/v2/request_id" and
ensure the call to request_id.ConfiguredRequestID(...) continues to compile
against the v2 package, adjusting any symbol names/signatures if the v2 API
changed (search for request_id.ConfiguredRequestID in main.go to locate usage
and update the import path to the /v2 module).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| github.com/prometheus/client_golang v1.23.2 | ||
| github.com/redhatinsights/app-common-go v1.6.9 | ||
| github.com/redhatinsights/platform-go-middlewares v1.0.0 | ||
| github.com/redhatinsights/platform-go-middlewares/v2 v2.1.0 |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify whether v1 middleware imports are still present.
rg -n --type go -C2 'github\.com/redhatinsights/platform-go-middlewares(?!/v2)'
# Verify current usages of request_id middleware symbol.
rg -n --type go -C2 '\brequest_id\.ConfiguredRequestID\s*\('Repository: RedHatInsights/quickstarts
Length of output: 570
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== Find any v1 request_id imports =="
rg -n --type go 'github\.com/redhatinsights/platform-go-middlewares/request_id' .
echo "== Find any v2 request_id imports =="
rg -n --type go 'github\.com/redhatinsights/platform-go-middlewares/v2/request_id' .
echo "== Find usages of ConfiguredRequestID =="
rg -n --type go '\brequest_id\.ConfiguredRequestID\s*\(' .Repository: RedHatInsights/quickstarts
Length of output: 221
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== go.mod dependency for /v2 =="
sed -n '1,40p' go.mod | nl -ba
echo "== All v1 request_id imports =="
rg -n --type go 'github\.com/redhatinsights/platform-go-middlewares/request_id' .
echo "== All v2 request_id imports =="
rg -n --type go 'github\.com/redhatinsights/platform-go-middlewares/v2/request_id' .
echo "== Usages of ConfiguredRequestID =="
rg -n --type go '\bConfiguredRequestID\s*\(' .
echo "== Usages with request_id qualifier =="
rg -n --type go '\brequest_id\.ConfiguredRequestID\s*\(' .Repository: RedHatInsights/quickstarts
Length of output: 163
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== go.mod dependency for /v2 =="
awk 'NR<=40 {printf "%d:%s\n", NR, $0}' go.mod
echo "== All v1 request_id imports =="
rg -n --type go 'github\.com/redhatinsights/platform-go-middlewares/request_id' .
echo "== All v2 request_id imports =="
rg -n --type go 'github\.com/redhatinsights/platform-go-middlewares/v2/request_id' .
echo "== Usages of ConfiguredRequestID =="
rg -n --type go '\bConfiguredRequestID\s*\(' .
echo "== Usages with request_id qualifier =="
rg -n --type go '\brequest_id\.ConfiguredRequestID\s*\(' .Repository: RedHatInsights/quickstarts
Length of output: 1950
Complete the /v2 migration in Go imports (not just go.mod).
go.mod already upgrades to github.com/redhatinsights/platform-go-middlewares/v2 v2.1.0, but main.go still imports github.com/redhatinsights/platform-go-middlewares/request_id (v1 path) and uses request_id.ConfiguredRequestID(...). Update main.go to import the v2 request_id package (.../platform-go-middlewares/v2/request_id) so the code actually uses the v2 module.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@go.mod` at line 15, main.go still imports the v1 path for the middleware;
update the import to
"github.com/redhatinsights/platform-go-middlewares/v2/request_id" and ensure the
call to request_id.ConfiguredRequestID(...) continues to compile against the v2
package, adjusting any symbol names/signatures if the v2 API changed (search for
request_id.ConfiguredRequestID in main.go to locate usage and update the import
path to the /v2 module).
This PR contains the following updates:
v1.0.0→v2.1.0Warning
Some dependencies could not be looked up. Check the warning logs for more information.
Release Notes
redhatinsights/platform-go-middlewares (github.com/redhatinsights/platform-go-middlewares)
v2.1.0Compare Source
What's Changed
New Contributors
Full Changelog: RedHatInsights/platform-go-middlewares@v2.0.0...v2.1.0
v2.0.0Compare Source
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
To execute skipped test pipelines write comment
/ok-to-test.Documentation
Find out how to configure dependency updates in MintMaker documentation or see all available configuration options in Renovate documentation.