-
Notifications
You must be signed in to change notification settings - Fork 11
improvement: reuse docker compose for e2e tests #93
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
improvement: reuse docker compose for e2e tests #93
Conversation
78a567c to
f508d06
Compare
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 9387833 | Triggered | Generic Password | 22fcc91 | e2e/packages/client/reset_db.go | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
d6f09f0 to
7fa0723
Compare
f508d06 to
22fcc91
Compare
Greptile OverviewGreptile SummaryThis PR introduces a smart Docker Compose caching system to avoid recreating containers for E2E tests, along with new database and Redis reset utilities. Key ChangesContainer Reuse System (
Reset Utilities (
Test Improvements (
Critical Security IssueSQL Injection Vulnerability in Other Issues Found
Architecture AssessmentThe caching approach is sound and will significantly speed up test execution by reusing containers. The reset mechanism properly isolates tests while avoiding the overhead of full container recreation. However, the SQL injection issue needs immediate attention before merging. Confidence Score: 2/5
Important Files ChangedFile Analysis
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7 files reviewed, 7 comments
akhilmhdh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small changes - doing an application testing
maidul98
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested and works as expected. the strategy makes sense to me
Description 📣
ref: https://linear.app/infisical/issue/PLATFRM-134/make-a-smarter-docker-compose-cache-system-to-avoid-recreating-compose
Tests 🛠️
The way you test this PR is mostly like the #91. The major difference is that now we have a cache system for the docker-compose. If we found a compose (multiple containers with a compose label) already meets the spec, we will not create a new one but reuse it instead. The purpose is to speed up development cycle.
To ensure this system works, you can run the only relay test case we have right now with
TESTCONTAINERS_RYUK_DISABLED=true. This will stop the Ryuk container from cleaning up our compose containers. After successfully running the relay test case, you can then run again to see how long it takes and if it reuses the existing container.After that, you can also set
CLI_E2E_DISABLE_COMPOSE_CACHE=1to disable the cache and you should see it boot the container from the ground up instead of using the cache.Type ✨