-
Notifications
You must be signed in to change notification settings - Fork 516
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
Breaking: Fix publishing multiple rev reg defs with endorsement #3107
Conversation
Signed-off-by: jamshale <[email protected]>
Signed-off-by: jamshale <[email protected]>
Signed-off-by: jamshale <[email protected]>
Signed-off-by: jamshale <[email protected]>
Quality Gate passedIssues Measures |
@swcurran I left a note about the change in the response payload. Should be in the next release docs. Not sure if any controllers would do anything with the response, but they might. |
Sounds good. I’ll put it into the breaking change notes for the release. |
@jamshale class TxnOrPublishRevocationsResultSchema(OpenAPISchema):
"""Result schema for credential definition send request."""
sent = fields.Nested(
PublishRevocationsSchema(),
required=False,
metadata={"definition": "Content sent"},
)
txn = fields.Nested(
TransactionRecordSchema(),
required=False,
metadata={
"description": "Revocation registry revocations transaction to endorse"
},
) Should the model not be updated to handle the fact that |
I guess I forgot to update the response model here. The response is different depending on whether or not an endorsed transaction was used. If not using endorsement then it had the I agree the response model should at least be defined as a list. Feel free to open a PR for it or I will get to it shortly. |
@jamshale we'll make a PR for it 👌 |
…ndation#3107) * Fix publishing multiple rev reg defs with endorsement Signed-off-by: jamshale <[email protected]> * Refactor / Unit test Signed-off-by: jamshale <[email protected]> * Add more thourough unit testing Signed-off-by: jamshale <[email protected]> * Revert auto formatting to avoid doing coverage Signed-off-by: jamshale <[email protected]> --------- Signed-off-by: jamshale <[email protected]>
This fixes a bug/mistake when publishing revocations from multiple rev_reg_defs with endorsement. The endorsement process was occurring outside the manager and only considering the last rev_reg_def pre-endorsement result.
Note: This would be considered a breaking change if a controller was reading and processing the response. It is now an array instead of an object. This should have been the response from the beginning as you can request a list, you should return a list. Could be a nested object instead if that's preferable.