WordPress / WordPress/Requests

GH Actions: improve proxy access check step(s)

Open
#891 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type: testing/chores/QA
Dominant language
PHP
Stars
3.6k
Forks
500
Avg merge
2d 21h
Merged PRs (30d)
5

Description

The GH Actions test and quicktest workflows currently contain a "Access localhost on port 9002" step, which is not working correctly.

      - name: Access localhost on port 9002
        run: curl -i http://localhost:9002

Results in:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
HTTP/1.1 502 Bad Gateway
Server: mitmproxy 10.4.2
Connection: close
Content-Type: text/html
content-length: 231

<html>
<head>
    <title>502 Bad Gateway</title>
</head>
100   231  100   231    0     0  43008      0 --:--:-- --:--:-- --:--:-- 46200
<body>
    <h1>502 Bad Gateway</h1>
    <p>Connection killed: Request destination unknown. Unable to figure out where this request should be forwarded to.</p>
</body>
</html>

We should add the Curl -f flag to fail the step when the connection was not correctly made.

However, as things are, adding the -f flag would currently fail the step, so we first need to do something to improve the step and get it passing properly.

Additionally, we should add a second step to run a similar access test on port 9003.

Lastly, as - even with this failing proxy check - the tests are passing, we should verify that there are sufficient tests for the proxy handling in Requests.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the test and quicktest GitHub Actions workflows and inspect their localhost access steps for ports 9002 and 9003. Run the relevant workflow and existing proxy-handling tests first; done means both access checks fail on bad responses, pass on valid proxy access, and coverage is sufficient for the proxy behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, php
Domain
ci-cd, networking, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.