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

nixpkgs-review pr results in HTTP Error 400: Bad Request #328

Closed
samuela opened this issue Apr 10, 2023 · 4 comments
Closed

nixpkgs-review pr results in HTTP Error 400: Bad Request #328

samuela opened this issue Apr 10, 2023 · 4 comments

Comments

@samuela
Copy link

samuela commented Apr 10, 2023

❯ nixpkgs-review pr 224927
$ git worktree prune
Traceback (most recent call last):
  File "/nix/store/f6qs6s51w6prb5lpz4klk85rywn4p1jb-nixpkgs-review-2.8.0/bin/.nixpkgs-review-wrapped", line 9, in <module>
    sys.exit(main())
  File "/nix/store/f6qs6s51w6prb5lpz4klk85rywn4p1jb-nixpkgs-review-2.8.0/lib/python3.10/site-packages/nixpkgs_review/__init__.py", line 10, in main
    cli.main(command, args)
  File "/nix/store/f6qs6s51w6prb5lpz4klk85rywn4p1jb-nixpkgs-review-2.8.0/lib/python3.10/site-packages/nixpkgs_review/cli/__init__.py", line 301, in main
    return cast(str, args.func(args))
  File "/nix/store/f6qs6s51w6prb5lpz4klk85rywn4p1jb-nixpkgs-review-2.8.0/lib/python3.10/site-packages/nixpkgs_review/cli/pr.py", line 68, in pr_command
    contexts.append((pr, builddir.path, review.build_pr(pr)))
  File "/nix/store/f6qs6s51w6prb5lpz4klk85rywn4p1jb-nixpkgs-review-2.8.0/lib/python3.10/site-packages/nixpkgs_review/review.py", line 202, in build_pr
    packages_per_system = self.github_client.get_borg_eval_gist(pr)
  File "/nix/store/f6qs6s51w6prb5lpz4klk85rywn4p1jb-nixpkgs-review-2.8.0/lib/python3.10/site-packages/nixpkgs_review/github.py", line 86, in get_borg_eval_gist
    for line in urllib.request.urlopen(raw_gist_url):
  File "/nix/store/iw1vmh509hcbby8dbpsaanbri4zsq7dj-python3-3.10.10/lib/python3.10/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "/nix/store/iw1vmh509hcbby8dbpsaanbri4zsq7dj-python3-3.10.10/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/nix/store/iw1vmh509hcbby8dbpsaanbri4zsq7dj-python3-3.10.10/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/nix/store/iw1vmh509hcbby8dbpsaanbri4zsq7dj-python3-3.10.10/lib/python3.10/urllib/request.py", line 563, in error
    return self._call_chain(*args)
  File "/nix/store/iw1vmh509hcbby8dbpsaanbri4zsq7dj-python3-3.10.10/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/nix/store/iw1vmh509hcbby8dbpsaanbri4zsq7dj-python3-3.10.10/lib/python3.10/urllib/request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Request

Any idea what could be causing this?

Btw, I tried to get the nixpkgs-review version with nixpkgs-review --version and nixpkgs-review -v to no avail, but it did give me the nix store hash:

❯ nixpkgs-review --version
usage: /nix/store/f6qs6s51w6prb5lpz4klk85rywn4p1jb-nixpkgs-review-2.8.0/bin/nixpkgs-review [-h] {post-result,approve,comments,merge,pr,rev,wip} ...
/nix/store/f6qs6s51w6prb5lpz4klk85rywn4p1jb-nixpkgs-review-2.8.0/bin/nixpkgs-review: error: the following arguments are required: subcommand
@figsoda
Copy link
Collaborator

figsoda commented Apr 10, 2023

should be fixed in 2.9.0, see #321. I tried running nixpkgs-review pr 224927 with nixpkgs-review 2.9.1 and it seems to be working fine

@samuela
Copy link
Author

samuela commented Apr 10, 2023

I'll try upgrading, thanks @figsoda! how can i figure out which nixpkgs-review version I'm currently on?

@figsoda
Copy link
Collaborator

figsoda commented Apr 10, 2023

Currently you can only find it from the path to nixpkgs-review

usage: /nix/store/f6qs6s51w6prb5lpz4klk85rywn4p1jb-nixpkgs-review-2.8.0/bin/nixpkgs-review [-h] {post-result,approve,comments,merge,pr,rev,wip} ...

nixpkgs-review-2.8.0

@samuela
Copy link
Author

samuela commented Apr 10, 2023

upgraded to

❯ nixpkgs-review
usage: /nix/store/iq6yxrmnwf3b21nwxkijnvs8895pflgp-nixpkgs-review-2.9.1/bin/nixpkgs-review [-h] {post-result,approve,comments,merge,pr,rev,wip} ...
/nix/store/iq6yxrmnwf3b21nwxkijnvs8895pflgp-nixpkgs-review-2.9.1/bin/nixpkgs-review: error: the following arguments are required: subcommand

and that seems to fix it!

@samuela samuela closed this as completed Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants