Skip to content

Conversation

@kbavi
Copy link

@kbavi kbavi commented Feb 25, 2023

What problem does this PR solve?

Issue Number: close #462

Problem Summary

The function is used to get the current date(format: YYYY-MM-DD) in a specific TimeZone. And assign it to the target JSON path.
The Time Zone will be UTC if users don't specify it.

What is changed and how does it work?

  • adds a new 'function' called today
  • reads the time info from data and return it in YYYY-MM-DD format after converting it to the passed/default timezone

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

@kbavi kbavi requested a review from wenfengwang as a code owner February 25, 2023 10:41
@kbavi kbavi changed the title feat: implement function "today feat: implement function "today" Feb 25, 2023
"github.com/linkall-labs/vanus/internal/primitive/transform/function"
)

// NewTodayAction ["today", "path", "timeZone"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the param path is target path ,it isn't an original path

@codecov
Copy link

codecov bot commented Feb 27, 2023

Codecov Report

Merging #464 (b2ba196) into main (2a78cb5) will decrease coverage by 0.46%.
The diff coverage is 36.02%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #464      +/-   ##
==========================================
- Coverage   57.71%   57.26%   -0.46%     
==========================================
  Files         180      186       +6     
  Lines       14614    15031     +417     
==========================================
+ Hits         8434     8607     +173     
- Misses       5552     5792     +240     
- Partials      628      632       +4     
Impacted Files Coverage Δ
...ernal/controller/trigger/validation/subscripton.go 69.29% <ø> (+0.85%) ⬆️
internal/gateway/proxy/deadletter.go 0.00% <0.00%> (ø)
internal/gateway/proxy/direct.go 73.33% <0.00%> (-5.24%) ⬇️
internal/primitive/transform/function/util/time.go 62.50% <0.00%> (-8.93%) ⬇️
internal/store/segment/server.go 14.10% <0.00%> (-0.03%) ⬇️
internal/trigger/client/gcloud_functions.go 0.00% <0.00%> (ø)
internal/trigger/client/grpc.go 0.00% <0.00%> (ø)
internal/trigger/client/http.go 0.00% <0.00%> (ø)
internal/trigger/client/interface.go 0.00% <0.00%> (-19.24%) ⬇️
internal/trigger/client/lambda.go 0.00% <0.00%> (ø)
... and 32 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eee9250...b2ba196. Read the comment docs.

@Michaelg22
Copy link
Contributor

Michaelg22 commented Mar 7, 2023

@avinashb98 We have left some suggestions for you, please have a look.

@ifplusor ifplusor added co/trigger relating to trigger function labels Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

co/trigger relating to trigger function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Good First Issues]: implement function "today" - 4 points

4 participants