Skip to content

feat: Enhance error messages in vertical scaling implementation #2051

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

abhi0324
Copy link
Contributor

Ⅰ. Describe what this PR does

This PR enhances error messages in the vertical scaling implementation (pkg/util/inplaceupdate/inplace_update_vertical.go) to provide more context and helpful information for developers. It improves all error messages with detailed explanations, expected formats, and troubleshooting hints without changing any functionality.

Ⅱ. Does this pull request fix one issue?

NONE

Ⅲ. Describe how to verify it

  1. Compare the error messages in the updated file with the original ones
  2. Run existing tests to verify that functionality remains unchanged
  3. Manually test error scenarios to confirm improved error messages:
    • Try updating non-existent container resources
    • Try modifying unsupported resource types
    • Check status messages during update operations

Ⅳ. Special notes for reviews

This PR only improves error message text without modifying any functional code. Examples of improvements:

  • Resource path errors now include expected format information
  • Container index errors provide range information
  • Resource limitations are explained with context
  • Status checking errors indicate possible causes and next steps

@kruise-bot kruise-bot requested review from Fei-Guo and veophi May 21, 2025 19:23
@kruise-bot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign fei-guo for approval by writing /assign @fei-guo in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kruise-bot kruise-bot added the size/S size/S 10-29 label May 21, 2025
Copy link

codecov bot commented May 21, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 43.77%. Comparing base (ff8dcec) to head (dbf410f).
Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
pkg/util/inplaceupdate/inplace_update_vertical.go 50.00% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2051      +/-   ##
==========================================
- Coverage   43.78%   43.77%   -0.01%     
==========================================
  Files         316      316              
  Lines       31617    31620       +3     
==========================================
  Hits        13842    13842              
- Misses      16378    16380       +2     
- Partials     1397     1398       +1     
Flag Coverage Δ
unittests 43.77% <50.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@ABNER-1
Copy link
Member

ABNER-1 commented May 22, 2025

Hello, @abhi0324 .

Please sign off your commit. You can refer to the following link for more details: https://github.com/openkruise/kruise/pull/2051/checks?check_run_id=42660065552

@abhi0324
Copy link
Contributor Author

Hi @ABNER-1 , thank you for the heads-up! The DCO check has passed, and the commit is signed off. Please let me know if anything else needs to be updated.

abhi0324 added 2 commits May 22, 2025 16:54
Signed-off-by: Abhiswant Chaudhary <[email protected]>
@ABNER-1
Copy link
Member

ABNER-1 commented May 29, 2025

/lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm size/S size/S 10-29
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants