[bug]: project member update prints incorrect role ID in success message
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 88/100
Research direction
Start in cmd/harbor/root/project/member/update.go and inspect the success message after the project member update completes. Reproduce the command with --roleid 2, then verify the message displays the numeric role ID 2 instead of the formatting error.
Written by the indexing model from the issue text.
Description
Description
The project member update command prints an incorrect role ID in its success message after successfully updating a project member.
The success message formats a *models.RoleRequest value using the %d formatting verb instead of printing the numeric role ID.
Steps to Reproduce
- Configure Harbor CLI with a working Harbor instance.
- Run command:
harbor project member update <project-name> <member-name> --roleid 2 - Observe the success message after the update completes successfully.
Expected Behavior
The success message should display the numeric role ID.
Example:
successfully updated user with ID 1 with role ID 2 for project my-project
Actual Behavior
The success message attempts to format a *models.RoleRequest using %d, resulting in incorrect output instead of the numeric role ID.
Example:
successfully updated user with ID 1 with role ID %!d(*models.RoleRequest=...) for project my-project
Environment
- OS: Windows
- Tool version: Current
mainbranch - Other relevant details: Issue located in
cmd/harbor/root/project/member/update.go
Additional Context
The success message currently passes opts.RoleID (type *models.RoleRequest) to fmt.Printf using the %d format verb. The success message should print the numeric role ID instead.
- Dominant language
- Go
- Stars
- 163
- Forks
- 212
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from goharbor/harbor-cli
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
goharbor/harbor-cli#1102 ·
-
[bug]: harbor webhook list cmd renders both interactive ui and json when format specified is json Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
goharbor/harbor-cli#1098 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
goharbor/harbor-cli#1096 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
goharbor/harbor-cli#1080 ·
-
bug status/has-approved-pr
Difficulty 1/5 Under an hour Newbie friendliness 90/100
goharbor/harbor-cli#1072 · 1 comment ·
All issues in goharbor/harbor-cli
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100