-
Notifications
You must be signed in to change notification settings - Fork 7
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
Teardown conflict with task scheduler #106
Comments
I've had this same problem. I haven't yet dug as deeply as @vintagesucks has into it. I have had to login to the server a few times and delete sites manually to clear up space. Sometimes in the file system directly, as they were already removed from the Sites dashboard. Maybe related, I've also seen my GitHub account run of out deployment keys. |
I've come across this as well. A new PR Site will be spawned without issues usually, but on teardown it won't be removed completely.
I can delete this site using the forge API manually then, but this shouldn't be necessary. I can also confirm that setting Edit/Addition: I just noticed that for me this only happens in a PHP 8.3 environment. We also use Harbor for a different Project that's currently on PHP 8.2 which does not show the same issue. Here Teardown works as intended with |
I'm also experiencing this same issue. FYI @mehrancodes |
Hey @vintagesucks, thanks for your report and explanations. |
Hey @RealMrHex / @mehrancodes - is there possibly an update on this? thanks |
Hi! I noticed that my "Sites" navigation on Forge contained some sites that should have been deleted already.
In fact, the site overview for that server no longer even shows the site, indicating that something has happened:
This happens on every teardown, but only when I include
FORGE_JOB_SCHEDULER=true
in my environment.To narrow it down, I reduced the pipeline in TearDownCommand to this:
->through([ FindServer::class, FindSiteOrFail::class, RemoveTaskScheduler::class, DestroySite::class, ])
Only when
RemoveTaskScheduler
is included here does the above bug occur. I think Forge is silently failing to actually remove the site if the scheduled job is still being removed. If I add something likesleep(10)
beforeDestroySite
, everything is deleted as expected:I am not sure if this is a bug in the Forge API/SDK or if Harbor is somehow supposed to wait for the job to actually be deleted, but this is currently resulting in many orphaned sites on my Forge server.
Complete environment from my local test:
Command I can use to reproduce the problem locally:
php ./harbor provision && php ./harbor teardown
This will return
Environment teardown successful! All provisioned resources have been removed.
and the site is partially removed from some parts of Forge, but remains in the site navigation and, more importantly, on the actual server.The text was updated successfully, but these errors were encountered: