Skip to content

remove protoCompactOffsetDateTime, add protoOffsetDateTimeFormat#238

Merged
lewisjkl merged 1 commit intodisneystreaming:mainfrom
benoitlouy:protooffsetdatetimeformat
Jul 8, 2025
Merged

remove protoCompactOffsetDateTime, add protoOffsetDateTimeFormat#238
lewisjkl merged 1 commit intodisneystreaming:mainfrom
benoitlouy:protooffsetdatetimeformat

Conversation

@benoitlouy
Copy link
Copy Markdown
Contributor

@benoitlouy benoitlouy commented Jul 7, 2025

The recently added trait alloy.proto#protoCompactOffsetDateTime seems to indicate that the default encoding for alloy#OffsetDateTime should be a string.

However, the underlying type of alloy#OffsetDateTime is timestamp and the default encoding for timestamp is the compact format according to this comment

This change removes alloy.proto#protoCompactOffsetDateTime and adds alloy.proto#protoOffsetDateTimeFormat that can be used to configure how an alloy#OffsetDateTime should be encoded when serializing to protobuf.

This change supports 2 formats:

  • PROTOBUF: the timesamp should be encoded using message { int64 seconds = 1; int32 nanos = 2; string zone_offset = 3; }
  • RFC3339_STRING: the timestamp should be encoded as a string using the format described in RFC3339 section 5.6.

@lewisjkl lewisjkl merged commit 4a90999 into disneystreaming:main Jul 8, 2025
3 checks passed
@benoitlouy benoitlouy deleted the protooffsetdatetimeformat branch July 9, 2025 13:19
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.

3 participants