-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Add updated_by
to saved objects
#182687
Add updated_by
to saved objects
#182687
Conversation
/ci |
/ci |
/ci |
fix import
/ci |
@elasticmachine merge upstream |
/ci |
Pinging @elastic/kibana-core (Team:Core) |
Pinging @elastic/appex-sharedux (Team:SharedUX) |
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.
Discover code changes LGTM.
@elasticmachine merge upstream |
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.
Changes in x-pack/test/saved_object_api_integration
LGTM, just left one suggestion.
expect(typeof so.created_by).to.be('string'); | ||
expect(typeof so.updated_by).to.be('string'); |
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.
suggestion: I'm wondering if in loginAsInteractiveUser
you could also retrieve user profile ID like this
kibana/x-pack/test/security_api_integration/tests/user_profiles/get_current.ts
Lines 68 to 79 in 69b28f3
const { body: userWithProfileId } = await supertestWithoutAuth | |
.get('/internal/security/me') | |
.set('Cookie', sessionCookie.cookieString()) | |
.expect(200); | |
// Profile UID is supposed to be stable. | |
expectSnapshot(profileWithoutData).toMatchInline(` | |
Object { | |
"data": Object {}, | |
"enabled": true, | |
"labels": Object {}, | |
"uid": "u_K1WXIRQbRoHiuJylXp842IEhAO_OdqT7SDHrJSzUIjU_0", |
created_by
and updated_by
with user profile ID and not with some random string? It'd especially be useful in update
tests where objects are updated by different users.
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.
thanks, would be a nice improvement, I'll take a look
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.
ftr_configs.yml
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.
LGTM
packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/apis/update.ts
Outdated
Show resolved
Hide resolved
packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/apis/update.ts
Outdated
Show resolved
Hide resolved
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Page load bundle
Saved Objects .kibana field count
Unknown metric groupsAPI count
ESLint disabled line counts
References to deprecated APIs
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @Dosant |
## Summary close elastic/kibana-team#899 - Adds `updated_by` to saved object, similar to recently added `created_by` elastic#179344 - Fixes `created_by` / `created_at` should be set during upsert - Improves functional tests coverage
Summary
close https://github.com/elastic/kibana-team/issues/899
updated_by
to saved object, similar to recently addedcreated_by
Addcreated_by
to saved objects #179344created_by
/created_at
should be set during upsert