-
Notifications
You must be signed in to change notification settings - Fork 397
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
Modify the logic that converts the parsing environment to flags. #2037
Open
quzard
wants to merge
18
commits into
alibaba:main
Choose a base branch
from
quzard:feat/env
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+487
−74
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
quzard
commented
Jan 14, 2025
•
edited
Loading
edited
- ilogtail时代gflag不进行变化例如logtail_profile_aliuid,ilogtail_discard_interval
- LoongCollector时代gflag均不佳前缀例如loongcollector_conf_dir改为conf_dir
- 不保留gflag同名小写字母环境变量自动转flag的行为,只把留下重要的gflag本名变成7中的额外转换规则例如check_point_filename在文档中暴露,需要添加为额外转换规则,dirfile_stat_sleep从未暴露过,不再支持小写env。
- 保留原有特殊env转flag的行为。例如ALIYUN_LOGTAIL_WORKING_HOSTNAME,继续保留。
- go插件的env继续保留,若与C++原来就有同名env则必须配套增加LOONG_XXX的名字以统一兼容。Go系统参数不需要增加LOONG开头的名字,如GOGC、GOMEMLIMIT。
- 自动为gflag生成LOONG_upper(flag_name)环境变量转flag的行为
- 允许额外增加转换规则,包含3中的额外转换规则和4中比本地配置优先级更高的特殊env(这里逻辑保持不变即可)
quzard
changed the title
modify ParseEnvToFlags
Modify the logic that converts the parsing environment to flags.
Jan 14, 2025
yyuuttaaoo
requested changes
Jan 14, 2025
core/app_config/AppConfig.cpp
Outdated
PROCESSDIRFLAG(loongcollector_run_dir); | ||
PROCESSDIRFLAG(loongcollector_third_party_dir); | ||
PROCESSDIRFLAG(conf_dir); | ||
if (STRING_FLAG(log_dir).empty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
合理性待讨论
yyuuttaaoo
reviewed
Jan 15, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.