Conversation
94d066a to
72e0a14
Compare
|
Hi, it seems the clang_tidy check run win32 implementation under linux platform. And I am not sure how to fix that. |
|
@scw00 thanks for the contribution. Can you describe the purpose of this change? AFAICT the new functionality is not used? Are you planning on a follow up change? |
|
Hi @mattklein123 . I am trying to implement the static file filter which return static file from local fs. But I didn't found any appropriate structure for reading a file. It is the first step to implement the opening method with reading only flag. |
6c4d30f to
f86d9b4
Compare
|
Updated. For using std::bitset and set default value to open method. |
mattklein123
left a comment
There was a problem hiding this comment.
Thanks, a few high level comments to get started. Please also check clang-tidy and format.
/wait
45d2bc7 to
80bdf02
Compare
mattklein123
left a comment
There was a problem hiding this comment.
Cool, thanks for working on this. A few small comments otherwise LGTM.
/wait
mattklein123
left a comment
There was a problem hiding this comment.
LGTM with some nits, thanks.
/wait
There was a problem hiding this comment.
Please use the default flags function that is already defined, same elsewhere (I already commented on this I think).
There was a problem hiding this comment.
I'm not sure I can use the default function which is defined in access_log_manager_impl.h. file_system_test should not dependent on other implementations .
mattklein123
left a comment
There was a problem hiding this comment.
Thanks, LGTM. @jmarantz any further comments?
jmarantz
left a comment
There was a problem hiding this comment.
sorry I should've chimed in earlier; I do have some questions.
There was a problem hiding this comment.
Declare this method static; it does not appear to require this.
There was a problem hiding this comment.
You reference 'perm' in this PR a few times; can we spell that out? I think it might mean "permanent" but I'm not sure.
There was a problem hiding this comment.
You mean move this into shared interface . It seems contradictory to previous changes, see
#7445 (comment)
This is also why I make the PermAndFlags into platform implementation.
There was a problem hiding this comment.
Oh it's hard to see exactly what Matt had an issue with because you squashed commits. In general please try to avoid that because we lose the comment history.
I still don't understand the meaning of 'perm'. But looking at how it's used here I retract my "make part of the interface" suggestion, and instead suggest using the correct type and name in posix for the 3rd arg to open: mode_t mode
There was a problem hiding this comment.
Does it make sense to put FlagsAndPerm in a shared interface, rather than repeating it from win32 and posix?
There was a problem hiding this comment.
Because the translateFlags method is platform specified function ( the translateFlags is in the platform class not in shared interface). So the implementation should have their own flags and perm or other something more than this two flags.
But currently we only care about the perm and flags, so I'm ok with that . And will change.
There was a problem hiding this comment.
s/perm/mode/ and s/int/mode_t/ for the mode arg?
There was a problem hiding this comment.
ah I finally figured out what 'perm' meant by reading the MS docs: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/open-wopen?view=vs-2019 -- it means "permissions".
but there it's called pmode, not perm.
There was a problem hiding this comment.
Thanks and will change
There was a problem hiding this comment.
nit: end member variables with _
https://github.com/envoyproxy/envoy/blob/master/STYLE.md
Signed-off-by: cwsong <cwsong@iflytek.com>
|
/retest |
|
🤷♀️ nothing to rebuild. |
|
/azp run envoy-macos |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Thanks @dio |
|
Hi @mattklein123 @jmarantz thanks for your comments. And Can I get another approve ? |
|
Thanks |
Add flags for open method. So user can use it with read only mode or write only mode.
[Optional Fixes #Issue] no issue
[Optional Deprecated:]