-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 updatedAt to SimpleSavedObject #126359
Conversation
a96a16d
to
ff6c9d3
Compare
1822bce
to
c1960c2
Compare
.then((sso) => { | ||
this.updatedAt = sso.updatedAt; | ||
return sso; | ||
}); |
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.
wasn't sure if this change warrants adding a test. thoughts?
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 know that the current test suite is pretty lackluster, but let's not make the situation worse, and let's add tests on new enhancements if that's fine with you.
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.
happy to help. don't mind iterating too if needed 👍
@@ -58,6 +60,7 @@ export class SimpleSavedObject<T = unknown> { | |||
this.migrationVersion = migrationVersion; | |||
this.coreMigrationVersion = coreMigrationVersion; | |||
this.namespaces = namespaces; | |||
this.updatedAt = updatedAt; |
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.
needed in order to show the value in a table column
return this.client.create(this.type, this.attributes, { | ||
migrationVersion: this.migrationVersion, |
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 think you also need to update updateAt
when create
-ing the object?
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.
fixed and included a test. woops!
.then((sso) => { | ||
this.updatedAt = sso.updatedAt; | ||
return sso; | ||
}); |
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 know that the current test suite is pretty lackluster, but let's not make the situation worse, and let's add tests on new enhancements if that's fine with you.
💛 Build succeeded, but was flakyMetrics [docs]Public APIs missing comments
Page load bundle
History
To update your PR or re-run it, just comment with: |
…re-browser-errors * 'main' of github.com:elastic/kibana: (46 commits) [Reporting] Capture Kibana stopped error (elastic#127017) add updatedAt to SimpleSavedObject (elastic#126359) Remove deprecated & unused `ElasticsearchServiceStart.legacy` (elastic#127050) remove opacity for fitting line series (elastic#127176) Remove deprecated & unused `HttpServiceSetup.auth` (elastic#127056) [Lens] Show underlying data editor navigation (elastic#125983) Bump dependencies (elastic#127238) Remove deprecated & unused `public-AsyncPlugin` (elastic#127048) Remove deprecated & unused `SavedObjectsImportFailure.title` (elastic#127043) skip flaky suite (elastic#123372) [kbn/generate] add basic package generator (elastic#127095) [build] Up compression quality (elastic#127064) Made fix to broken test. Deleted all existing pipelines before test starts. FLAKY: elastic#118593 (elastic#127102) Increase timeout for Jest integration tests (elastic#127220) skip failing test suite (elastic#126949) [DOCS] Adds note for data source performance impact (elastic#127184) [Security Solution] Adds CCS privileges warning enable switch in advanced settings (elastic#124459) [App Search] Move to tabbed single tabbed JSON flyout with upload and paste options and refactor cards (elastic#127162) Update dependency chromedriver to v99 (elastic#127079) [kbn/pm] add timings for more parts of bootstrap (elastic#127157) ... # Conflicts: # x-pack/plugins/reporting/common/errors/index.ts # x-pack/plugins/reporting/server/lib/tasks/execute_report.ts
Friendly reminder: Looks like this PR hasn’t been backported yet. |
updated_at
fromSavedObject
toSimpleSavedObject
SimpleSavedObject.updatedAt
property after callingsave()
(note: wasn't sure the PR template is relevant in this case, please LMK if i missed something)