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

WORLDSERVICE-185: Replace uuid with crypto.randomUUID #12361

Draft
wants to merge 24 commits into
base: latest
Choose a base branch
from

Conversation

karinathomasbbc
Copy link
Contributor

@karinathomasbbc karinathomasbbc commented Feb 4, 2025

Resolves JIRA https://jira.dev.bbc.co.uk/browse/WORLDSERVICE-185

Overall changes

Replaces uuid with crypto.randomUUID as uuid is out of date, and we are unable to upgrade due to incompatibility with Opera Mini

Code changes

  • Create a new function - getUUID to generate a unique ID
  • Update all references to uuid with getUUID
  • Update unit tests

Testing

  • Preview environment
    • Opera Mini
      • Pages should continue to render OK
      • Page View beacon sent to ATI
    • Incognito mode
      • Optimizely Experiment - ensure ckns_mvt cookie value is a unique ID
      • ATI - ensure idclient in the network request is a unique ID / atuserid cookie is a unique ID
      • Uploader form - ensure said in the POST request is a unique ID

Tested with Opera Mini Emulator, page renders as expected & ATI Page View event sent

Screenshot 2025-03-06 at 18 56 09

@karinathomasbbc karinathomasbbc self-assigned this Feb 4, 2025
Comment on lines +10 to +11
export const MIN_SIZE = 779 - 5;
export const MAX_SIZE = 1244 + 5;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

😬

@karinathomasbbc karinathomasbbc changed the title Replace references of uuid with crypto.randomUUID WORLDSERVICE-185: Replace references of uuid with crypto.randomUUID Mar 6, 2025
@karinathomasbbc karinathomasbbc changed the title WORLDSERVICE-185: Replace references of uuid with crypto.randomUUID WORLDSERVICE-185: Replace uuid with crypto.randomUUID Mar 6, 2025
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.

1 participant