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 7 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.77%. Comparing base (d5231c7) to head (56f09ad).
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 30 files with indirect coverage changes

@@           Coverage Diff           @@
##             main   #19148   +/-   ##
=======================================
  Coverage   68.77%   68.77%           
=======================================
  Files         420      420           
  Lines       35640    35649    +9     
=======================================
+ Hits        24510    24517    +7     
+ Misses       9704     9702    -2     
- Partials     1426     1430    +4     

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...56f09ad. 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
…igured in config file

Signed-off-by: mansoora <syed.mansoor_a@nokia.com>
…igured in config file

Signed-off-by: mansoora <syed.mansoor_a@nokia.com>
…igured in config file

Signed-off-by: mansoora <syed.mansoor_a@nokia.com>
…igured in config file

Signed-off-by: mansoora <syed.mansoor_a@nokia.com>
…igured in config file

Signed-off-by: mansoora <syed.mansoor_a@nokia.com>
…igured in config file

Signed-off-by: mansoora <syed.mansoor_a@nokia.com>
…igured in config file

Signed-off-by: mansoora <syed.mansoor_a@nokia.com>
@k8s-ci-robot
Copy link

k8s-ci-robot commented Jan 9, 2025

@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-unit-test-386 56f09ad link true /test pull-etcd-unit-test-386
pull-etcd-unit-test-amd64 56f09ad link true /test pull-etcd-unit-test-amd64
pull-etcd-unit-test-arm64 56f09ad link true /test pull-etcd-unit-test-arm64
pull-etcd-integration-2-cpu-amd64 56f09ad link true /test pull-etcd-integration-2-cpu-amd64

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.

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