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: introduce a new config key to store an atsign's blocklist #1622

Merged
merged 15 commits into from
Oct 26, 2023

Conversation

srieteja
Copy link
Contributor

@srieteja srieteja commented Oct 16, 2023

Closes #1570 and #1204

- What I did

  • introduce a new config key to store an at-sign's blocklist
  • allow backward compatibility to ensure data stored under the old key is smoothly migrated to the new key
  • ensure the new key is not synced to clients
  • delete the old key after data migration, which is actually the cause of the issue linked above
  • remove an unnecessary try-catch block in ConfigVerbHandler
  • Replace assert statements in AtConfig with IllegalArgumentExceptions
  • Group all the tests in at_persistence_secondary/at_config_test. Also added code to close the hive in the tearDown.

- How I did it

  • New key that stores an at-sign's blocklist is: 'private:blocklist@atsign'.
  • This key name is more descriptive of its function and ensures that this key is not synced to the client(Keys that start with 'private:' are not synced).
  • When the new key is not found in the keystore, an attempt to fetch data with the old key is made. And then the existing data is stored with the new config-key while the old one is deleted.

- How to verify it

  • added unit test to objectively verify backward compatibility
  • existing unit and functional tests passing should indicate the proper working of this feature

- Description for the changelog

fix: introduce a new config key to store an at-sign's blocklist

@srieteja srieteja marked this pull request as draft October 16, 2023 10:55
@srieteja srieteja self-assigned this Oct 16, 2023
@srieteja srieteja marked this pull request as ready for review October 17, 2023 20:31
@srieteja srieteja requested review from murali-shris and sitaram-kalluri and removed request for murali-shris October 17, 2023 20:43
@sitaram-kalluri sitaram-kalluri merged commit 09d253b into trunk Oct 26, 2023
18 checks passed
@sitaram-kalluri sitaram-kalluri deleted the configkey_is_not_well_formed branch October 26, 2023 05:47
@gkc gkc mentioned this pull request Oct 26, 2023
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.

configKey is not well formed key
3 participants