Resource is lost when Deploying

I has 1 application with 4 modules, 2 is containing Database, 1 is for Logic and 1 is the main module.

the resource I put is on the logic module. and the use of this resource is by editing the text inside and will be use on main module

everytime I deploy from 1 environment to other the resource will disappeared in the target environment

on the resource properties I put do nothing for the Deploy Action cause deployment before last 2 months it is still working

can help me with the root cause? is it because this Deploy Action must be set to Deploy to Target Directory even if it is already exists on the target environment or everytime I deploy the resource on the target will be deleted?

Solution

Hi Kevin,

Yes, you need to set Deploy to Target Directory.

When you publish your module, then a new directory is created on the server with the new version of your module and thus the resource. If you don't deploy the resource, it will not be in the new directory.

Regards,
Lennart

Solution

Which type of file you are having in resource and what is the size of file? i.e. xls,pdf,kml 

Salman Ansari wrote:

Which type of file you are having in resource and what is the size of file? i.e. xls,pdf,kml 

it is html file type


Lennart Kraak wrote:

Hi Kevin,

Yes, you need to set Deploy to Target Directory.

When you publish your module, then a new directory is created on the server with the new version of your module and thus the resource. If you don't deploy the resource, it will not be in the new directory.

Regards,
Lennart

when I try to deploy with the Do Nothing Action, the resource will not be found and the error message will pop up but if I dont change anything and just deploy it again the error will not show up again.

that's why I want to ask what is the root cause


kevin wijaya wrote:

Salman Ansari wrote:

Which type of file you are having in resource and what is the size of file? i.e. xls,pdf,kml 

it is html file type



Looks like you already got the solution.

Salman Ansari wrote:

kevin wijaya wrote:

Salman Ansari wrote:

Which type of file you are having in resource and what is the size of file? i.e. xls,pdf,kml 

it is html file type



Looks like you already got the solution.

yeah if I do like this it still work but if I dont change anything and still Do nothing action and just deploy it for second time it is working too.


The reason for this behavior is that Outsystems allows you to do a 'live' deploy, with (almost) zero downtime for your applications.
So when you publish, your module IAPortal_BL is being uploaded to the server and put in a new directory with a version postfix (IAPortal_NL.123). The current version on the server is then still being used. Only when you republish the consumer module, it will reference the new version of module IAPortal_BL in the new directory. Until then it'll use the old one, in which it can still find the html-file. That is why you need to republish all consumers after updating a module before you see any changes.

When there are no more consumers referencing the old version, then this directory will be removed.

I also encountered this behavior with both Resources and Images (the latter is always "deployed to target directory"). After a deployment some resources and images are not deployed to the webserver even with the correct setting for the resources. A redeploy will sometimes fix this by deploying the missing files.

This issue has been shared with support that have analyzed this and forwarded the ticket to R&D because they suspect a platform bug. 

So in short, please also report this to support if you suspect a similar issue. Feel free to reference my ticket (2330253) to get things up-to-speed and get this bug on a bit higher on the to-do list :)