Skip to content
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

[TT-1275] Add retreiving of requests from killgrave #994

Merged
merged 2 commits into from
Jun 20, 2024

Conversation

tateexon
Copy link
Contributor

@tateexon tateexon commented Jun 14, 2024

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
    • Modified the expression for friendsofgo/killgrave to support versions with an optional 'v' prefix. This change broadens the range of acceptable version formats, making the workflow more versatile.
  • Makefile
    • Added a new target typos to run the detect-typos pre-commit hook against all files, thereby automating the detection of typos within the project.
  • docker/test_env/killgrave.go
    • Updated defaultKillgraveImage to use a newer version (v0.5.1-request-dump) that supports request dumping, enhancing the testing environment.
    • Added requestDumpDirBinding field to Killgrave struct to manage the binding for request dump directory.
    • Introduced setupRequestDump method to create a temporary directory for request dumps, facilitating better testing by allowing inspection of received requests.
    • Modified getContainerRequest to include a new bind mount for the request dump directory, ensuring that request data is accessible for testing purposes.
    • Added 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
    • Added 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.

Note: This requires approval of: friendsofgo/killgrave#170 which may still need changes.
@tateexon tateexon marked this pull request as ready for review June 20, 2024 13:24
@tateexon tateexon requested review from sebawo and a team as code owners June 20, 2024 13:24
@cl-sonarqube-production
Copy link

@tateexon tateexon merged commit 44dea25 into main Jun 20, 2024
27 checks passed
@tateexon tateexon deleted the TT-1275-killgrave-requests branch June 20, 2024 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants