#433 Unbale to request new repositories in tests namespace.
Closed: Fixed 3 years ago by onosek. Opened 3 years ago by humaton.

Hi,

is this by design?

fedpkg request-repo --namespace tests -s 'repository for php CI tests' php
usage: fedpkg request-repo [-h] [--namespace {rpms,container,modules,flatpaks}]
                           [--description DESCRIPTION]
                           [--monitor {no-monitoring,monitoring,monitoring-with-scratch}]
                           [--upstreamurl UPSTREAMURL] [--summary SUMMARY] [--exception]
                           [--no-initial-commit]
                           name [bug]
fedpkg request-repo: error: argument --namespace: invalid choice: 'tests' (choose from 'rpms', 'container', 'modules', 'flatpaks')

People then request repositories by hand made json nad fedscm_admin fails to parse it


For this scenario, there is the specific command: fedpkg request-tests-repo.
Maybe this command is not visible in bash-completion (this can be fixed).

@onosek indeed it is not visible. Thanks for the info!

There were suggestions for the merge of these commands already. But both of these have a different set of argument that prevents it (at least complicates the argument parsing).

Maybe a special case could be added for the tests namespace to point out the correct command in an error message?

@lsedlar, I was thinking about it. You can look at the https://pagure.io/fedpkg/pull-request/434.
But I think fixing just the completion is sufficient. During writing the command 'request-tests-repo' will appear after writing 'request'.
The code change you are suggesting works, but argparser suggests namespace 'tests' and it might be confusing. Additionally, I don't like the change I did. Do you know about a better solution?
Anyway, I would keep only the bash_completion.

That's a good point. The help output would show tests as an available option, but the invocation would just give an error message. Not good UX. Bash completion might be enough.

Metadata Update from @onosek:
- Issue set to the milestone: 1.41

3 years ago

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #434 Merged 3 years ago