cancel
Showing results for 
Search instead for 
Did you mean: 

Error in deploying MTA project

KuroKen
Discoverer
0 Kudos
160

Hi,

I am following the tutorial below to learn about integrating CAP with S/4:

Deploy and Run the Incident Management Application in the SAP BTP, Cloud Foundry Runtime with SAP S/...

The tutorial includes instructions for editing the mta.yaml file. However, since the mta.yaml file did not exist, I created it using the command "cds add mta" and then edited it as per the instructions.

The build completed successfully, but the following error occurred during deployment:

Error resolving merged descriptor properties and parameters: Module/Resource "incident-management-destination" does not contain a required dependency for "srv-api", but contains references to its properties

The potentially relevant part of the mta.yaml file is as follows:

 

_schema-version: 3.3.0
ID: incident-management
modules:
  - name: incident-management-srv
    type: nodejs
    path: gen/srv
    parameters:
      buildpack: nodejs_buildpack
      readiness-health-check-type: http
      readiness-health-check-http-endpoint: /health
    build-parameters:
      builder: npm
    provides:
      - name: srv-api # required by consumers of CAP services (e.g. approuter)
        properties:
          srv-url: ${default-url}
    requires:
      - name: incident-management-auth
      - name: incident-management-destination
      - name: incident-management-db

  - name: incident-management
    type: approuter.nodejs
    path: app/router
    parameters:
      keep-existing-routes: true
      disk-quota: 256M
      memory: 256M
    requires:
      - name: srv-api
        group: destinations
        properties:
          name: srv-api # must be used in xs-app.json as well
          url: ~{srv-url}
          forwardAuthToken: true
      - name: incident-management-auth
      - name: incident-management-destination
      - name: incident-management-html5-runtime
    provides:
      - name: app-api
        properties:
          app-protocol: ${protocol}
          app-uri: ${default-uri}

resources:
  - name: incident-management-destination
    type: org.cloudfoundry.managed-service
    parameters:
      service: destination
      service-plan: lite
      config:
        HTML5Runtime_enabled: true
        init_data:
          instance:
            existing_destinations_policy: update
            destinations:
              - Name: incident-management-srv-api
                URL: ~{srv-api/srv-url}
                Authentication: NoAuthentication
                Type: HTTP
                ProxyType: Internet
                HTML5.ForwardAuthToken: true
                HTML5.DynamicDestination: true

 

Could you please help me resolve this error?

View Entire Topic
MioYasutake
Active Contributor
0 Kudos

@KuroKen 

Add the following line at the end of the destination resource.

  requires:
  - name: srv-api

Example: https://github.com/miyasuta/incident-management-2411/blob/15996a497c761cb8d1e06e69df5023455cdc3d99/m...

 

KuroKen
Discoverer
@MioYasutake Thank you for your prompt solution. The error has been resolved.