-
Notifications
You must be signed in to change notification settings - Fork 312
feat: implement AutoDown functionality with tests #4732
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
Conversation
- Added AutoDown feature to automatically handle down operations based on the OKTETO_AUTO_DOWN_ENABLED environment variable. - Introduced `autoDownRunner` struct to encapsulate the AutoDown logic. - Created unit tests for AutoDown behavior, including scenarios for enabled and disabled states. - Updated interfaces and methods to support the new functionality, ensuring proper integration with existing components. This enhancement improves the user experience by automating down operations when desired. Signed-off-by: Javier Lopez <javier@okteto.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4732 +/- ##
=======================================
Coverage 48.86% 48.86%
=======================================
Files 354 355 +1
Lines 29718 29759 +41
=======================================
+ Hits 14521 14543 +22
- Misses 14040 14055 +15
- Partials 1157 1161 +4 🚀 New features to boost your workflow:
|
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.
Functionality looks good, but as we discussed in the daily, it is not clear in which cases we should stop the dev container or not, so let's record a couple of videos with the experience and share it with the product team to avoid confusions in the different scenarios
- Adjusted the error handling logic in the AutoDown functionality to ensure proper logging of exit signals. - The error check for the AutoDown execution was moved to improve clarity and maintainability. This change enhances the robustness of the AutoDown feature by ensuring that errors are logged appropriately before returning from the function. Signed-off-by: Javier Lopez <javier@okteto.com>
Signed-off-by: Javier Lopez <javier@okteto.com>
Signed-off-by: Javier Lopez <javier@okteto.com>
Co-authored-by: Cody J Landstrom <cody.landstrom@gmail.com>
Proposed changes
Fixes PROD-16
autoDownRunner
struct to encapsulate the AutoDown logic.How to validate
OKTETO_AUTO_DOWN_ENABLED
. exportOKTETO_AUTO_DOWN_ENABLED=true
okteto up
on an interactive session (bash
,sh
)okteto up
on a command (yarn start
,sleep 100000
)CTRL + C
and check that the session has gone downCLI Quality Reminders 🔧
For both authors and reviewers: