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.
This PR introduces API request logging using the DRF API logger project, for logging the API requests providers and people implementing carbon.txt are likely to make.
There are two tests, but by default our test suite does not exercise these tests. This is because DRF API logger works by running a thread in the background, and to spin it up you need to run use the
live_server
fixture for django pytest.The thing is, live server works by running, and then running tests in its own separate thread, which means that two tests that use the live_server fixture can end up influencing each other.
You can run the tests separately using this invocation, but right now, this isn't part of our CI action, as it would likely add at least a minute to the test and we are mainly testing config.