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

[CORL-2875]: update Redis cache key name for comment embed jsonp #4308

Merged
merged 1 commit into from
Aug 18, 2023

Conversation

kabeaty
Copy link
Contributor

@kabeaty kabeaty commented Aug 1, 2023

What does this PR do?

This fix ensures that when the comment embed jsonp is set in the Redis cache, each comment has its own consistent key specific to comment embeds. The comment count jsonp should still have a consistent Redis cache key specific to comment counts, as well.

These changes will impact:

  • commenters
  • moderators
  • admins
  • developers

What changes to the GraphQL/Database Schema does this PR introduce?

none

Does this PR introduce any new environment variables or feature flags?

no

If any indexes were added, were they added to INDEXES.md?

n/a

How do I test this PR?

You can go to /commentEmbed.html and add a comment embed. Load the page. Go into Redis (docker exec -it redis redis-cli). Check its keys (KEYS *). See that there is a key that corresponds to the comment embed you loaded (something like rmc:CoralCommentEmbed&commentID=COMMENT_ID).

Also load comment counts somewhere (you can add <span class="coral-count" data-coral-url="STORY_URL"></span> to your embed index.html` or use multi-site test). Check the keys again and see that there's a key that corresponds to the count as well.

Where any tests migrated to React Testing Library?

no

How do we deploy this PR?

@netlify
Copy link

netlify bot commented Aug 1, 2023

Deploy Preview for gallant-galileo-14878c canceled.

Name Link
🔨 Latest commit 3c2337e
🔍 Latest deploy log https://app.netlify.com/sites/gallant-galileo-14878c/deploys/64c95f388655c9000846a361

@marcushaddon
Copy link
Contributor

I'm seeing the redis entry show up when loading the comment in the stream, but not when loading commentEmbed.html with a comment embedded

@tessalt tessalt added this pull request to the merge queue Aug 18, 2023
Merged via the queue into develop with commit 9ea46c7 Aug 18, 2023
7 checks passed
@tessalt tessalt deleted the fix/CORL-2875-fix-comment-embed-redis-cache-keys branch August 18, 2023 14:48
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.

3 participants