Skip to content

feat: add time provider package#127

Draft
Anaswara-Suresh wants to merge 1 commit intokubevela:mainfrom
Anaswara-Suresh:GWCP-94846-Built-in-Packages-testing
Draft

feat: add time provider package#127
Anaswara-Suresh wants to merge 1 commit intokubevela:mainfrom
Anaswara-Suresh:GWCP-94846-Built-in-Packages-testing

Conversation

@Anaswara-Suresh
Copy link

@Anaswara-Suresh Anaswara-Suresh commented Feb 17, 2026

Summary by cubic

Add a built-in time provider for CUEX to convert between dates and UNIX timestamps with optional layouts, and register it in the default internal packages. This supports GWCP-94846 by expanding built-in packages used in testing.

  • New Features
    • Added providers/time with two ops: "timestamp" (date → int64) and "date" (int64 → string), defaulting to RFC3339 and UTC.
    • Exposed CUE templates: #DateToTimestamp and #TimestampToDate with optional layout params.
    • Registered timeext.Package in the compiler’s default internal packages.
    • Added unit tests covering RFC3339/RFC1123, empty inputs, and error cases.

Written for commit e1202e3. Summary will update on new commits.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 4 files

@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

❌ Patch coverage is 81.81818% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.33%. Comparing base (ef68242) to head (e1202e3).

Files with missing lines Patch % Lines
cue/cuex/providers/time/time.go 81.25% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #127      +/-   ##
==========================================
- Coverage   88.34%   88.33%   -0.01%     
==========================================
  Files          82       83       +1     
  Lines        3491     3524      +33     
==========================================
+ Hits         3084     3113      +29     
- Misses        273      278       +5     
+ Partials      134      133       -1     
Flag Coverage Δ
unit-test 88.33% <81.81%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Anaswara-Suresh Anaswara-Suresh marked this pull request as draft February 17, 2026 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant