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

Merged
merged 8 commits into from
Jun 3, 2025

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) Visit Preview Jun 3, 2025 11:17am

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
@gastonfournier gastonfournier force-pushed the remove-user-ids-strategy-2 branch from 5e0e519 to a8285c1 Compare June 3, 2025 11:16
@gastonfournier gastonfournier changed the base branch from remove-user-ids-strategy to main June 3, 2025 11:20
@gastonfournier gastonfournier changed the base branch from main to remove-user-ids-strategy June 3, 2025 11:23
@gastonfournier gastonfournier merged commit 56c95a8 into remove-user-ids-strategy Jun 3, 2025
2 checks passed
@gastonfournier gastonfournier deleted the remove-user-ids-strategy-2 branch June 3, 2025 11:28
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants