Skip to content

Remove user ids strategy 2 #9806

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

Open
wants to merge 3 commits into
base: remove-user-ids-strategy
Choose a base branch
from

Conversation

nunogois
Copy link
Member

Expands on the work done in #9800

Copy link

vercel bot commented Apr 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Apr 22, 2025 8:30am

Copy link
Contributor

github-actions bot commented Apr 21, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

.orderBy([
{ column: 'created_at', order: 'desc' },
{ column: 'id', order: 'desc' },
]);
Copy link
Member Author

@nunogois nunogois Apr 21, 2025

Choose a reason for hiding this comment

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

Scouting. Sometimes events are not returned in a deterministic way. E.g. if two events have the exact same created_at value, sometimes they are returned in a different order. This makes it so we still sort by created_at, but then if it's the same, we fallback to sorting by id.

Perhaps we can consider just sorting by id here and skip sorting by created_at.

db.runSql(
`
DELETE FROM strategies
WHERE name = 'userWithId' AND built_in = 1
Copy link
Member Author

@nunogois nunogois Apr 22, 2025

Choose a reason for hiding this comment

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

Unlike e.g.

and not exists (select * from feature_strategies where strategy_name = name limit 1);

Here we're deleting the strategy even if it's in use. Based on #9800 it seems like this is what we want to do. However, if it's not, this is something we probably need to change.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we don't want to delete it. The idea is:

  1. New installations will not receive it
  2. Old installations requires manual action from the user

@gastonfournier gastonfournier moved this from New to In Progress in Issues and PRs Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants