ZengineHQ / mayan

Next-generation maya written in NodeJS
3 stars 9 forks source link

Backend service deployment issues when using mayan to deploy wigeon-plugins #36

Closed jscarton closed 5 years ago

jscarton commented 5 years ago

This has came out when checking why a stage-branch-based custom version of the SP plugin was having issues with the generation of the user consent report on a stage workspace while investigating and incident reported by a customer using the production version of the SP plugin. On the production side there was a bug on that process, on the custom plugin there was a deployment issue caused for little differences between Maya and Mayan.

This generation process uses the proxy backend service to make an Ajax request to wigeon.

The returned error when trying to use the backend service was:

{
    "status": 500,
    "error": "System error processing plugin service"
}

when looking into the published code of the backend service to track the issue I noticed that there was a config.json file with the right settings but into the plugin's code it was referenced as config-local.json

double checked with the old Maya and confirmed that was the regular behavior when copying config files (set the name to config-local.json during deployments)

 echo dist/config-local.json config-local.json | xargs -n 1 cp config-$MAYA_ENV.json

When tried to make a publish using Maya the new reports backend service (added to support progress reports feature) failed to build. As any new plugin, Mayan deployed and published this new backend service without any issue.

Investigated why this issue hasn't came out on production releases and found that David is still using Maya and not Mayan for that task.

the proxy backend service was originally used only by Review Portal plugin. When created the user consent report for GDPR compliance it was used to allow all plugins (SP,AF,WF,RP) to query Wigeon to generate that report. For this reason this backend service was added to all plugins.

This is not a big issue since we still have Maya. But if we plan to keep mayan evolving and use it with wigeon-plugins we need to address those small differences at some point.

tehpsalmist commented 5 years ago

@jscarton is this the line you're talking about? https://github.com/ZengineHQ/mayan/blob/18bd9231fddb0b9250f02cc4f2e50dc1570c507f/lib/backend/tasks/buildService.js#L30

tehpsalmist commented 5 years ago

@wdmny Maybe you can weigh in and help us sort this out.

jscarton commented 5 years ago

@tehpsalmist, this was already fixed on the wigeon-plugins side.

@wdmny updated the proxy backend service plugin to follow the "mayan" way so starting from the next release only mayan can be used to deploy wigeon-plugins

the link to that pull request was: https://github.com/Wizehive/wigeon-plugins/pull/496