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

set ExpiresAt in confirmations that support expiration #139

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

ewollesen
Copy link
Contributor

This field will help the care partner mobile app.

BACK-2807

@ewollesen ewollesen force-pushed the eric/invitations-with-expiration branch 2 times, most recently from 5c78307 to ba4c6ca Compare January 24, 2024 21:03
@ewollesen ewollesen force-pushed the eric/invitations-with-expiration branch from ba4c6ca to cab4964 Compare January 24, 2024 21:28
darinkrauss
darinkrauss previously approved these changes Jan 25, 2024
Copy link
Contributor

@darinkrauss darinkrauss left a comment

Choose a reason for hiding this comment

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

LGTM, assuming this comes with a migration to update any existing confirmations.

@ewollesen
Copy link
Contributor Author

LGTM, assuming this comes with a migration to update any existing confirmations.

Thanks @darinkrauss! Yes, there's a migration: https://github.com/tidepool-org/tools-private/pull/53

@ewollesen ewollesen force-pushed the eric/invitations-with-expiration branch from cab4964 to 6f56901 Compare January 25, 2024 20:08
@ewollesen
Copy link
Contributor Author

/deploy qa2

@tidebot
Copy link
Collaborator

tidebot commented Jan 29, 2024

ewollesen updated values.yaml file in qa2

@tidebot
Copy link
Collaborator

tidebot commented Jan 29, 2024

ewollesen updated flux policies file in qa2

@tidebot
Copy link
Collaborator

tidebot commented Jan 29, 2024

ewollesen deployed hydrophone eric/invitations-with-expiration branch to qa2 namespace

@ewollesen ewollesen force-pushed the eric/invitations-with-expiration branch 2 times, most recently from e4c1f44 to 900ebad Compare March 27, 2024 17:07
darinkrauss
darinkrauss previously approved these changes Mar 27, 2024
Copy link
Contributor

@darinkrauss darinkrauss left a comment

Choose a reason for hiding this comment

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

Nothing blocking, but some comments for your consideration.

@@ -232,12 +237,10 @@ func (c *Confirmation) ValidateType(expectedType Type, validationErrors *[]error
}

func (c *Confirmation) IsExpired() bool {
timeout, ok := Timeouts[c.Type]
if !ok {
if c.ExpiresAt == nil || c.ExpiresAt.IsZero() {
Copy link
Contributor

Choose a reason for hiding this comment

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

[nit] Do we have zero time ExpiresAt in the the data currently? If not, then I'd remove the || c.ExpiresAt.IsZero() clause as not needed.

models/confirmation_test.go Show resolved Hide resolved
models/confirmation_test.go Show resolved Hide resolved
models/confirmation_test.go Show resolved Hide resolved
models/confirmation_test.go Show resolved Hide resolved
t.Fatalf("expected nil error, got %s", err)
}
if nonExpiringInviting.IsExpired() {
t.Errorf("expected invitation type %q to never expire", cType)
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, much more self-explanatory than "expected false, got true". 👍

darinkrauss
darinkrauss previously approved these changes Mar 27, 2024
Copy link
Contributor

@darinkrauss darinkrauss left a comment

Choose a reason for hiding this comment

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

LGTM!

This field will help the care partner mobile app.

BACK-2807
Copy link
Contributor

@darinkrauss darinkrauss left a comment

Choose a reason for hiding this comment

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

LGTM!

@ewollesen
Copy link
Contributor Author

/deploy qa5

@tidebot
Copy link
Collaborator

tidebot commented Apr 15, 2024

ewollesen updated values.yaml file in qa5

@tidebot
Copy link
Collaborator

tidebot commented Apr 15, 2024

ewollesen updated flux policies file in qa5

@tidebot
Copy link
Collaborator

tidebot commented Apr 15, 2024

ewollesen deployed hydrophone eric/invitations-with-expiration branch to qa5 namespace

@ewollesen ewollesen merged commit fd3c696 into master Apr 15, 2024
3 checks passed
@ewollesen ewollesen deleted the eric/invitations-with-expiration branch April 15, 2024 17:52
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