-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add immediate project removal to fix auto-tests #177
Conversation
@wonder-sk Would this allow users to delete a project and recreate it instantly? We have found the waiting period for the WP name to open up in the workspace to be a significant restraint on how we want to operate. |
@Hackster93 indeed, you can use delete_project_now() API call for that (the normal delete_project() API call will still do the scheduled delete. The scheduled deletes were introduced some time ago to protect clients from getting confused when a project is deleted and replaced with a different project with the same name. This confuses the clients (such as the mobile app) because the version numbers are suddenly different. We will be addressing this by using project ID in clients, so they will be able to detect if a project got replaced, or if it got renamed. But until then, it is potentially dangerous to use the immediate delete as clients are not ready for it yet - at this point, it is mainly for our automatic tests... |
@wonder-sk This is great, thanks for the feedback. I will look into this more 😄 |
@wonder-sk When are you planning on updating the python client library? I cannot use the delete_project_now(): Would it be possible for me to manually use the code from the repo? Additionally, following your description in your response above, would this mean that if a user has a WP downloaded locally on their phone in MM, and we deleted and recreated the project with the same name, that the user would not be able to sync, but instead they would need to delete and redownload? |
Yeah the latest changes are not released yet. There will be a release sometime soon, maybe next week. You can also manually use the code from this repo (rather than installing through pip).
After delete+recreate of a project, users actually still can sync, but the result is pretty much undefined - therefore users should be told to delete and re-download the project - and unfortunately right now the mobile app nor plugin cannot detect that (and we're working on detecting this automatically in clients, and then guiding users what to do) |
@wonder-sk Great, thanks for the update. I think we will investigate this at some point as we want to build it into our sync_daemon. Happy to provide feedback once we have tested (not sure when this will be) 😄 |
Newer server versions started to use scheduled delete, which broke the tests, because it was not possible to re-create the same projects earlier than in a couple of days.