Serialize updated value of entity document in response#4646
Conversation
updated value in the db out in the actionupdated value in action doc
rabbah
left a comment
There was a problem hiding this comment.
Why only actions? All assets have an updated field.
|
@rabbah Thank you for review. I think the updated field of activation doesn't need to be serialized because it has So I'll modify all assets (trigger, rules, and package) except |
235b568 to
e44dd6c
Compare
updated value in action docupdated value of entity document in response
13cf028 to
b09d783
Compare
Codecov Report
@@ Coverage Diff @@
## master #4646 +/- ##
==========================================
- Coverage 84.99% 78.32% -6.67%
==========================================
Files 198 198
Lines 8845 8837 -8
Branches 615 606 -9
==========================================
- Hits 7518 6922 -596
- Misses 1327 1915 +588
Continue to review full report at Codecov.
|
|
It passed all the tests 👍 |
| val publish: Boolean | ||
| val annotations: Parameters | ||
| val updated = Instant.now(Clock.systemUTC()) | ||
| val updated = WhiskEntity.currentMillis() |
There was a problem hiding this comment.
since all the subtypes now assign this value in the constructors, can we make this an abstract value?
There was a problem hiding this comment.
I think we can't make this an abstract value because the WhiskActivation entity type doesn't assign this value to the constructor.
|
Changes lgtm now with the added explanation. |
| def aname() = MakeName.next("packages_tests") | ||
| val parametersLimit = Parameters.sizeLimit | ||
|
|
||
| def checkResponse(response: WhiskPackage, expected: WhiskPackage) = |
|
Looks like a failure in RulesApiTests |
|
One test case has been broken by refactoring. I just fixed it. |
3971288 to
1606a42
Compare
1606a42 to
2f8571b
Compare
style95
left a comment
There was a problem hiding this comment.
LGTM
My comment would not block merging this.
| val parametersLimit = Parameters.sizeLimit | ||
| val dummyInstant = Instant.now() | ||
|
|
||
| def checkResponse(response: WhiskRuleResponse, expected: WhiskRuleResponse) = |
There was a problem hiding this comment.
One small nit can be extracting this kind of methods into a trait.
There was a problem hiding this comment.
@style95 Thank you for review, I've created a common method to test the WhiskAction, WhiskActionMetaData, WhiskTrigger, and WhiskPackage. But I couldn't extract the method in the RulesApiTests because WhiskRuleResponse doesn't extend WhiskEntity.
Please review it again 😄
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4646 +/- ##
==========================================
+ Coverage 77.92% 78.32% +0.40%
==========================================
Files 198 198
Lines 8841 8837 -4
Branches 614 606 -8
==========================================
+ Hits 6889 6922 +33
+ Misses 1952 1915 -37 ☔ View full report in Codecov by Sentry. |
Description
Since an action API doesn't serialize the
updatedvalue of the action entity, users can't know when the action was updated.It changes the action API to serialize and provide the
updatedvalue of the actionRelated issue and scope
#4228
My changes affect the following components
Types of changes
Checklist: