Update /users/creator_node route to include non-creator users #1291
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
What is the purpose of this PR? What is the current behavior? New behavior? Relevant links (e.g. Trello) and/or information pertaining to PR?
I found this bug because it broke SnapbackSM, which relies on this route. Specifically, all recurring syncs for non-creator users were broken. This isn't a p0 because majority of users syncs are going through manual sync flow, but still no bueno.
Discprov
GET /users/creator_node?creator_node_endpoint=<url>
route was not returning data for users that had replica sets but were not creators. Previously this intersection was impossible as we only assigned replica sets after flipping is_creator flag, but recently we changed this in order to assign replica sets to all users on signup to ensure replication of content for all non-creator users.This bugfix simply replaces the
is_creator
check in this route with acreator_node_endpoint IS NOT NULL
check.There are similar regressions across the codebase, and separately we need to do comb through and update all references to
is_creator
.Tests
List the manual tests and repro instructions to verify that this PR works as anticipated. Include log analysis if possible.
❗ If this change impacts clients, make sure that you have tested the clients ❗
Tested this locally with bugfix, confirming that non-creator users are also returned by this endoint.
❗ Reminder 💡❗:
If this PR touches a critical flow (such as Indexing, Uploads, Gateway or the Filesystem), make sure to add the
requires-special-attention
label. Add relevant labels as necessary.