-
Notifications
You must be signed in to change notification settings - Fork 12
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
fix: Update the error message and add skip commit for enrollment key deletion #2117
Merged
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c63e297
fix: Update the error message and add skip commit for enrollment key …
sitaram-kalluri 3e4229a
fix: Update the error message in functional test
sitaram-kalluri 2bb14ec
Merge branch 'trunk' into update_enrollment_error_messages
sitaram-kalluri 918850b
fix: Add unit tests to verify commit log state for various enrollment…
sitaram-kalluri 253f45b
fix: Remove commit log check for public key on deny enrollment operation
sitaram-kalluri 2278f21
fix: Set skipCommit to true for apkamPublicKey
sitaram-kalluri 6029647
Merge branch 'trunk' into update_enrollment_error_messages
sitaram-kalluri File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,7 +121,7 @@ void main() { | |
expect( | ||
int.parse( | ||
jsonDecode(statsResponse.replaceAll('data:', ''))[0]['value']), | ||
lastCommitIdBeforeUpdate + 4); | ||
lastCommitIdBeforeUpdate + 3); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since akamPublicKeys are not logged into the commit log, reduced value to 3. |
||
await authenticatedSocket.close(); | ||
|
||
await authenticatedSocket.initiateConnectionWithListener( | ||
|
@@ -135,11 +135,11 @@ void main() { | |
expect(syncResponseList.length, 2); | ||
expect(syncResponseList[0]['atKey'], | ||
'$secondAtSign:phone-$randomString.wavi$firstAtSign'); | ||
expect(syncResponseList[0]['commitId'], lastCommitIdBeforeUpdate + 2); | ||
expect(syncResponseList[0]['commitId'], lastCommitIdBeforeUpdate + 1); | ||
|
||
expect(syncResponseList[1]['atKey'], | ||
'$secondAtSign:phone-$randomString.buzz$firstAtSign'); | ||
expect(syncResponseList[1]['commitId'], lastCommitIdBeforeUpdate + 3); | ||
expect(syncResponseList[1]['commitId'], lastCommitIdBeforeUpdate + 2); | ||
}); | ||
}); | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 EnrollVerbHandler is not requesting to skip the commit when storing this key. So in theory this test is required - but I believe the commit log is not currently being updated because of this #2115
So - we should probably explicitly change the EnrollVerbHandler so that it skips the commit log when storing this public key also, since these are not things that need to be synced to clients and, indeed, currently are not synced - but would start syncing if #2115 were merged
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.
Specifically add
skipCommit: true
to the calls to keyStore.put which are being made on lines 257 and 362 in enroll_verb_handler.dartThere 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.