Skip to content

Enhance DestroyPreview functionality to include timeout parameter #4745

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

Merged
merged 1 commit into from
Jul 29, 2025

Conversation

jLopezbarb
Copy link
Contributor

Proposed changes

Fixes DEV-980

  • Updated the Destroy method in the preview client to accept a timeout parameter, allowing for more flexible preview destruction.
  • Modified related interfaces and test cases to accommodate the new timeout argument.
  • Adjusted error handling in the Destroy method to manage cases where the timeout argument is not recognized.

This change improves the usability of the DestroyPreview feature by enabling users to specify a timeout for the operation.

How to validate

I run okteto preview deploy 10m on the repo https://github.com/jLopezbarb/movies/tree/jlo/destroy-10m and then okteto preview deploy 10m and got as result:

Waiting for 6 min
Tue Jul 22 14:50:32 UTC 2025
completed
Tue Jul 22 14:56:32 UTC 2025

CLI Quality Reminders 🔧

For both authors and reviewers:

  • Scrutinize for potential regressions
  • Ensure key automated tests are in place
  • Build the CLI and test using the validation steps
  • Assess Developer Experience impact (log messages, performances, etc)
  • If too broad, consider breaking into smaller PRs
  • Adhere to our code style and code review guidelines

- Updated the Destroy method in the preview client to accept a timeout parameter, allowing for more flexible preview destruction.
- Modified related interfaces and test cases to accommodate the new timeout argument.
- Adjusted error handling in the Destroy method to manage cases where the timeout argument is not recognized.

This change improves the usability of the DestroyPreview feature by enabling users to specify a timeout for the operation.

Signed-off-by: Javier Lopez <javier@okteto.com>
@jLopezbarb jLopezbarb requested a review from a team as a code owner July 23, 2025 15:06
Copy link

codecov bot commented Jul 23, 2025

Codecov Report

❌ Patch coverage is 42.85714% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.88%. Comparing base (d7395da) to head (53982b6).
⚠️ Report is 7 commits behind head on master.

❌ Your patch status has failed because the patch coverage (42.85%) is below the target coverage (60.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4745      +/-   ##
==========================================
- Coverage   48.91%   48.88%   -0.03%     
==========================================
  Files         356      356              
  Lines       29809    29819      +10     
==========================================
- Hits        14582    14578       -4     
- Misses      14066    14077      +11     
- Partials     1161     1164       +3     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@ifbyol ifbyol left a comment

Choose a reason for hiding this comment

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

Nice change! 👏

@jLopezbarb jLopezbarb merged commit 69eb049 into master Jul 29, 2025
15 of 18 checks passed
@jLopezbarb jLopezbarb deleted the jlo/dev-980 branch July 29, 2025 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants