-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Consolidate path setting files entitlements to config #123649
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -182,10 +182,7 @@ public void testParseFiles() throws IOException { | |
mode: "read" | ||
- path: '%s' | ||
mode: "read_write" | ||
- path_setting: foo.bar | ||
mode: read | ||
- relative_path_setting: foo.bar | ||
relative_to: config | ||
- config_path_setting: foo.bar | ||
|
||
mode: read | ||
""", relativePathToFile, relativePathToDir, TEST_ABSOLUTE_PATH_TO_FILE).getBytes(StandardCharsets.UTF_8)), | ||
"test-policy.yaml", | ||
|
@@ -202,8 +199,7 @@ public void testParseFiles() throws IOException { | |
Map.of("relative_path", relativePathToFile, "mode", "read_write", "relative_to", "data"), | ||
Map.of("relative_path", relativePathToDir, "mode", "read", "relative_to", "config"), | ||
Map.of("path", TEST_ABSOLUTE_PATH_TO_FILE, "mode", "read_write"), | ||
Map.of("path_setting", "foo.bar", "mode", "read"), | ||
Map.of("relative_path_setting", "foo.bar", "relative_to", "config", "mode", "read") | ||
Map.of("config_path_setting", "foo.bar", "mode", "read") | ||
) | ||
) | ||
) | ||
|
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.
I'm wondering why we need this asterisk check. Does the
settingGlobResolver
path do the wrong thing if the setting contains no asterisk?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.
Yes, the setting glob resolver only knows how to deal with glob.
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.
But a glob with no asterisks is still a glob right? Even if it's trivial.
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.
It's just a way to understand if we want to call the "regular" Settings resolved (which maps to
Settings#get
) or the glob resolver (which maps toSettings#getGlobValues
). The latter throws if you don't pass down something that contains a".*."
Btw I think we should match that here, and look for
".*."
, not just*
.