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

feat: add/use RFC3339 fields in requests #233

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

figueredo
Copy link
Contributor

Proposed changes

Timestamp fields that store time as milliseconds since epoch are being replaced by fields that store it as a RFC 3339 string.

This commit:

  • Removes POST /feedbacks timestamp field, replacing it with occurred_at. Removal is possible because this field is not in the public API.
  • Add collected_at to POST /signups' additional_locations. This field should be used instead of the existing timestamp.

Checklist

  • Style check and tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@figueredo figueredo self-assigned this Jul 17, 2024
@figueredo figueredo requested a review from a team as a code owner July 17, 2024 17:32
@figueredo figueredo requested a review from soareswallace July 17, 2024 17:32
@Value
@Builder
public class PostFeedbackRequestBody {
FeedbackEvent event;
Long timestamp;
Instant occurredAt;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a breaking change once PostFeedbackRequestBody is public, but I'm considering it as not because the user isn't supposed to use this class directly. Should change the visiblity of these internal classes to avoid issues?

Copy link
Member

Choose a reason for hiding this comment

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

yep

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll change it in another PR to be released together with the breaking changes.

Comment on lines +12 to +13
@Deprecated Long timestamp;
Instant collectedAt;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I decided to mark the old field as deprecated and add the new here as this class is used by the user. Given that we are bumping the major due to the removal of GetSignup, should we take the opportunity and remove the old field too?

Copy link
Member

Choose a reason for hiding this comment

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

sure

Copy link
Contributor Author

@figueredo figueredo Jul 24, 2024

Choose a reason for hiding this comment

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

I'll remove it later together with the other breaking changes.

@figueredo figueredo force-pushed the rfc3339-fields branch 3 times, most recently from 7b4e6d8 to 43ff19b Compare July 24, 2024 18:05
Timestamp fields that store time as milliseconds since epoch are
being replaced by fields that store it as a RFC 3339 string.

This commit:
- Removes POST /feedbacks `timestamp` field, replacing it with
`occurred_at`. Removal is possible because this field is not in
the public API.
- Add `collected_at` to POST /signups' `additional_locations`. This
field should be used instead of the existing `timestamp`.
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.

2 participants