Skip to content
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

fix for #19066 Print warnings when deprecated options are configured in config file #19148

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

mansoor17syed
Copy link

fix for #19066 Print warnings when deprecated options are configured in config file

Issue Details
Add warnings when deprecated options are configured
Problem: Currently, etcd doesn't warn users when they configure deprecated options
Goal: Improve user experience by warning about deprecated configurations before they're removed
Solution Overview

Implementation Location: server/config/config.go

@k8s-ci-robot
Copy link

Hi @mansoor17syed. Thanks for your PR.

I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@serathius
Copy link
Member

/ok-to-test

Copy link

codecov bot commented Jan 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.89%. Comparing base (d5231c7) to head (70b0e50).
Report is 18 commits behind head on main.

Additional details and impacted files
Files with missing lines Coverage Δ
server/etcdmain/config.go 71.05% <100.00%> (+3.28%) ⬆️

... and 27 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #19148      +/-   ##
==========================================
+ Coverage   68.77%   68.89%   +0.12%     
==========================================
  Files         420      420              
  Lines       35640    35649       +9     
==========================================
+ Hits        24510    24561      +51     
+ Misses       9704     9665      -39     
+ Partials     1426     1423       -3     

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3388e2b...70b0e50. Read the comment docs.

@ahrtr
Copy link
Member

ahrtr commented Jan 9, 2025

This PR doesn't fix #19066 . Please follow #18998 (comment)

Thanks anyway

@mansoor17syed
Copy link
Author

Hi @ahrtr

Thank you for the review and feedback!

I initially assumed that the comment in the earlier PR referred specifically to their changes. Could you please confirm if the fix for issue #19066 is intended to address the comment you provided here : #18998 (comment)

Appreciate your clarification!

@ahrtr
Copy link
Member

ahrtr commented Jan 9, 2025

Could you please confirm if the fix for issue #19066 is intended to address the comment you provided here : #18998 (comment)

YES

@ahrtr
Copy link
Member

ahrtr commented Jan 9, 2025

I just realised that we can iterate FlagsExplicitlySet directly in parse(). Both configFromFile and configFromCmdLine populate the data structure with all flags,

FlagsExplicitlySet map[string]bool

sorry for the back and forth.

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mansoor17syed
Once this PR has been reviewed and has the lgtm label, please assign spzala for approval. For more information see the 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

@mansoor17syed
Copy link
Author

@ahrtr

Can you Please have a look once now if I have done the right changes
I see one tests failing , but I guess the failure is not because of my changes

Still open for feedback and suggestions
do let me know

@ahrtr
Copy link
Member

ahrtr commented Jan 9, 2025

@mansoor17syed The change looks good. Please squash the commits

@ahrtr
Copy link
Member

ahrtr commented Jan 9, 2025

Could you please also add a test to cover the config file case?

@k8s-ci-robot k8s-ci-robot added size/L and removed size/S labels Jan 9, 2025
@mansoor17syed mansoor17syed force-pushed the issue_19066 branch 2 times, most recently from cea1d94 to 5751838 Compare January 10, 2025 04:08
@k8s-ci-robot
Copy link

@mansoor17syed: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-etcd-robustness-amd64 70b0e50 link true /test pull-etcd-robustness-amd64
pull-etcd-robustness-arm64 70b0e50 link true /test pull-etcd-robustness-arm64

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@mansoor17syed
Copy link
Author

@ahrtr

can chk now I have added the UT but some seems failing I doubt its because of my changes.
Still open for feedback and suggestions
do let me know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants