Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strongly type timestamps #31891

Open
rarkins opened this issue Oct 10, 2024 · 0 comments
Open

Strongly type timestamps #31891

rarkins opened this issue Oct 10, 2024 · 0 comments
Assignees
Labels
priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:refactor Refactoring or improving of existing code

Comments

@rarkins
Copy link
Collaborator

rarkins commented Oct 10, 2024

Describe the proposed change(s).

Similar to what was done for LongCommitSha, we should add a strongly typed Timestamp type, which is a validated Timestamp. We should also consistently use luxon DateTime capabilities throughout if we're not already.

export type Timestamp = string & { __timestamp: never };

Our datasource logic should be updated to only return releaseTimestamp if it's of type Timestamp. Individual datasource implementations could possibly return invalid strings, but they should be filtered before being returned to the worker layer.

@rarkins rarkins added priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:refactor Refactoring or improving of existing code labels Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:refactor Refactoring or improving of existing code
Projects
None yet
Development

No branches or pull requests

2 participants