objecthub-io / ObjectHub

ObjectHub is an open repository for software objects and a development platform.
2 stars 1 forks source link

deleted micro apps can be deployed and lead to error page -> Cannot delete deployed Micro Apps #221

Open panditthecoder opened 7 years ago

panditthecoder commented 7 years ago

steps to recreate

  1. create a micro app - do not deploy it - you can, however, preview it
  2. log out of ide, log back in
  3. load the micro app created earlier
  4. missed this part - apologies - Delete the micro app
  5. click on deploy - deployment will be successful. however, when you click on the link, you will get a error page - see https://u1.objecthub.io/panditthecoder/home/my/~*5/deploy/main/~prod/page&secret=QgfI6Bo5

if you had deployed the app in step 1, and then followed step 2 to 4, clicking on the new version will Not result in an error page

panditthecoder commented 7 years ago

This issue occurs in micro service as well.

objecthub-io commented 7 years ago

Thank you for reporting the issue.

I could confirm the error you describe and we'll work on fixing this in the next update.

objecthub-io commented 7 years ago

This is now fixed in the latest version of the IDE.

Please let us know if the error still persists!

panditthecoder commented 7 years ago

when i click on deploy after hitting the 'trash' button, it hangs at "Performing Operation:

Collected 11 objects. Now generating bundle."

and now am not able to get the 'edit', 'trash', ... icons in the 'browser' pane. have tried to log out and log back in but those icons do not show up.

objecthub-io commented 7 years ago

That is very strange! Could you try this again and open the Chrome console and see if there are any errors reported there?

Thank you!

panditthecoder commented 7 years ago

at the risk of further mucking up my profile, tried it again......

forgot to capture a stack trace from the console and so had to rede the steps. the stack trace is also added to the bug as an attachment...... delete_stack_trace.zip

objecthub-io commented 7 years ago

It might be that your browser hasn't loaded our updated Stellar DB engine.

To fix this, we have added an additional error message (the one you see now), so it doesn't deploy without an error anymore but the deployed version does not work.

However, we have also changed it so that this error does not occur in the first place. This was fixed in the Stellar DB libraries. Could you do a hard reload of the page and try again? https://superuser.com/questions/220179/how-can-i-do-a-cache-refresh-in-google-chrome

Even if the error shows up, it shouldn't cause problems in your profile!

panditthecoder commented 7 years ago

Checked this again. did a fresh log in. loaded a microapp (Object_No_2 from my other bugs) so that it showed up in the edit code pane. then clicked on the 'Trash' Icon to delete the microapp. Delete went through as expected. However, the object code was yet displayed in the left pane. Clicked on the Deploy tab and it successfully deployed the MicroApp. Are we allowed to do that ? i.e. Deploy any object which has been deleted ? if so, what is the delete actually achieving ? and how do you delete the deployed objects ?

objecthub-io commented 7 years ago

Thank you!

Yes, the behaviour you describe is what we intend. Deleting an object only moves it into 'trash' (thus we name this operation trash). The object is still fully usable in trash. This is to assure that users don't accidentally break their apps. Also see bug #235. We might provide a warning if a deleted dependency is used.

I think you bring up a very good point about the deployed Micro Apps. Currently there is no easy way to delete deployed Micro Apps. We'll think about it and post here when we implemented a way to do that!