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

optimize: get config from file system even without file: prefix #3341

Merged
merged 10 commits into from
Dec 21, 2020

Conversation

hoverruan
Copy link
Contributor

@hoverruan hoverruan commented Dec 6, 2020

Ⅰ. Describe what this PR did

指定配置文件路径时,即使没有使用 file: 前缀,依然尝试在文件系统查找并加载

Ⅱ. Does this pull request fix one issue?

fixes #3344

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

在 registry.conf 文件中配置文件路径的时候,不添加 file: 前缀。例如:

config {
  type = "file"

  file {
    name = "/root/seata-config/file.conf"
  }
}

期望的结果:配置文件能被加载

Ⅴ. Special notes for reviews

@funky-eyes funky-eyes added this to the 1.5.0 milestone Dec 6, 2020
@funky-eyes funky-eyes added the module/config config module label Dec 6, 2020
@funky-eyes funky-eyes added the first-time contributor first-time contributor label Dec 6, 2020
@xingfudeshi
Copy link
Member

If the prefix is missing, why not complete it automatically?

@hoverruan hoverruan changed the title optimize: show warning if config file not found optimize: get config from file system even without file: prefix Dec 8, 2020
Copy link
Member

@xingfudeshi xingfudeshi left a comment

Choose a reason for hiding this comment

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

LGTM.

@xingfudeshi
Copy link
Member

@a364176773

Copy link
Contributor

@funky-eyes funky-eyes left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
first-time contributor first-time contributor module/config config module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

支持不带 file: 前缀的文件路径
3 participants