-
Notifications
You must be signed in to change notification settings - Fork 817
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 missing root dir prefix when loading dynamic config #4056
Fix missing root dir prefix when loading dynamic config #4056
Conversation
The cadence server would fail to load the dynamic config file when the working dir wasn't the parent dir of dynamic config file path.
@longquanzheng Can you have a look at this PR? |
Thanks for finding and fixing it. |
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.
Actually, this will break the case that using absolute path.
Maybe we should check if a path is absolute before transformation
I didn't check the path since the comment says that should be relative to the root directory
|
I see. That is misleading, sorry for that. We should remove the comment. maybe that’s the initial intent but the code doesn’t restrict it. As a result, people are using it with absolute paths now. See https://uber-cadence.slack.com/archives/CNC31V3K7/p1616084908003400?thread_ts=1616084757.003300&channel=CNC31V3K7&message_ts=1616084908.003400 so I think we have to support it anyway. Otherwise I don’t think those people have a workaround |
Okay, I'll fix it and remove the comment later 👍 |
Cool. Can you do the same for loading config? I think it’s okay if config is outside root directory. This will probably make it easier/simpler to use homebrew. And also add description to the root CLI parameter: it will not apply to absolute path. |
97ce2e2
to
e9cf591
Compare
Done, you can have a look again |
e9cf591
to
63a3aef
Compare
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.
Just a comment about the CLI parameter. The rest LGTM
63a3aef
to
8f84bf2
Compare
sorry I have to edit something to hack around buildkite
…flow#4056) * Fix missing root dir prefix when loading dynamic config The cadence server would fail to load the dynamic config file when the working dir wasn't the parent dir of dynamic config file path. * Fix don't append the root dir when the dynamic file path was absolute * run buildkite test sorry I have to edit something to hack around buildkite Co-authored-by: Quanzheng Long <longquanzheng@users.noreply.github.com>
The cadence server would fail to load the dynamic config file
when the working dir wasn't the parent dir of dynamic config
file path.
What changed?
Fix missing root dir prefix when loading dynamic config
Why?
How did you test it?
local test
Potential risks
no