Skip to content

Conversation

@hjaraujof
Copy link
Contributor

Changes/solution

  • Replace cuid generation with CG native generateUniqueId helper, to reduce entropy while generating ids

@tyler-dunkel
Copy link
Contributor

For snapshot diff, do we ignore ids with the latest changes or is this change still necessary to avoid that "noise"?

@hjaraujof hjaraujof force-pushed the fix/generate-unique-ids-using-data branch from 9480845 to 823a0ef Compare November 14, 2022 19:38
@hjaraujof
Copy link
Contributor Author

hjaraujof commented Nov 14, 2022

@tyler-dunkel > For snapshot diff, do we ignore ids with the latest changes or is this change still necessary to avoid that "noise"?

Yes, this will significantly reduce entropy and make most id "noise" disappear.

@tyler-dunkel
Copy link
Contributor

@tyler-dunkel > For snapshot diff, do we ignore ids with the latest changes or is this change still necessary to avoid that "noise"?

Yes, this will significantly reduce entropy and make most id "noise" disappear.

yea but arent we already "ignoring" ids with the noise changes we made app side?

@hjaraujof
Copy link
Contributor Author

@tyler-dunkel > For snapshot diff, do we ignore ids with the latest changes or is this change still necessary to avoid that "noise"?
Yes, this will significantly reduce entropy and make most id "noise" disappear.

yea but arent we already "ignoring" ids with the noise changes we made app side?

No, we don't ignore ids because they play an important role when recognizing created/deleted data

@tyler-dunkel
Copy link
Contributor

@tyler-dunkel > For snapshot diff, do we ignore ids with the latest changes or is this change still necessary to avoid that "noise"?
Yes, this will significantly reduce entropy and make most id "noise" disappear.

yea but arent we already "ignoring" ids with the noise changes we made app side?

No, we don't ignore ids because they play an important role when recognizing created/deleted data

not ids from the provider, ids that are generated. i.e. ids from nested objs

@hjaraujof
Copy link
Contributor Author

@tyler-dunkel > For snapshot diff, do we ignore ids with the latest changes or is this change still necessary to avoid that "noise"?
Yes, this will significantly reduce entropy and make most id "noise" disappear.

yea but arent we already "ignoring" ids with the noise changes we made app side?

No, we don't ignore ids because they play an important role when recognizing created/deleted data

not ids from the provider, ids that are generated. i.e. ids from nested objs

Yeah, you are right. We do ignore them for nested objects. I used this chance to remove the cuid package dependency since we already have a util method in the SDK.

@hjaraujof hjaraujof merged commit 0537eb2 into alpha Nov 21, 2022
@hjaraujof hjaraujof deleted the fix/generate-unique-ids-using-data branch November 21, 2022 16:55
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