[TT-1275] Add retreiving of requests from killgrave #994
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.
Temporary usage of fork branch at: friendsofgo/killgrave#170
To unblock teams we have pushed up temporary dockerhub and ecr images that contain the code above that allows requests to be pulled and used in tests. TT-1290 has been made to clean this up once the code is merged on the killgrave side.
Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.
Why
The changes aim to enhance the project's capability to handle version expressions more flexibly, introduce typos detection, and improve the test environment by updating the version of Killgrave to support request dumping. These updates are essential for keeping the project compatible with external dependencies, ensuring code quality, and enhancing testing capabilities.
What
.github/workflows/update-internal-mirrors.yaml
expression
forfriendsofgo/killgrave
to support versions with an optional 'v' prefix. This change broadens the range of acceptable version formats, making the workflow more versatile.Makefile
typos
to run thedetect-typos
pre-commit hook against all files, thereby automating the detection of typos within the project.docker/test_env/killgrave.go
defaultKillgraveImage
to use a newer version (v0.5.1-request-dump
) that supports request dumping, enhancing the testing environment.requestDumpDirBinding
field toKillgrave
struct to manage the binding for request dump directory.setupRequestDump
method to create a temporary directory for request dumps, facilitating better testing by allowing inspection of received requests.getContainerRequest
to include a new bind mount for the request dump directory, ensuring that request data is accessible for testing purposes.GetReceivedRequests
method to read and parse the request dump, enabling tests to assert on the incoming requests to Killgrave.docker/test_env/killgrave_test.go
TestKillgraveRequestDump
to test the request dump functionality by asserting on the body of received requests, demonstrating the utility of the new feature in testing scenarios.