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

Use unique subscription IDs #6775

Closed
wants to merge 1 commit into from

Conversation

adriansmares
Copy link
Contributor

Summary

Use randomly generated subscription IDs instead of timestamp based subscription IDs.

Changes

  • Use randomly generated subscription IDs, in order to avoid duplicate subscription IDs.
    • It seems that under Firefox that duplicates are not impossible.
  • Error out when subscription IDs are duplicated.
  • Ensure that an error object is passed correctly to error handlers.

Testing

Local testing.

Regressions

The chance for a collision is 1 in 2^53 (ish). This is good enough.

Checklist

  • Scope: The referenced issue is addressed, there are no unrelated changes.
  • Compatibility: The changes are backwards compatible with existing API, storage, configuration and CLI, according to the compatibility commitments in README.md for the chosen target branch.
  • Documentation: Relevant documentation is added or updated.
  • The steps/process to test this feature are clearly explained including testing for regressions.
  • Changelog: Significant features, behavior changes, deprecations and fixes are added to CHANGELOG.md.
  • Commits: Commit messages follow guidelines in CONTRIBUTING.md, there are no fixup commits left.

@adriansmares adriansmares added this to the v3.29.0 milestone Dec 13, 2023
@adriansmares adriansmares self-assigned this Dec 13, 2023
@adriansmares adriansmares added the bug Something isn't working label Dec 13, 2023
@adriansmares adriansmares marked this pull request as ready for review December 13, 2023 20:25
@adriansmares adriansmares requested a review from a team as a code owner December 13, 2023 20:25
@@ -59,7 +59,7 @@ export default async (
endpoint = '/console/internal/events/',
timeout = 10000,
) => {
const subscriptionId = Date.now()
Copy link
Member

Choose a reason for hiding this comment

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

Interesting. So these would always be duplicates.

@adriansmares
Copy link
Contributor Author

Superseded by #6776 .

@adriansmares adriansmares deleted the fix/subscription-id-duplicates branch January 19, 2024 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants