Skip to content
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

Config files used in extensions are not uploaded #147

Open
MatthiasSchmalz opened this issue Dec 9, 2021 · 2 comments
Open

Config files used in extensions are not uploaded #147

MatthiasSchmalz opened this issue Dec 9, 2021 · 2 comments

Comments

@MatthiasSchmalz
Copy link

MatthiasSchmalz commented Dec 9, 2021

Description

We have created an mta extension which makes use of the feature include external configurations. E.g. like this:
_schema-version: '3.2.0'
extends: fdc-cf-service
ID: fdc-cf-service.mTLS
modules:

  • name: service
    requires:
    • name: ui5-flexibility-design-and-configuration-xsuaa
      parameters:
      config-path: x509Binding.json

We expect that the deployer detects the used json files and uploads them and they are merged into the final mta.
However this did not work. In the console we have seen that only the extension got uploaded but not the config.json.
Also the parameters have not been in place. I have seen in the deploy log, that it got ignored.
The deploy service seems to ignore the missing referenced file silently and did not fail. In case this is a not supported feature we would have expected an error message.

Your environment

  • MultiApps CF CLI Plugin version - 2.7.0
  • which CF vendor is used - SAP BTP on AWS (EU10 Canary)

Steps to reproduce

Tell us how to reproduce this issue.
Have an MTA + an extension which uses an external config
Build the MTA
Deploy the MTA with the extension
=> The external config is not used

Additional information

If an multi-target app operation fails, download logs of the operation and provide them as a GIST(s). For more details, see download-mta-op-logs / dmol command provided by CF MTA Plugin. The most important log file is MAIN_LOG.

https://gist.github.com/MatthiasSchmalz/e68e25c71df0177efb862fbaeeaae2b5

@IvanBorislavovDimitrov
Copy link
Contributor

IvanBorislavovDimitrov commented Dec 10, 2021

Hi @MatthiasSchmalz,

The config-path is only available in the so-called development descriptor (mta.yaml) and not in the mtad.yaml (deployment descriptor). Tools like MBT build mtad.yaml from mta.yaml and transform this config-path property to a MANIFEST.MF entry located in META-INF/MANIFEST.MF.
If you want to use service-binding-parameters provided in file you have to add a MANIFEST entry.
Check: https://help.sap.com/products/BTP/65de2977205c403bbc107264b8eccf4b/c7b09b79d3bb4d348a720ba27fe9a2d5.html?locale=en-US

Name: x509Binding.json
MTA-Requires: <MODULE_NAME>/<RESOURCE_NAME>
Content-Type: application/json

In the extension descriptor in your case you can only hardcode the parameters in the descriptor under config parameter:
"ext-desc.mtaext"

resource: my-service
  parameters:
    config:
      credential-type: x509
      x509: ....

These config parameters will be merged with the parameters specified in the mtad.yaml or the service-binding-parameters file.
Best regards,
Ivan

@papersaltserver
Copy link

Try to use path instead of config-path.

name: service
requires:
  name: ui5-flexibility-design-and-configuration-xsuaa
  parameters:
    path:` x509Binding.json

Deployment descriptor for XS Advanced uses config-path https://help.sap.com/viewer/4505d0bdaf4948449b7f7379d24d0f0d/2.0.06/en-US/33548a721e6548688605049792d55295.html, but deployment descriptor for BTP uses just path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants