Skip to content

Conversation

Mia-Cross
Copy link
Contributor

@Mia-Cross Mia-Cross commented Jul 22, 2025

go-vcr introduced a very helpful SkipRequestLatency option on the recorder in version 3. This will allow us to replay cassettes a lot faster because interactions will not simulate the requests' duration anymore.

This is a breaking change however, and we should re-record all cassettes with the new version.

The following changes had to be made in the tests:

  • core/build_info_test.go:Test_CheckVersion
    • update expected CLI version
  • core/checks_test.go:TestCheckAPIKey
    • replace API key in request URL, otherwise cassette matching fails
  • internal/namespaces/container/v1beta1/custom_deploy_test.go:Test_Deploy
    • go-vcr.v3 has changes with URL encoding which break this test, so we had to implement a custom matcher for docker requests
  • internal/namespaces/registry/v1/custom_docker_helper_test.go:TestRegistryDockerHelperGetCommand
    • replace Secret in golden to avoid exposing SCW_SECRET_KEY

@Mia-Cross Mia-Cross self-assigned this Jul 22, 2025
@github-actions github-actions bot added registry Managed Container Registry issues, bugs and feature requests rdb Managed MySQL and PostgreSQL issues, bugs and feature requests load-balancer Load-balancer issues, bugs and feature requests instance Instance issues, bugs and feature requests k8s Kubernetes Kapsule issues, bugs and feature requests iot IoT issues, bugs and feature requests vpc Virtual Private Cloud (VPC) issues, bugs and feature requests container Container issues, bugs and feature requests function Serverless function issues, bugs and feature requests redis Managed Redis issues, bugs and feature requests apple-silicon Apple Silicon issues, bugs and feature requests iam IAM issues, bugs and feature requests mnq Messaging and queuing issues, bugs and feature requests webhosting Webhosting issues, bugs and feature requests secret Managed Secret Manager issues, bugs and feature requests flexible-ip Flexible IP issues, bugs and feature requests baremetal vpcgw labels Jul 22, 2025
@Mia-Cross Mia-Cross force-pushed the tests_bump_go_vcr_to_v3 branch 4 times, most recently from 61681b3 to d5a9323 Compare July 24, 2025 13:08
@Mia-Cross Mia-Cross force-pushed the tests_bump_go_vcr_to_v3 branch from d5a9323 to 62cd17c Compare July 30, 2025 15:59
@Mia-Cross Mia-Cross force-pushed the tests_bump_go_vcr_to_v3 branch 4 times, most recently from 0ae9b33 to 8f72ace Compare August 12, 2025 18:10
@codecov-commenter
Copy link

codecov-commenter commented Aug 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.27%. Comparing base (5bf53e0) to head (a8f870d).
⚠️ Report is 767 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (5bf53e0) and HEAD (a8f870d). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (5bf53e0) HEAD (a8f870d)
2 1
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #4909       +/-   ##
===========================================
- Coverage   75.45%   56.27%   -19.19%     
===========================================
  Files         202      308      +106     
  Lines       44323    77924    +33601     
===========================================
+ Hits        33444    43850    +10406     
- Misses       9653    32663    +23010     
- Partials     1226     1411      +185     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Mia-Cross Mia-Cross force-pushed the tests_bump_go_vcr_to_v3 branch from eaf798a to 7a193a5 Compare August 14, 2025 09:22
@Mia-Cross Mia-Cross marked this pull request as ready for review August 19, 2025 09:07
@Mia-Cross Mia-Cross requested review from a team and remyleone as code owners August 19, 2025 09:07
@Mia-Cross Mia-Cross force-pushed the tests_bump_go_vcr_to_v3 branch from b36e64b to a8f870d Compare August 21, 2025 08:10
@@ -1,41 +1,3 @@
---
Copy link
Member

Choose a reason for hiding this comment

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

Why this interaction is not preserved?

@@ -1,44 +1,3 @@
---
version: 1
Copy link
Member

Choose a reason for hiding this comment

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

Why is this interaction not preserved?

@Mia-Cross Mia-Cross marked this pull request as draft August 21, 2025 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apple-silicon Apple Silicon issues, bugs and feature requests baremetal container Container issues, bugs and feature requests enhancement flexible-ip Flexible IP issues, bugs and feature requests function Serverless function issues, bugs and feature requests iam IAM issues, bugs and feature requests instance Instance issues, bugs and feature requests iot IoT issues, bugs and feature requests k8s Kubernetes Kapsule issues, bugs and feature requests load-balancer Load-balancer issues, bugs and feature requests mnq Messaging and queuing issues, bugs and feature requests rdb Managed MySQL and PostgreSQL issues, bugs and feature requests redis Managed Redis issues, bugs and feature requests registry Managed Container Registry issues, bugs and feature requests secret Managed Secret Manager issues, bugs and feature requests tests vpc Virtual Private Cloud (VPC) issues, bugs and feature requests vpcgw webhosting Webhosting issues, bugs and feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants