-
Notifications
You must be signed in to change notification settings - Fork 372
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
Use SVD sequence number instead of incarnation when reporting status #2524
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2524 +/- ##
===========================================
- Coverage 71.94% 71.93% -0.01%
===========================================
Files 102 102
Lines 15145 15166 +21
Branches 2400 2400
===========================================
+ Hits 10896 10910 +14
- Misses 3768 3775 +7
Partials 481 481
Continue to review full report at Codecov.
|
was created from vmSettings. | ||
""" | ||
raise NotImplementedError() | ||
|
||
@property | ||
def svd_sequence_number(self): | ||
raise NotImplementedError() |
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.
Out of curiosity, what's the difference between this and the id
?
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.
The id is either the etag or the incarnation, and is used for logging purposes and to check if the goal state has changed (the etag/incarnation would change).
class ExtensionsGoalStateFromVmSettings(ExtensionsGoalState):
def __init__(self, etag, json_text, correlation_id):
self._id = "etag_{0}".format(etag)
class ExtensionsGoalStateFromExtensionsConfig(ExtensionsGoalState):
def __init__(self, incarnation, xml_text, wire_client):
self._id = "incarnation_{0}".format(incarnation)
The svd_sequence_number is used to report status (the existing code uses the incarnation for this value, but FT goal states don't have an incarnation, instead they expose the svd sequence number)
"goalStateAggregateStatus": {
"formattedMessage": {
"lang": "en-US",
"message": "GoalState executed successfully"
},
"timestampUTC": "2022-03-01T19:42:18Z",
"inSvdSeqNo": "1",
"status": "Success",
"code": 0
}
|
||
@property | ||
def incarnation(self): | ||
return self._id |
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'm confused, returning id for incarnation and vice versa?
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, this is upside down, i'll fix it
Updated the code to use the SVD sequence number when reporting status, instead of using the incarnation number (which happen to be the same for Fabric goal states).
Also. updated the code to log the goal state id (incarnation or etag) instead of the incarnation while processing extensions.