-
Notifications
You must be signed in to change notification settings - Fork 501
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
Try to fix GitHub Actions #663
Try to fix GitHub Actions #663
Conversation
Yay, I got the tests passing using Composer 2.1.14. It seems like Composer 2.2.4 did not fix the issue. Another solution for this problem would be to modify https://github.com/RequestsPHP/test-server/blob/e9311dc36fa95e9f0f4077cdccbc8aede84f2199/bin/start.sh#L1 from Or maybe we could copy the necessary files from https://github.com/RequestsPHP/test-server into this repository to avoid such problems alltogether? EDIT: Or apply a patch using https://github.com/cweagans/composer-patches. |
Hi @simonhammes, thank you for looking into this! I'd like to take a few steps back though and look at the various things you are saying one by one.
That's awesome! Please be aware though that Docker is no longer free for all, so may not be a sustainable solution. Also please be aware that people contributing to this library may be on a variety of OSes for their dev environment, so shell scripts would need to take that into account.
Did you not get the tests to run at all locally or did most tests run with a select number of tests being skipped/failing ?
While that may be a temporary work-around, it is not a solution and I would very much prefer a proper solution over a work-around which will bite us in the ass later on.
Same thing. I'd very much would like to avoid adding extra dependencies to work around a bug which should be fixed properly instead.
Nice find! Composer 2.2 has turned out to be quite problematic all around so far, I've been involved in two other issues myself so far. As that issue is closed, it may be worthwhile asking to reopen it it or to open a new, follow-up issue in the Composer repo outlining the problem you identified here.
I'm not sure that particular change would be the most stable cross-platform solution... ?
Actually, I think we should probably ask @rmccue if he's willing to give @schlessera and me admin access to the whole RequestsPHP organization as the test server repo is the only repo in it anyway. Come to think of it, moving this repo to that organisation with Alain and me as (extra) admins, might have been the better choice instead of the move to the WP organisation last year.... Once we have maintainer access to the test server repo, giving the code there a good once-over and tech debt review would be great! That repo has barely been touched for the past five/six years, so there's bound to be some touching up needed. Having access to that repo and being able to maintain it, will also help with a few test cases for this repo which need to be added as it will allow us to generate additional server responses needed for those tests cases. |
@rmccue If you have a chance, it would be great to get your input on the above proposal for adding @schlessera and me to the Test server repo... |
@jrfnl Thank you for getting back to me so quickly!
Some were failing, although I got all of them passing now. That also allowed me to open #667.
You are correct. I will close this PR since Composer 2.2.5 did not fix the issue and we should find a stable solution to this problem. |
@jrfnl Invited you and @schlessera as owners :) FWIW: the test app is hosted on a deprecated version of the Heroku platform. It might be possible to move these to Docker containers (or GH Actions) instead, but it was intentionally cloud-hosted to ensure it goes through a full HTTP and networking stack, and that things like HTTP proxies are actually working as desired. I used Heroku specifically because it passed through the data without interfering, other platforms tended to mess with the input/output data/headers or fail when passed semi-invalid data. (Happy to add you as collaborators on Heroku as well if desired, will need your Heroku account emails I think.) |
Thanks for that @rmccue ! I don't have a Heroku account myself. Maybe @schlessera has one ? I have a niggly feeling that we're currently running the test app directly in GH Actions already, but would need to verify this to be sure. |
Ah, I think actually the issue was that they need to run behind a real server so that it exercises HTTPS tests against the real CA stack. We use the domain in the tests to set the constants: Lines 14 to 16 in 73dbbbe
The test runner only overrides the HTTP version, not HTTPS: Requests/.github/workflows/test.yml Line 88 in 73dbbbe
This host is only used for calls to Requests/tests/Transport/BaseTestCase.php Line 833 in 73dbbbe
|
@rmccue We've fixed the code now. Would it be possible for you to add me to the Heroku app as a manager, so I can verify its state and push updates? I have a Heroku account under the email [email protected]. |
@schlessera Added! |
Thanks @rmccue ! |
Pull Request Type
This is a:
Detailed Description
The issue in https://github.com/WordPress/Requests/runs/4614423459?check_suite_focus=true might be related to composer/composer#10389, which was fixed/released in https://github.com/composer/composer/releases/tag/2.2.4.
Unfortunately I could not get the tests to run locally, but the error message disappeared after downgrading to Composer 2.1.14.
I am actually trying to work on #475 and maybe add a Dockerfile and a shell script to the repository to make it easier to run the tests locally.
Quality assurance
Documentation
For new features:
examples
directory.docs
directory.If the documentation is in a new markdown file, I have added a link to this new file to the Docs folder
README.md
file.