Skip to content

Create a new Delivery struct that includes Timestamp #555

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

Merged
merged 9 commits into from
Feb 3, 2025

Conversation

gorzell
Copy link
Contributor

@gorzell gorzell commented Mar 9, 2023

Note: This is an API breaking change.

Currently the Timestamp value is being dropped as part of the conversion from BorrowedMessage to OwnedDeliveryResult, however this value is updated once the message has been published and callers should have access to the updated value. As far as I can tell, this is the only other value that is updated as part of publishing.

The new struct is returned as part of the OwnedDeliveryResult.

An alternative to expanding the tuple would be to replace it with a struct. This is a bit more disruptive now, but would make adding values in the future a backwards compatible change. So it depends how likely it is that there will be further new values.

This could also be done in a way that isn't a breaking change, but would involve duplicating functions and copying some types, i.e. DeliveryFuture. It doesn't seem like that level of complexity is justified given the pre 1.0 status.

gorzell added 2 commits March 9, 2023 11:17
**Note:** This is an API breaking change.

Currently the `Timestamp` value is being dropped as part of the
conversion from `BorrowedMessage` to `OwnedDeliveryResult`, however this
value is updated once the message has been published and callers should
have access to the updated value. As far as I can tell, this is the
**only** other value that is updated as part of publishing.

An alternative to expanding the tuple would be to replace it with a
struct. This is a bit more disruptive now, but would making adding
values in the future a backwards compatible change. So it depends how
likely it is that there will be further new values.

This could also be done in a way that isn't a breaking change, but would
involve duplicating functions and copying some types, i.e.
`DeliveryFuture`. It doesn't seem like that level of complexity is
justified given the pre 1.0 status.
@gorzell
Copy link
Contributor Author

gorzell commented Nov 16, 2023

Any chance someone could take a look at this? I would like get our production systems off my fork if at all possible.

@CleanCut
Copy link

@davidblewett When you get a moment, could you review this PR? We'd love to stop maintaining a fork for this small change. ❤️

Copy link
Collaborator

@davidblewett davidblewett left a comment

Choose a reason for hiding this comment

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

I would prefer a dedicated struct, for the reason described in the comment. If we're going to break the API, I'd prefer to do it once and be able to adjust it in the future without breaking users.

@CleanCut
Copy link

Thanks, @davidblewett! Good to know. We'll get back to you soon with that change.

@CleanCut
Copy link

We'll get back to you soon with that change.

Just to set expectations, we'll most likely deliver this change next month after the holidays. We want to make sure to give it a thorough review and testing on our end before submitting it upstream. Happy Holidays! 😄

@gorzell
Copy link
Contributor Author

gorzell commented Dec 30, 2024

I would prefer a dedicated struct, for the reason described in the comment. If we're going to break the API, I'd prefer to do it once and be able to adjust it in the future without breaking users.

I have switched this out. Let me know if there is anything else you would like me to change.

@gorzell gorzell changed the title Add Timestamp to the OwnedDeliveryResult tuple. Create a new Delivery struct that includes Timestamp Dec 30, 2024
@CleanCut
Copy link

@davidblewett I hope you had some fantastic winter holidays! How is this PR looking to you?

Copy link
Collaborator

@davidblewett davidblewett left a comment

Choose a reason for hiding this comment

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

+1

Copy link
Collaborator

@davidblewett davidblewett left a comment

Choose a reason for hiding this comment

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

Last request I promise: please add a changelog entry documenting the API break for the OwnedDeliveryResult type.

@gorzell
Copy link
Contributor Author

gorzell commented Jan 27, 2025

@davidblewett changelog updated.

Copy link
Collaborator

@davidblewett davidblewett left a comment

Choose a reason for hiding this comment

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

+1

@davidblewett davidblewett merged commit 0b35424 into fede1024:master Feb 3, 2025
5 of 9 checks passed
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