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

Getting traceback on copr-build command #688

Closed
jkonecny12 opened this issue Jan 28, 2020 · 6 comments · Fixed by #713
Closed

Getting traceback on copr-build command #688

jkonecny12 opened this issue Jan 28, 2020 · 6 comments · Fixed by #713
Labels
area/copr Related to the integration with copr.fedorainfracloud.org/ good-first-issue Good for newcomers. kind/bug Something isn't working.

Comments

@jkonecny12
Copy link
Contributor

Hello,

I've tried to make a copr build from command line on a fork of my project python-simpleline.

Unfortunately, I'm getting this error:

$ packit --debug copr-build

16:21:58.097 config.py         DEBUG  Loading user config from directory: /home/jkonecny/.config
16:21:58.097 config.py         DEBUG  Trying to load user config from: /home/jkonecny/.config/.packit.yaml
16:21:58.097 config.py         DEBUG  Trying to load user config from: /home/jkonecny/.config/.packit.yml
16:21:58.097 config.py         DEBUG  Trying to load user config from: /home/jkonecny/.config/.packit.json
16:21:58.097 config.py         DEBUG  Trying to load user config from: /home/jkonecny/.config/packit.yaml
16:21:58.097 config.py         DEBUG  Trying to load user config from: /home/jkonecny/.config/packit.yml
16:21:58.097 config.py         DEBUG  Trying to load user config from: /home/jkonecny/.config/packit.json
WARNING  Please, use 'authentication' key in the user configuration to set tokens for GitHub and Pagure. New method supports more services and direct keys will be removed in the future.
Example:
authentication:
    github.com:
        token: GITHUB_TOKEN
    pagure:
        token: PAGURE_TOKEN
        instance_url: "https://src.fedoraproject.org"

16:21:58.102 utils.py          DEBUG  logging set to DEBUG
Packit 0.8.1 is being used.
Input is a directory: /home/jkonecny/Documents/RH/projects/simpleline
16:21:58.103 local_project.py  DEBUG  Arguments received in the init method of the LocalProject class:
git_repo: None
working_dir: /home/jkonecny/Documents/RH/projects/simpleline
ref: None
git_project: None
git_service: None
git_url:
full_name:
namespace:
repo_name:
offline: False
refresh True
remote: None
pr_id: None

16:21:58.103 local_project.py  DEBUG  working_dir is set and git_repo is not: let's discover...
16:21:58.103 local_project.py  DEBUG  It's a git repo!
16:21:58.104 local_project.py  DEBUG  Parsed ref master-enable-packit-test from the repo <git.Repo "/home/jkonecny/Documents/RH/projects/simpleline/.git">.
16:21:58.105 local_project.py  DEBUG  Parsed remote url git@github.com:jkonecny12/python-simpleline.git from the repo <git.Repo "/home/jkonecny/Documents/RH/projects/simpleline/.git">.
16:21:58.105 local_project.py  DEBUG  Parsed namespace and repo name (jkonecny12, python-simpleline) from url git@github.com:jkonecny12/python-simpleline.git.
16:21:58.105 local_project.py  DEBUG  Parsed full repo name jkonecny12/python-simpleline.
16:21:58.105 package_config.py DEBUG  Local package config found: /home/jkonecny/Documents/RH/projects/simpleline/.packit.yaml
16:21:58.107 package_config.py DEBUG  Package config:
{
    "specfile_path": "python-simpleline.spec",
    "upstream_package_name": "python-simpleline",
    "upstream_project_url": "https://github.com/rhinstaller/python-simpleline",
    "jobs": [
        {
            "job": "copr_build",
            "metadata": {
                "targets": [
                    "fedora-stable",
                    "fedora-rawhide-x86_64"
                ]
            },
            "trigger": "pull_request"
        },
        {
            "job": "propose_downstream",
            "trigger": "release",
            "metadata": {
                "dist-git-branch": "master"
            }
        }
    ]
}
Input directory is an upstream repository.
16:21:58.115 base_git.py       DEBUG  Running ActionName.post_upstream_clone hook.
16:21:58.115 base_git.py       DEBUG  Running ActionName.post_upstream_clone.
16:21:58.115 base_git.py       DEBUG  Running default implementation for ActionName.post_upstream_clone.
16:21:58.115 base_git.py       DEBUG  command handler = RunCommandType.local
16:21:58.116 utils.py          DEBUG  cmd = 'git describe --tags --match *'
16:21:58.120 utils.py          DEBUG  simpleline-1.6-2-g27baca8
16:21:58.121 upstream.py       DEBUG  version = simpleline-1.6-2-g27baca8
16:21:58.121 upstream.py       DEBUG  sanitized version = simpleline.1.6.2.g27baca8
16:21:58.121 upstream.py       DEBUG  name + version = python-simpleline-simpleline.1.6.2.g27baca8
15:21:58.197 utils.py          DEBUG  cmd = 'git archive -o python-simpleline-simpleline.1.6.2.g27baca8.tar.gz --prefix python-simpleline-simpleline.1.6.2.g27baca8/ HEAD'
15:21:58.221 base_git.py       DEBUG  Running ActionName.fix_spec.
15:21:58.221 base_git.py       DEBUG  Running default implementation for ActionName.fix_spec.
15:21:58.297 upstream.py       DEBUG  new %setup line:
%setup -q -n python-simpleline-simpleline.1.6.2.g27baca8
15:21:58.551 upstream.py       DEBUG  SRPM build command: "rpmbuild" "-bs" "--define" "_sourcedir /home/jkonecny/Documents/RH/projects/simpleline" "--define" "_srcdir /home/jkonecny/Documents/RH/projects/simplelin
e" "--define" "_specdir /home/jkonecny/Documents/RH/projects/simpleline" "--define" "_srcrpmdir /home/jkonecny/Documents/RH/projects/simpleline" "--define" "_topdir /home/jkonecny/Documents/RH/projects/simpleline"
 "--define" "_builddir /home/jkonecny/Documents/RH/projects/simpleline" "--define" "_rpmdir /home/jkonecny/Documents/RH/projects/simpleline" "--define" "_buildrootdir /home/jkonecny/Documents/RH/projects/simplelin
e" "python-simpleline.spec"
15:21:58.552 upstream.py       DEBUG  present srpms = {PosixPath('/home/jkonecny/Documents/RH/projects/simpleline/python-simpleline-simpleline.1.6.2.g27baca8-1.fc31.src.rpm')}
15:21:58.552 utils.py          DEBUG  cmd = 'rpmbuild -bs --define _sourcedir /home/jkonecny/Documents/RH/projects/simpleline --define _srcdir /home/jkonecny/Documents/RH/projects/simpleline --define _specdir /hom
e/jkonecny/Documents/RH/projects/simpleline --define _srcrpmdir /home/jkonecny/Documents/RH/projects/simpleline --define _topdir /home/jkonecny/Documents/RH/projects/simpleline --define _builddir /home/jkonecny/Do
cuments/RH/projects/simpleline --define _rpmdir /home/jkonecny/Documents/RH/projects/simpleline --define _buildrootdir /home/jkonecny/Documents/RH/projects/simpleline python-simpleline.spec'
15:21:58.613 utils.py          DEBUG  setting SOURCE_DATE_EPOCH=1579910400
15:21:58.628 utils.py          DEBUG  Wrote: /home/jkonecny/Documents/RH/projects/simpleline/python-simpleline-simpleline.1.6.2.g27baca8-1.fc31.src.rpm
15:21:58.635 upstream.py       DEBUG  setting SOURCE_DATE_EPOCH=1579910400
Wrote: /home/jkonecny/Documents/RH/projects/simpleline/python-simpleline-simpleline.1.6.2.g27baca8-1.fc31.src.rpm
SRPM is /home/jkonecny/Documents/RH/projects/simpleline/python-simpleline-simpleline.1.6.2.g27baca8-1.fc31.src.rpm
15:21:59.401 api.py            DEBUG  owner=value from the config file will be used, project=packit-cli-python-simpleline-master-enable-packit-test, path=/home/jkonecny/Documents/RH/projects/simpleline/python-simp
leline-simpleline.1.6.2.g27baca8-1.fc31.src.rpm
ERROR    Request wasn't successful, there is probably a bug in the API code.
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/packit/cli/utils.py", line 61, in covered_func
    func(config=config, *args, **kwargs)
  File "/usr/lib/python3.7/site-packages/packit/cli/copr_build.py", line 82, in copr_build
    instructions=instructions,
  File "/usr/lib/python3.7/site-packages/packit/api.py", line 666, in run_copr_build
    owner, project, srpm_path
  File "/usr/lib/python3.7/site-packages/copr/v3/helpers.py", line 59, in wrapper
    result = func(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/copr/v3/proxies/build.py", line 141, in create_from_file
    return self._create(endpoint, data, files=files, buildopts=buildopts)
  File "/usr/lib/python3.7/site-packages/copr/v3/helpers.py", line 59, in wrapper
    result = func(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/copr/v3/proxies/build.py", line 266, in _create
    response = request.send()
  File "/usr/lib/python3.7/site-packages/copr/v3/requests.py", line 52, in send
    handle_errors(response)
  File "/usr/lib/python3.7/site-packages/copr/v3/requests.py", line 108, in handle_errors
    raise CoprRequestException(response_json["error"], response=response)
copr.v3.exceptions.CoprRequestException: Request wasn't successful, there is probably a bug in the API code.
@lachmanfrantisek lachmanfrantisek added kind/bug Something isn't working. copr labels Jan 28, 2020
@lachmanfrantisek
Copy link
Member

@jkonecny12 thanks for the report. It's caused by the copr package we are using -- we need to handle that in a nicer way.


The related issue in the service repo:
packit/packit-service#316

What about closing the one in the service since we need to fix that here?

@dhodovsk
Copy link
Contributor

Duplicate of #686

@dhodovsk dhodovsk marked this as a duplicate of #686 Jan 28, 2020
@lachmanfrantisek
Copy link
Member

Duplicate of #686

I am not sure. They have no custom copr config.

@jpopelka
Copy link
Member

I can reproduce this every time and my ~/.config/copr is up to date.
This shouldn't be so hard to debug and either:

  • report to copr people
  • fix on our side
  • have a nicer error message

@jpopelka jpopelka added the good-first-issue Good for newcomers. label Feb 17, 2020
@jpopelka
Copy link
Member

@lbarcziova perhaps? ^

@lbarcziova
Copy link
Member

@jpopelka I can work on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/copr Related to the integration with copr.fedorainfracloud.org/ good-first-issue Good for newcomers. kind/bug Something isn't working.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants