Skip to content

fix: only parse and validate apisix.yaml in cli when startup #12216

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

Conversation

nic-6443
Copy link
Member

@nic-6443 nic-6443 commented May 15, 2025

Description

The purpose of the read_yaml_conf function is to read config.yaml, but it also parses and validates apisix.yaml. This validation only needs to be performed when the CLI module starts, and there is no need to repeatedly parse and validate apisix.yaml during runtime when try to get config.yaml:

local default_conf, err = file.read_yaml_conf()

Which issue(s) this PR fixes:

Fixes #

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels May 15, 2025
@nic-6443 nic-6443 force-pushed the nic/avoid-parse-apisix-yaml-duplicate branch from 958312f to b4a4c34 Compare May 15, 2025 08:01
Signed-off-by: Nic <[email protected]>
@nic-6443 nic-6443 merged commit 485f04d into apache:master May 23, 2025
36 checks passed
@nic-6443 nic-6443 deleted the nic/avoid-parse-apisix-yaml-duplicate branch May 23, 2025 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants