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

urllib.error.HTTPError: HTTP Error 403: Forbidden #447

Closed
wegank opened this issue Dec 31, 2024 · 4 comments
Closed

urllib.error.HTTPError: HTTP Error 403: Forbidden #447

wegank opened this issue Dec 31, 2024 · 4 comments

Comments

@wegank
Copy link

wegank commented Dec 31, 2024

As the failure isn't caught, nixpkgs-review can't fall back to ofborg when no GH token is provided...

$ nixpkgs-review pr 369784
no oauth token found for github.com
-> Attempting to fetch eval results from GitHub actions
$ git worktree remove -f /home/weijia/.cache/nixpkgs-review/pr-369784/nixpkgs
fatal : '/home/weijia/.cache/nixpkgs-review/pr-369784/nixpkgs' n'est pas une copie de travail
Failed to remove worktree at /home/weijia/.cache/nixpkgs-review/pr-369784/nixpkgs. Please remove it manually. Git failed with: 128
Traceback (most recent call last):
  File "/nix/store/8b1i931y4hz4s0inp95fvh328ay522f8-nixpkgs-review-3.0.0/bin/.nixpkgs-review-wrapped", line 9, in <module>
    sys.exit(main())
             ^^^^^^
  File "/nix/store/8b1i931y4hz4s0inp95fvh328ay522f8-nixpkgs-review-3.0.0/lib/python3.12/site-packages/nixpkgs_review/__init__.py", line 10, in main
    cli.main(command, args)
  File "/nix/store/8b1i931y4hz4s0inp95fvh328ay522f8-nixpkgs-review-3.0.0/lib/python3.12/site-packages/nixpkgs_review/cli/__init__.py", line 348, in main
    return cast(str, args.func(args))
                     ^^^^^^^^^^^^^^^
  File "/nix/store/8b1i931y4hz4s0inp95fvh328ay522f8-nixpkgs-review-3.0.0/lib/python3.12/site-packages/nixpkgs_review/cli/pr.py", line 97, in pr_command
    contexts.append((pr, builddir.path, review.build_pr(pr)))
                                        ^^^^^^^^^^^^^^^^^^^
  File "/nix/store/8b1i931y4hz4s0inp95fvh328ay522f8-nixpkgs-review-3.0.0/lib/python3.12/site-packages/nixpkgs_review/review.py", line 300, in build_pr
    packages_per_system = self.github_client.get_github_action_eval_result(pr)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/8b1i931y4hz4s0inp95fvh328ay522f8-nixpkgs-review-3.0.0/lib/python3.12/site-packages/nixpkgs_review/github.py", line 182, in get_github_action_eval_result
    changed_paths: Any = self.get_json_from_artifact(
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/8b1i931y4hz4s0inp95fvh328ay522f8-nixpkgs-review-3.0.0/lib/python3.12/site-packages/nixpkgs_review/github.py", line 119, in get_json_from_artifact
    with no_redirect_opener.open(req) as resp:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/lib/python3.12/urllib/request.py", line 521, in open
    response = meth(req, response)
               ^^^^^^^^^^^^^^^^^^^
  File "/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/lib/python3.12/urllib/request.py", line 630, in http_response
    response = self.parent.error(
               ^^^^^^^^^^^^^^^^^^
  File "/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/lib/python3.12/urllib/request.py", line 559, in error
    return self._call_chain(*args)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/lib/python3.12/urllib/request.py", line 492, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/lib/python3.12/urllib/request.py", line 639, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden
@Mic92
Copy link
Owner

Mic92 commented Dec 31, 2024

I don't think we can fallback any longer to ofborg anyway except for old cached pull requests. The new ofborg infra likely won't do any evaluation.

@wegank
Copy link
Author

wegank commented Dec 31, 2024

Alright, thanks for the explanation. I think this issue can be closed.

@wegank wegank closed this as completed Dec 31, 2024
@Mic92
Copy link
Owner

Mic92 commented Dec 31, 2024

We should improve the http error though

@Mic92
Copy link
Owner

Mic92 commented Jan 5, 2025

Now the error is better.

@Mic92 Mic92 closed this as completed Jan 5, 2025
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