lua: timestamp in millis#14522
Conversation
|
Hi @mindyor, welcome and thank you for your contribution. We will try to review your Pull Request as quickly as possible. In the meantime, please take a look at the contribution guidelines if you have not done so already. |
|
Thanks, @mindyor! Lua API looks good. Could you fix CI? |
|
@mindyor, do you want me to help you to finish this PR? :). |
|
@mindyor when you have time, please have a look at https://github.com/envoyproxy/envoy/compare/main...dio:lua-timestamp-millis-updated?expand=1. I added two commits (one of them is to "rebase" it with the current main branch "main", the second one is to make it compiles). I think we need to add tests for running |
dio
left a comment
There was a problem hiding this comment.
Please add tests when calling registerGlobal (most likely you need to add it in test/extensions/filters/common/lua/lua_test.cc).
There was a problem hiding this comment.
Sorry, my bad, seems like we need to copy the initializers vector.
tls_slot_->runOnAllThreads([global, initializers](OptRef<LuaThreadLocal> tls) {There was a problem hiding this comment.
Can you comment why this needs to be exactly 1? :)
There was a problem hiding this comment.
Hmm it may not be. Taking this out
|
This |
|
/retest |
|
Retrying Azure Pipelines: |
dio
left a comment
There was a problem hiding this comment.
Looks good. A request to expand the docs a bit more. Thanks!
There was a problem hiding this comment.
I think we need to document the exported enums here?
There was a problem hiding this comment.
Could you expand this, so we are aware of the enums.
64cf446 to
127c801
Compare
127c801 to
df5e616
Compare
Signed-off-by: mindyor <mor@squareup.com>
Signed-off-by: mindyor <mor@squareup.com>
df5e616 to
8ba3f45
Compare
|
Looks like you need to merge main. Quite a few conflicts |
Signed-off-by: mindyor <mor@squareup.com>
Signed-off-by: mindyor <mor@squareup.com>
Signed-off-by: mindyor <mor@squareup.com>
Signed-off-by: mindyor <mor@squareup.com>
Signed-off-by: mindyor <mor@squareup.com>
Signed-off-by: mindyor <mor@squareup.com>
Signed-off-by: mindyor <mor@squareup.com>
Signed-off-by: mindyor <mor@squareup.com>
Signed-off-by: mindyor <mor@squareup.com>
…y lua int limits. update documentation Signed-off-by: mindyor <mor@squareup.com>
8ba3f45 to
488bcb7
Compare
Signed-off-by: mindyor <mor@squareup.com>
Signed-off-by: mindyor <mor@squareup.com>
Signed-off-by: mindyor <mor@squareup.com>
|
/retest |
|
Retrying Azure Pipelines: |
Commit Message: add Lua function to get timestamp in milliseconds and nanoseconds
Additional Description: Description: adds Lua function to get timestamp in higher resolution. Resolutions are: milliseconds since epoch. Resolution defaults to milliseconds since epoch.
Risk Level: low
Testing: added unit tests for default case, resolution levels, and invalid input
Docs Changes: added documentation for function in
lua_filter.rstRelease Notes: added release note in
version_history.rstPlatform Specific Features: n/a
[Optional Runtime guard:]
[Optional Fixes #Issue] #10282
[Optional Deprecated:]
((an update of #10329))