Skip to content

NC | CLI | InvalidType Error | Replaced hard coded command types list with a dynamic list #8952

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 9, 2025

Conversation

romayalon
Copy link
Contributor

@romayalon romayalon commented Apr 9, 2025

Describe the Problem

While adding a new CLI command, we want to always add the new type to the list mentioned in CLI invalidType error message.

Explain the Changes

  1. Replaced the hard coded CLI types list to be dynamic so we won't need to add it to the list manually.

Issues: Fixed #xxx / Gap #xxx

  1. Fixed https://issues.redhat.com/browse/DFBUGS-2080

Testing Instructions:

  1. Run
% noobaa-cli
{
  "error": {
    "code": "InvalidType",
    "message": "Invalid type, valid types are account, bucket, whitelist, glacier, logging, diagnose, upgrade, notification, connection, lifecycle."
  }
}
  • Doc added/updated
  • Tests added

@romayalon romayalon changed the title NC | replace invalid type error hard coded command types list with a dynamic list NC | CLI | Replace invalid type error hard coded command types list with a dynamic list Apr 9, 2025
@romayalon romayalon requested a review from shirady April 9, 2025 07:02
Copy link
Contributor

@shirady shirady left a comment

Choose a reason for hiding this comment

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

LGTM

@romayalon romayalon force-pushed the romy-fix-lifecycle-help branch from 43490c3 to 6c6a1df Compare April 9, 2025 07:03
@romayalon romayalon changed the title NC | CLI | Replace invalid type error hard coded command types list with a dynamic list NC | CLI | InvalidType Error | Replaced hard coded command types list with a dynamic list Apr 9, 2025
@romayalon romayalon force-pushed the romy-fix-lifecycle-help branch 2 times, most recently from cb704a1 to 3acee9c Compare April 9, 2025 14:00
@romayalon romayalon force-pushed the romy-fix-lifecycle-help branch from 3acee9c to 118e6c0 Compare April 9, 2025 15:28
@romayalon romayalon merged commit 9a3f83a into noobaa:master Apr 9, 2025
11 of 12 checks passed
@romayalon romayalon mentioned this pull request May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants