Skip to content
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: Uptake public key hash changes #2160

Merged
merged 20 commits into from
Dec 11, 2024

Conversation

sitaram-kalluri
Copy link
Member

- What I did

  • Consume the publicKeyHash changes.
    • In the abstract_update_verb_handler.dart, from the verb params, populate the publicKeyHash value to the atKey.metadata.publicKeyHash field
    • In the sync_proressive_verb_handler.dart, jsonEncode the publicKeyHash value from the metadataMap to sync to the client. On the client side, to build the PublicKeyHash instance (which contains hash and hashing algo), jsonEncod the publicKeyHash and on the client side jsonDecode the string to build publicKeyHash instance.
    • In the notify_verb_handler.dart and resource_manager.dart, the set the publicKeyHash value to send the publicKeyHash value to the notification receiver.
    • In the monitor_verb_handler.dart, add publicKeyHash value for the clients which receives notifications via the monitor.

- How to verify it

  • Updated the existing sync_verb_test.dart to ensure the publicKeyHash value is added to the metadata when data is synced to the client.

- Description for the changelog

  • fix: Uptake public key hash changes

Copy link
Contributor

@gkc gkc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Please add functional tests for update-then-lookup, update-then-sync for the same atSign
  • Please add end-to-end tests to verify the end-to-end flows also

@sitaram-kalluri
Copy link
Member Author

sitaram-kalluri commented Nov 27, 2024

  • Please add functional tests for update-then-lookup, update-then-sync for the same atSign

  • Please add end-to-end tests to verify the end-to-end flows also

@gkc : I have added a functional test for the update-then-sync scenario for the specified atSign, which verifies that the atKey.metadata contains the publicKeyHash in the sync response.

we have a known issue with reaching the other atSign in the functional tests, which prevents us from including the update-then-lookup scenario in those tests. So, included this in the end-to-end tests.

The end-to-end staging test is currently failing because the changes are not available in the trunk branch.

@sitaram-kalluri sitaram-kalluri requested a review from gkc November 27, 2024 12:20
@gkc gkc marked this pull request as draft December 2, 2024 12:04
@gkc
Copy link
Contributor

gkc commented Dec 2, 2024

@sitaram-kalluri As discussed earlier, let's first do a at_secondary_server PR which does nothing except take up next version of at_persistence_secondary_server so it gets the new typeAdapter; once that has been rolled out to prod then we have a stable place to roll back to if we need to. Have marked this PR as draft so we don't accidentally merge yet.

@sitaram-kalluri sitaram-kalluri marked this pull request as ready for review December 9, 2024 11:25
@sitaram-kalluri
Copy link
Member Author

@gkc : All the tests are passing expect the test in "end2end_test_staging".

Although we have a version check in the test, it fails in the "end2end_test_staging" because the staging server returns the secondary server version as v3.1.0. The secondary version with 3.1.0 is still in the trunk and hasn't been released to canary. To ensure the "end2end_test_staging" test passes, shall we release version 3.1.0 to canary and update the feature branch version to 3.1.1?

@gkc
Copy link
Contributor

gkc commented Dec 9, 2024

@gkc : All the tests are passing expect the test in "end2end_test_staging".

Although we have a version check in the test, it fails in the "end2end_test_staging" because the staging server returns the secondary server version as v3.1.0. The secondary version with 3.1.0 is still in the trunk and hasn't been released to canary. To ensure the "end2end_test_staging" test passes, shall we release version 3.1.0 to canary and update the feature branch version to 3.1.1?

sounds good to me

@sitaram-kalluri sitaram-kalluri merged commit 4ea4645 into trunk Dec 11, 2024
26 checks passed
@sitaram-kalluri sitaram-kalluri deleted the 2121-uptake-pubkeyhash-changes branch December 11, 2024 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants