Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ require (
github.com/briandowns/spinner v1.23.2
github.com/dchest/validator v0.0.0-20191217151620-8e45250f2371
github.com/dustin/go-humanize v1.0.1
github.com/golang-jwt/jwt/v4 v4.5.2
github.com/golang-jwt/jwt/v5 v5.3.1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
rg -n 'github.com/golang-jwt/jwt/v4' .

Repository: openshift/rosa

Length of output: 3890


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'go.mod:\n'
nl -ba go.mod | sed -n '20,28p'

printf '\nRemaining v4 references outside vendored upstream docs:\n'
rg -n 'github.com/golang-jwt/jwt/v4' go.sum cmd pkg vendor/modules.txt vendor/github.com/openshift-online/ocm-sdk-go --glob '!vendor/github.com/golang-jwt/jwt/v4/**'

printf '\nCurrent v5 references:\n'
rg -n 'github.com/golang-jwt/jwt/v5' go.mod go.sum cmd pkg vendor/modules.txt vendor/github.com/openshift-online/ocm-sdk-go

Repository: openshift/rosa

Length of output: 200


Finish the JWT v5 migration

go.mod is on github.com/golang-jwt/jwt/v5, but the tree still imports /v4 in pkg/config/token.go, pkg/config/config.go, cmd/token/cmd.go, and cmd/login/cmd.go, and go.sum still carries the old /v4 entries. Update the remaining imports and dependency metadata together so the build stays on one module path.

🤖 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 24, The JWT migration is incomplete because the codebase
still imports github.com/golang-jwt/jwt/v4 while go.mod has already moved to v5.
Update the imports in pkg/config/token.go, pkg/config/config.go,
cmd/token/cmd.go, and cmd/login/cmd.go to use the v5 module path, then refresh
dependency metadata so go.sum no longer retains the old v4 entries and
everything builds against a single JWT module version.

Source: Path instructions

github.com/golang/glog v1.2.5
github.com/google/go-cmp v0.7.0
github.com/google/uuid v1.6.0
Expand Down