Fix 406 Client Error: Not Acceptable errors in test suite because new kind of Fastly filtering/blocking
#419
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
There is a test case which validates that the HTTP client croaks appropriately when connecting to non-CrateDB servers.
crate-python/src/crate/client/doctests/http.txt
Lines 184 to 191 in f773d76
Within that test, http://crate.io was used as an arbitrary domain to connect to. However, it looks like Fastly now blocks excessive/suspicious requests to that domain, for example when running the test matrix on CI, which invokes quite a number of requests, where their origin might also qualify as "unusual" for some fraud detection algorithms.
Traceback from CI
We started to observe those hiccups on behalf of CI jobs for #391 on May 13, 2022 at ~18 o'clock MEST.
-- https://github.com/crate/crate-python/runs/6409411353#step:6:196
Solution
I thought about using the webserver internal to the testsuite, but just changing the URL to https://httpbin.org/html was an even easier fix. We can come back to the former solution if this ones proves to be brittle as well.
/cc @WalBeh