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

Removed error logging from config loader #1225

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

vr4manta
Copy link
Contributor

@vr4manta vr4manta commented Aug 28, 2024

What this PR does / why we need it:

  • Reduces misleading error message that may cause confusion when users glance through the logs

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #1224

Special notes for your reviewer:

This PR adds a check to see if byte data is YAML. If so, it will call the parse yaml like before allowing any errors to be logged. I believe this is enough to just state the YAML attempt failed and is falling back onto INI config load.

Release note:

None

Copy link

linux-foundation-easycla bot commented Aug 28, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: vr4manta / name: Neil Girard (fa11631)

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Aug 28, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @vr4manta!

It looks like this is your first PR to kubernetes/cloud-provider-vsphere 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/cloud-provider-vsphere has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @vr4manta. Thanks for your PR.

I'm waiting for a kubernetes 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.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Aug 28, 2024
@XudongLiuHarold
Copy link
Member

Hi @vr4manta

Thank you for your PR! My cents:

@vr4manta
Copy link
Contributor Author

vr4manta commented Sep 3, 2024

Hi @vr4manta

Thank you for your PR! My cents:

Hi @XudongLiuHarold. Thanks for the feedback. We are enhancing our installer to make new installs use YAML, but all existing clusters are up to the admins to update the config. If they are doing something like multi vCenter, we are requiring them to upgrade from INI to YAML by hand for now. But all customers with one failure domain or all failure domains in one vCenter are not currently required to migrate the cloud provider config.

Based on that, I think it would be perfectly fine to do a new function that checks to see if the file is YAML format in the above linked function. I can look into putting something there that can do a quick check.

@vr4manta vr4manta force-pushed the OCPBUGS-38724_no_logging branch from 889e821 to 33bb6e6 Compare September 3, 2024 18:30
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 3, 2024
@vr4manta vr4manta force-pushed the OCPBUGS-38724_no_logging branch 2 times, most recently from d1b5bed to 44a5b89 Compare September 3, 2024 18:32
@XudongLiuHarold
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 4, 2024
pkg/common/config/config_yaml.go Outdated Show resolved Hide resolved
pkg/common/config/config.go Outdated Show resolved Hide resolved
pkg/common/config/config_yaml_test.go Show resolved Hide resolved
@vr4manta vr4manta force-pushed the OCPBUGS-38724_no_logging branch from 44a5b89 to 331f31e Compare September 10, 2024 15:12
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 10, 2024
@vr4manta vr4manta force-pushed the OCPBUGS-38724_no_logging branch from 331f31e to c44248b Compare September 10, 2024 16:17
@vr4manta vr4manta force-pushed the OCPBUGS-38724_no_logging branch 2 times, most recently from a7ce4c5 to 40cee92 Compare September 26, 2024 16:37
@vr4manta vr4manta force-pushed the OCPBUGS-38724_no_logging branch from 40cee92 to fa11631 Compare September 27, 2024 12:37
@gnufied
Copy link
Member

gnufied commented Sep 27, 2024

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 27, 2024
@XudongLiuHarold
Copy link
Member

e2e test passed: team-cluster-api#60

@elmiko
Copy link
Contributor

elmiko commented Oct 1, 2024

code makes sense to me, even if the ini format is being deprecated it would be nice to reduce confusion in the logs.

@vr4manta
Copy link
Contributor Author

vr4manta commented Oct 4, 2024

/assign @XudongLiuHarold
I think this is ready for approval. Thanks.

Copy link
Member

@XudongLiuHarold XudongLiuHarold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

/approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 23, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vr4manta, XudongLiuHarold

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

The pull request process is described 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

@k8s-ci-robot k8s-ci-robot merged commit 82def69 into kubernetes:master Oct 23, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove config yaml error log messages
5 participants