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

Auto-cleanup of k6 build cache #1788

Merged
merged 4 commits into from
Oct 26, 2023

Conversation

pablochacin
Copy link
Contributor

@pablochacin pablochacin commented Oct 20, 2023

What does this PR do?

Changes the behavior of the WithCache option to implement an automatic cleanup of the build cache.

Why is it important?

Improves the usability of the module as the developer doesn't need to take care of deleting cache volume.

Related issues

How to test this PR

Running twice the tests in k6_test.go with the environment variable TC_K6_BUILD_CACHE=k6-cache the second run should last significantly less than the first (in the order of 30s vs 3s)

@netlify
Copy link

netlify bot commented Oct 20, 2023

Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit 152e720
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-go/deploys/653a39b0319b4d0008ec871b
😎 Deploy Preview https://deploy-preview-1788--testcontainers-go.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Signed-off-by: Pablo Chacin <pablochacin@gmail.com>
@pablochacin pablochacin marked this pull request as ready for review October 23, 2023 11:34
@pablochacin pablochacin requested a review from a team as a code owner October 23, 2023 11:34
mdelapenya
mdelapenya previously approved these changes Oct 24, 2023
Copy link
Member

@mdelapenya mdelapenya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Added a few comments, not blockers.

Thanks for your time!

modules/k6/k6.go Outdated Show resolved Hide resolved
modules/k6/k6.go Outdated Show resolved Hide resolved
modules/k6/k6.go Show resolved Hide resolved
@mdelapenya mdelapenya self-assigned this Oct 24, 2023
@mdelapenya mdelapenya added the chore Changes that do not impact the existing functionality label Oct 24, 2023
Copy link
Member

@mdelapenya mdelapenya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your implication in making this PR move forward including changes in the upstream.

@mdelapenya mdelapenya merged commit b9398b9 into testcontainers:main Oct 26, 2023
112 checks passed
mdelapenya added a commit that referenced this pull request Oct 26, 2023
* main: (27 commits)
  docs: remove OpenSSF scorecard (#1823)
  Auto-cleanup of k6 build cache (#1788)
  Add OpenSSF Scorecards GitHub Action (#1795)
  chore(deps): bump google.golang.org/grpc from 1.57.0 to 1.57.1 (#1822)
  chore: expose SessionID (#1793)
  chore: use HTTP calls to invoke the lambda from the tests (#1794)
  wait for log producer to really stop inside StopLogProducer func (#1701)
  chore(deps): bump github.com/nats-io/nats-server/v2 in /modules/nats (#1784)
  chore(deps): bump urllib3 from 2.0.6 to 2.0.7 (#1781)
  chore: add an example of using localstack alongside AWS lambdas (#1790)
  chore(deps): combine and bump compose dependencies (#1787)
  feat: support for replacing images with custom substitutions (#1719)
  fix: data race in docker client `Info()` (#1779)
  Use correct formatting directive for errors in lifecycle logs (#1780)
  chore(deps): bump golang.org/x/mod from 0.12.0 to 0.13.0 in /modules/{elasticsearch,kafka} and /modulegen (#1778)
  chore(deps): bump github.com/rabbitmq/amqp091-go in /modules/rabbitmq (#1728)
  chore(deps): bump github.com/ClickHouse/clickhouse-go/v2 (#1732)
  ignore patterns defined in dockerignore (#1725)
  Fix wrong module names (#1776)
  docs: add default options to k6 module (#1744)
  ...
mdelapenya added a commit that referenced this pull request Oct 26, 2023
…ers/image-spec-1.1.0-rc5

* main: (49 commits)
  docs: remove OpenSSF scorecard (#1823)
  Auto-cleanup of k6 build cache (#1788)
  Add OpenSSF Scorecards GitHub Action (#1795)
  chore(deps): bump google.golang.org/grpc from 1.57.0 to 1.57.1 (#1822)
  chore: expose SessionID (#1793)
  chore: use HTTP calls to invoke the lambda from the tests (#1794)
  wait for log producer to really stop inside StopLogProducer func (#1701)
  chore(deps): bump github.com/nats-io/nats-server/v2 in /modules/nats (#1784)
  chore(deps): bump urllib3 from 2.0.6 to 2.0.7 (#1781)
  chore: add an example of using localstack alongside AWS lambdas (#1790)
  chore(deps): combine and bump compose dependencies (#1787)
  feat: support for replacing images with custom substitutions (#1719)
  fix: data race in docker client `Info()` (#1779)
  Use correct formatting directive for errors in lifecycle logs (#1780)
  chore(deps): bump golang.org/x/mod from 0.12.0 to 0.13.0 in /modules/{elasticsearch,kafka} and /modulegen (#1778)
  chore(deps): bump github.com/rabbitmq/amqp091-go in /modules/rabbitmq (#1728)
  chore(deps): bump github.com/ClickHouse/clickhouse-go/v2 (#1732)
  ignore patterns defined in dockerignore (#1725)
  Fix wrong module names (#1776)
  docs: add default options to k6 module (#1744)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Changes that do not impact the existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Provide mechanism for cleaning up build cache in k6 module
2 participants