Skip to content

Use 'failed to' prefix for top-level CLI error messages#114

Merged
sgopinath1 merged 1 commit intoROCm:mainfrom
shiv-tyagi:fix-gerund
Apr 14, 2026
Merged

Use 'failed to' prefix for top-level CLI error messages#114
sgopinath1 merged 1 commit intoROCm:mainfrom
shiv-tyagi:fix-gerund

Conversation

@shiv-tyagi
Copy link
Copy Markdown
Member

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.

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
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread cmd/amd-ctk/gpu-tracker/status/status.go Outdated
Copy link
Copy Markdown
Collaborator

@sgopinath1 sgopinath1 left a comment

Choose a reason for hiding this comment

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

LGTM

@sgopinath1 sgopinath1 merged commit a01e79e into ROCm:main Apr 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants