Bug 1854987 - fedpkg request-repo --namespace tests foo does not work
Summary: fedpkg request-repo --namespace tests foo does not work
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: fedpkg
Version: 32
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ondřej Nosek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-08 15:02 UTC by Petr Menšík
Modified: 2021-05-26 07:49 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-25 16:32:50 UTC
Type: Bug


Attachments (Terms of Use)

Description Petr Menšík 2020-07-08 15:02:12 UTC
Description of problem:
fedpkg has request-repo command. I wanted to create namespace for tests in my package. But it refuses to try it this way.

Version-Release number of selected component (if applicable):
fedpkg-1.38-4.fc32.noarch

How reproducible:
always

Steps to Reproduce:
1. fedpkg request-repo --namespace tests bind
2.
3.

Actual results:
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')


Expected results:
the same for fedpkg request-tests-repo

Additional info:
I was told by friend, there is special command request-tests-repo. I haven't noticed it. Is there reason why request-repo can create multiple of namespaces, but only tests have to be created different way?

Comment 1 Ondřej Nosek 2020-07-08 19:25:11 UTC
Hi.
Does `request-tests-repo` work for you in the end?

There are reasons to have two separate subcommands `request-repo` and `request-tests-repo`. There are different sets of input arguments for both subcommands. I was considering unification couple months ago, but sets of required (and optional) arguments are quite different. After unification, schema (that is description shown after --help) would look unnecessarily complex and also implementation would be more difficult (including more robust argument checking). Now you can quite easily see, what arguments are needed for subcommands.

Comment 2 Petr Menšík 2020-07-09 10:02:01 UTC
No, it does not work in the end anyway. I tried to create tests/bind with it, scm ticket[1] got created. But it was automatically closed.

It seems they require upstreamurl specified. But that was not required by fedpkg. And according to request-tests-repo --help, it is not even supported.
It would be nice if you coodinated what is mandatory and what should be optional.

I am not sure what upstreamurl should be specified, it might default to rpms namespace of the same name, because the tests are not usually managed by upstream.

1. https://pagure.io/releng/fedora-scm-requests/issue/26934
2. https://pagure.io/fedscm-admin/issue/36

Comment 3 Petr Menšík 2020-07-09 11:03:46 UTC
Also, fedpkg request-tests-repo contains obsolete URL link pointing to wiki. Updated URL is: https://docs.fedoraproject.org/en-US/ci/share-test-code/

Comment 4 Petr Menšík 2020-07-09 11:08:50 UTC
(In reply to Ondřej Nosek from comment #1)
> Hi.
> Does `request-tests-repo` work for you in the end?
> 
> There are reasons to have two separate subcommands `request-repo` and
> `request-tests-repo`. There are different sets of input arguments for both
> subcommands. I was considering unification couple months ago, but sets of
> required (and optional) arguments are quite different. After unification,
> schema (that is description shown after --help) would look unnecessarily
> complex and also implementation would be more difficult (including more
> robust argument checking). Now you can quite easily see, what arguments are
> needed for subcommands.

It seems to me only namespace and component name should be mandatory. Also, test details from --help might move just to manual page. I doubt it should be common to get first information about namespace from the tool requesting it. I think short page describing existing namespaces and their purpose would be better, and --help might contain just single link to details about any namespaces. With hypertext links to details about each namespace.

Comment 5 Ondřej Nosek 2020-07-09 13:34:11 UTC
Hi Peter,

I can see it is a valid issue with the subcommand functionality.
Also, it seems fedscm-admin opened the request (https://pagure.io/fedscm-admin/pull-request/37) that deals with the situation. Until it is merged, maybe you can overcome it with requesting test repo again and quickly (before it is automatically closed) manually add to the created ticket:
"upstreamurl": "",

I will open the ticket for fedpkg to reconsider your suggestions and possibly other minor changes.

Comment 6 Petr Menšík 2020-07-09 14:56:50 UTC
It seems I lack ability to modify contents of created ticket. I found no way to edit the ticket.

Comment 7 Ondřej Nosek 2020-07-09 15:01:12 UTC
OK, it was just an assumption. I can remember I was able to manually close a ticket (and I am not a developer of fedscm-admin). Didn't try to modify it but I thought, a modification would be also allowed. And it is not obviously. Sorry for the wrong attempt.

Comment 8 Ondřej Nosek 2020-07-09 15:02:48 UTC
Hopefully, PR will be merged soon and there is no need to do workarounds.

Comment 9 Ondřej Nosek 2020-07-09 15:11:39 UTC
Or ... I should have been quicker ...
modify temporarily
sudo vim /usr/lib/python3.7/site-packages/fedpkg/cli.py:

variable 'ticket_body' around line 920:

+ 'upstreamurl': '',


It may work immediately because fedscm-admin has to be merged and then released.

Comment 10 Petr Menšík 2020-07-15 18:42:34 UTC
Maybe if backend is processing upstreamurl, why is it impossible to specify it on client side?
And it seems description might not be mandatory once it is merged and deployed.

Comment 11 Fedora Program Management 2021-04-29 16:33:04 UTC
This message is a reminder that Fedora 32 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '32'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 32 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 Ben Cotton 2021-05-25 16:32:50 UTC
Fedora 32 changed to end-of-life (EOL) status on 2021-05-25. Fedora 32 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.