8000 Add context command initialization in restart command by jLopezbarb · Pull Request #4692 · okteto/okteto · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add context command initialization in restart command #4692

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 2 commits into from
Apr 8, 2025

Conversation

jLopezbarb
Copy link
Contributor

Signed-off-by: Javier Lopez javier@okteto.com

Proposed changes

We were not initialising the context for the restart command making it fail if used by any user. This ensures the context is initialised and can create a k8s config for the client

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

Signed-off-by: Javier Lopez <javier@okteto.com>
@jLopezbarb jLopezbarb requested a review from a team as a code owner March 26, 2025 17:02
Copy link
codecov bot commented Mar 26, 2025

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 48.77%. Comparing base (b3323dd) to head (3d0e246).
Report is 4 commits behind head on master.

❌ Your patch status has failed because the patch coverage (0.00%) 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    #4692      +/-   ##
==========================================
- Coverage   48.77%   48.77%   -0.01%     
==========================================
  Files         354      354              
  Lines       29468    29472       +4     
==========================================
  Hits        14374    14374              
- Misses      13950    13954       +4     
  Partials     1144     1144              
🚀 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.

This is an improvement compared with what we have, but this doesn't work well. For example, if you don't specify the flag namespace, it looks the pod through all the namespaces, as the namespace value is "", instead of using the default one from the context.

Could you at least fix that to prevent accidentally to restart services you should not to?

Signed-off-by: Javier Lopez <javier@okteto.com>
@jLopezbarb jLopezbarb requested a review from ifbyol April 7, 2025 15:20
@jLopezbarb jLopezbarb merged commit b3d8998 into master Apr 8, 2025
12 of 13 checks passed
@jLopezbarb jLopezbarb deleted the jlo/fix-restart-command branch April 8, 2025 14:41
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
0