Skip to content
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

Can't upload-SRPM into custom copr directories (Error: Dirname doesn't exist) #2786

Closed
jn64 opened this issue Jun 24, 2023 · 2 comments · Fixed by #3106 or #3162
Closed

Can't upload-SRPM into custom copr directories (Error: Dirname doesn't exist) #2786

jn64 opened this issue Jun 24, 2023 · 2 comments · Fixed by #3106 or #3162
Assignees

Comments

@jn64
Copy link

jn64 commented Jun 24, 2023

copr-cli build --help and manual says I can specify the repo in the form project:<tag>, but it doesn't work. I tried with a few different repos under my user.

Error:

$ copr-cli build playground:foo bar.src.rpm

Something went wrong:
Error: Dirname 'playground:foo' doesn't exist in 'jn64/playground' copr

$ copr-cli --version
copr version 1.109

Quoting the manual:

Finally, instead of just project name, you can also pass project:tag. In that
case, the build will land into the project side repository instead of the
main repository. The side repository of the name project:tag will be
automatically created if it doesn’t exist yet. You can e.g. use this feature
to launch test builds while the main user-facing repository stays intact. You
can specify any tag that is appropriate for the given build(s).

@praiskup
Copy link
Member

praiskup commented Jun 26, 2023

Indeed, thank you for the report.

Source RPM upload via build seems to be broken, while e.g. build-distgit works:

$ copr build-distgit ping:non-existing --chroot fedora-rawhide-x86_64 --name cpio
Something went wrong:
Error: Please use directory format ping:custom:<SUFFIX_OF_CHOICE> or ping:pr:<ID> (for automatically removed directories)

$ copr build-distgit ping:custom:dir --chroot fedora-rawhide-x86_64 --name cpio
Build was added to ping:
  https://copr.fedorainfracloud.org/coprs/build/6112997
...

@jn64
Copy link
Author

jn64 commented Jul 17, 2023

Tangentially related: if/when this side tag works, is there any way to move a build from a side tag to the main repo? It would allow Copr users to have a kind of "updates testing" workflow and save time/resources on re-building the exact same build if their testing passes.

@praiskup praiskup changed the title Can't build into side tags (Error: Dirname doesn't exist) Can't upload-SRPM into custom copr directories (Error: Dirname doesn't exist) Jan 15, 2024
nikromen added a commit to nikromen/copr that referenced this issue Jan 16, 2024
Copr build <projectname:dirname> should according to documentation
create the dirname if does not exists, but the early check check_before_build
in action_build actually runs /build/check-before-build endpoint even
before the <projectname:dirname> has a chance to be created, thus
complains about non-existent dirname.
Passing only projectname to the check should be enough for the check as
is since the /build/check-before-build is called once more after dirname
creation.

Fixes fedora-copr#2786
nikromen added a commit to nikromen/copr that referenced this issue Feb 5, 2024
Copr build <projectname:dirname> should according to documentation
create the dirname if does not exists, but the early check check_before_build
in action_build actually runs /build/check-before-build endpoint even
before the <projectname:dirname> has a chance to be created, thus
complains about non-existent dirname.
Passing only projectname to the check should be enough for the check as
is since the /build/check-before-build is called once more after dirname
creation.

Fixes fedora-copr#2786
nikromen added a commit to nikromen/copr that referenced this issue Feb 5, 2024
Copr build <projectname:dirname> should according to documentation
create the dirname if does not exists, but the early check check_before_build
in action_build actually runs /build/check-before-build endpoint even
before the <projectname:dirname> has a chance to be created, thus
complains about non-existent dirname.
Passing only projectname to the check should be enough for the check as
is since the /build/check-before-build is called once more after dirname
creation.

Fixes fedora-copr#2786
nikromen added a commit to nikromen/copr that referenced this issue Feb 5, 2024
Copr build <projectname:dirname> should according to documentation
create the dirname if does not exists, but the early check check_before_build
in action_build actually runs /build/check-before-build endpoint even
before the <projectname:dirname> has a chance to be created, thus
complains about non-existent dirname.
Passing only projectname to the check should be enough for the check as
is since the /build/check-before-build is called once more after dirname
creation.

Fixes fedora-copr#2786
praiskup pushed a commit that referenced this issue Feb 5, 2024
Copr build <projectname:dirname> should according to documentation
create the dirname if does not exists, but the early check check_before_build
in action_build actually runs /build/check-before-build endpoint even
before the <projectname:dirname> has a chance to be created, thus
complains about non-existent dirname.
Passing only projectname to the check should be enough for the check as
is since the /build/check-before-build is called once more after dirname
creation.

Fixes #2786
praiskup added a commit to praiskup/copr that referenced this issue Feb 29, 2024
We don't want to start uploading when the CoprDir format is invalid.

Follow-up-for: abb1bfe
Fixes: fedora-copr#2786
praiskup added a commit to praiskup/copr that referenced this issue Feb 29, 2024
We don't want to start uploading when the CoprDir format is invalid.

Follow-up-for: abb1bfe
Fixes: fedora-copr#2786
praiskup added a commit to praiskup/copr that referenced this issue Mar 1, 2024
We don't want to start uploading when the CoprDir format is invalid.

Follow-up-for: abb1bfe
Fixes: fedora-copr#2786
praiskup added a commit that referenced this issue Mar 1, 2024
We don't want to start uploading when the CoprDir format is invalid.

Follow-up-for: abb1bfe
Fixes: #2786
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
3 participants