-
Notifications
You must be signed in to change notification settings - Fork 138
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
CBG-4336: add updated at field for persisted configs #7265
Conversation
@JRascagneres Can you review and make sure the |
As discussed - add a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, wonder if we can simplify a bit around Principal with the SetCreatedAt
usage - but nitpicking.
auth/auth.go
Outdated
@@ -631,6 +631,9 @@ func (auth *Authenticator) UpdateUserEmail(u User, email string) error { | |||
if err != nil { | |||
return nil, err | |||
} | |||
currentUser.SetUpdatedAt() | |||
currentUser.SetCreatedAt(currentUser.GetCreatedAt()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why the Set(Get())
pattern is required. I think it's not nescessary to call SetCreatedAt
in these places at all, since the time is already set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, not sure why I thought this was needed. Will remove this now
* CBG-4336: add updated at field for persisted configs * change time to utc * fix default collection test issues * flakyness with tests * add delay to other tests too * updates to add created_at field to configs * remove unnecessary method
CBG-4336
Pre-review checklist
fmt.Print
,log.Print
, ...)base.UD(docID)
,base.MD(dbName)
)docs/api
Integration Tests
GSI=true,xattrs=true
https://jenkins.sgwdev.com/job/SyncGateway-Integration/2884/