-
Notifications
You must be signed in to change notification settings - Fork 153
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
Update list application query for migration task #3788
Conversation
@khanhtc1202 Reuse this pattern to avoid adding a new index. Btw, using created_at is more stable than updated_at. |
Ah nice point 👍 Thanks for the comment, but I still think we need to create Let's me change the query and update index for that |
Why don't we use that index with the same query for this migration task? |
@nghialv Due to this comment #3767 (comment) The deleted application should be migrated as well (to ensure the database manually changes delete status doesn't cause issues later), that's the current implementation, but happy to hear your thought. |
I feel that supporting the deleted entries is overdoing. The deleted ones are immutable and should not be queried anymore. |
IMO, There are cases where we need to import logically deleted data, such as when we want to analyze data, and I felt that we should avoid panic in such cases. |
Btw, there are a lot number of deleted applications and it is increasing over time, so if this policy is applied, all migration tasks from new will take a lot of time to do. |
since there is no validation for PlatformProvider field in Application model, we can expect that there is no panic if some deleted App model be unmarshaled for now. But we may avoid that by backup datastore and remove (hard delete) deleted Application if need. wdyt? |
I think that looks fine. 👍 |
I updated the query to use the existed index, ptal 🙏 |
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?: