Closed naciriii closed 3 months ago
@bakerkretzmar ping
Going to reach out to Forge support, if deleting the site via their API works correctly this shouldn't be necessary.
Going to reach out to Forge support, if deleting the site via their API works correctly this shouldn't be necessary.
Indeed it works when i tested with direct api call, i assume that the delete process runs during the request and it happens that as soon as the request times out/closes (maybe due to github actions or axios default config) the delete process in forge is not fully done
This should be fixed by 392dba4ff4e1dc8019011b5724b8f55368ef120f (available in v2.5.0). The underlying issue with Forge is still present and the Forge team is still investigating. It's not the request timing out, it's making the deletion request before the scheduler has been fully uninstalled.
closes #35
Summary
Currently when deleting preview on pr close, sometimes the site is not fully deleted and on forge level it's no longer showing up under server sites, but on top nav it's still showing up and not fully deleted, which if pr is closed and reopened again will throws site already error and it won't be possible to preview deployments again.
I haven't properly tested same behavior with database, It may be possible that is reproduced
In order to ensure site is fully deleted I Added a condition that refetch the site until it throws 404 where the error is caught and the status is set to null, otherwise the site status is on removing so it'll just wait until it's fully removed.
Steps to reproduce the issue