Skip to content
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

Merged
merged 5 commits into from
Oct 4, 2023

Conversation

wonder-sk
Copy link
Contributor

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.

@wonder-sk wonder-sk merged commit c90d284 into master Oct 4, 2023
4 checks passed
@Hackster93
Copy link

@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.

@wonder-sk
Copy link
Contributor Author

@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...

@Hackster93
Copy link

@wonder-sk This is great, thanks for the feedback. I will look into this more 😄
@HugoP27 this would allow us to automate our yaml file based on active WPs which in turn should reduce our sync daemon cycle 💪

@Hackster93
Copy link

@wonder-sk When are you planning on updating the python client library? I cannot use the delete_project_now(): AttributeError: 'MerginClient' object has no attribute 'delete_project_now'. I assume this is because you need to update the library first on your side?

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?

@chris9404

@wonder-sk
Copy link
Contributor Author

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).

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?

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)

@Hackster93
Copy link

@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) 😄

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