SAP / cf-html5-apps-repo-cli-plugin

Cloud Foundry CLI plugin to work with SAP Cloud HTML5 Applications Repository
Apache License 2.0
43 stars 6 forks source link

FLP still cache the older version of html5 resources #18

Closed kukugo closed 4 years ago

kukugo commented 4 years ago

Description

Sometimes when I use html5-plugin to do deplopment or update, when I through the app-router dierctly (approuter/applicationId) I can see my source-code is already updated, however if I open the flp, I can see flp is still loading an older version of html5 resources (linkToFlp/applicationIdWithTimeStamp/olderVersionResources).

Environment

micellius commented 4 years ago

Hi @kukugo , Thanks for reporting an issue.

Current implementation of FLP maintains it's own index of optimised HTML5 applications resources (using FDC service, that only FLP has access to). The only trigger to update this index is (re)deployment of FLP content. This may cause inconsistency you describe. However, this is something that is "by design" from FLP point of view, since they don't want to get into situation, when there are incompatible changes of HTML5 applications (especially shared by business services) that may potentially break existing sites.

So, unfortunately, this is a desired behaviour, and you need to redeploy FLP content every time you redeploy HTML5 applications to see the changes in the FLP site.

cosmo83 commented 4 years ago

This question saved my time.. I was going crazy why the flp app was not being updated.

Can you suggest me, how do i redploy FLP content. Should i redeploy the mtar completely ? If i have to redeploy all my apps, it makes no sense because everything is being updated and restaged for one small change in one of my ui5 apps.

I already have updated the UI5 app using cf html5-push . But not able to see the changes

micellius commented 4 years ago

Hi @cosmo83 ,

HTML5 Apps Repo service team is currently working on notifications mechanism for FLP to trigger update of the index without re-deployment of FLP content. However, it will take a time for this feature to reach the production landscapes. So far re-deployment of FLP module is the only way to update apps in FLP. You can try to re-deploy only FLP module from previously built MTAR (assuming you have not touched manifest.json files in your UI modules)

cf deploy -m <name_of_flp_deployer_module>

which should trigger update of FLP index. Deployment of such MTAR will be faster than full-blown MTAR with back-end applications.

cosmo83 commented 4 years ago

@micellius , Iam trying to get this running but failing really bad . https://pastebin.com/shMxDF7a is my mta file.

Iam trying to use your mention command

I tried both (Really could not understand what you mean by flp_deployer) cf deploy -m kavskagxportal_ui_deployer and cf deploy -m Launchpad

and both of them.. are getting strange issues when i do that .. I have raisen a ticket with SAP, which primarily looks like the problem with Fiori Launchpad systems.. They havent been responding

When i deploy a Fiori Launchpad with above mta.yaml file, when i check my apps status. This is what i get ..

image

But the flp is working as intended.

The problem is when i redeploy,or start the application like you have asked me, they crash

image

It will be really helpful if you can help

nageshcaparthy commented 4 years ago

@micellius any help on this above issue? @cosmo83 can you please open a new issue??? this ticket is closed on GitHub...

@micellius I would like to connect internally to discuss this issue, can you please contact me @ nagesh caparthy...

micellius commented 4 years ago

I tried both (Really could not understand what you mean by flp_deployer) cf deploy -m kavskagxportal_ui_deployer and cf deploy -m Launchpad

@cosmo83 , by FLP (Fiori Launchpad) deployer I meant Launchpad module from your MTA (the one with type: com.sap.portal.content). The first screenshot with applications and their states reflects correct picture - UI deployer and Launchpad are stopped after they finish uploading the content. The second screenshot of deploying MTAR with UI deployer shows the error of missing resources folder. I assume this may happen if build of MTA project was not successful, but the module was deployed.

Here is a link to documentation of updating the Launchpad. Also colleagues from FLP told me that restart of FLP content deployer application (Launchpad in your case) should be enough to trigger re-indexing of HTML5 resources.

Unfortunately, I'm not an expert nether in MTA nor in FLP, and the only thing I can help with in this context is deployment of HTML5 applications to CF HTML5 Applications Repository using CF CLI plugin (which, as you stated, passed successfully). I would propose to continue with the ticket you opened for Fiori Launchpad. Sorry for inconvenience.