Use 'failed to' prefix for top-level CLI error messages#114
Merged
sgopinath1 merged 1 commit intoROCm:mainfrom Apr 14, 2026
Merged
Use 'failed to' prefix for top-level CLI error messages#114sgopinath1 merged 1 commit intoROCm:mainfrom
sgopinath1 merged 1 commit intoROCm:mainfrom
Conversation
Gerund-style errors (e.g. "creating X: ...") are appropriate for internal helpers but ambiguous at the CLI boundary where the user sees them directly. Switch to "failed to <verb>" for all top-level errors returned from cmd/ action handlers. Made-with: Cursor
There was a problem hiding this comment.
Pull request overview
This PR standardizes user-facing error messages returned by cmd/ CLI action handlers to use a clearer “failed to …” phrasing at the CLI boundary.
Changes:
- Replaced gerund-style top-level errors (e.g., “creating …”, “checking …”) with “failed to …” in GPU tracker commands.
- Updated CDI generate/validate command errors to follow the same “failed to …” pattern.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| cmd/amd-ctk/gpu-tracker/status/status.go | Updates GPU tracker status command error messages to “failed to …” phrasing. |
| cmd/amd-ctk/gpu-tracker/reset/reset.go | Updates GPU tracker reset command error messages to “failed to …” phrasing. |
| cmd/amd-ctk/gpu-tracker/release/release.go | Updates GPU release command error message to “failed to …” phrasing. |
| cmd/amd-ctk/gpu-tracker/initialize/initialize.go | Updates GPU tracker init command error messages to “failed to …” phrasing. |
| cmd/amd-ctk/gpu-tracker/gpu-tracker.go | Updates main gpu-tracker action handler errors for create/status/exclusive/shared operations. |
| cmd/amd-ctk/gpu-tracker/enable/enable.go | Updates GPU tracker enable command error messages to “failed to …” phrasing. |
| cmd/amd-ctk/gpu-tracker/disable/disable.go | Updates GPU tracker disable command error messages to “failed to …” phrasing. |
| cmd/amd-ctk/cdi/validate/validate.go | Updates CDI validate command error messages to “failed to …” phrasing. |
| cmd/amd-ctk/cdi/generate/generate.go | Updates CDI generate command error messages to “failed to …” phrasing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Gerund-style errors (e.g. "creating X: ...") are appropriate for internal helpers but ambiguous at the CLI boundary where the user sees them directly. Switch to "failed to " for all top-level errors returned from cmd/ action handlers.