Skip to content

Add MTA dependency graph endpoints (deployed MTA and descriptor-based) - #1933

Draft
vkalapov wants to merge 3 commits into
cloudfoundry:masterfrom
vkalapov:feature/LMCROSSITXSADEPLOY-3717-dependency-graph
Draft

vkalapov wants to merge 3 commits into
cloudfoundry:masterfrom
vkalapov:feature/LMCROSSITXSADEPLOY-3717-dependency-graph

Conversation

@vkalapov

Copy link
Copy Markdown
Contributor

Description:

Exposes the MTA module/resource dependency graph via two new REST endpoints:

  • POST /api/v1/spaces/{spaceGuid}/mtas/graph — builds a graph from a
    submitted mtad.yaml descriptor without requiring a deployed MTA.
  • GET /api/v1/spaces/{spaceGuid}/mtas/{mtaId}/graph — builds a graph from
    the live deployed MTA metadata.

What changes:

  • MtaGraph, MtaGraphNode, MtaGraphEdge models added to the API module.
    Edges carry from, to, type (requires/provides), and name (the
    dependency name).
  • MtasApiService / MtasApi extended with the two new operations.
  • MtasApiServiceImpl implements graph construction by traversing module
    requires/provides declarations.
  • MtaMetadataAnnotations gains a showcase-version annotation key; the
    metadata parser and ApplicationMetadataBuilder persist/read it so the
    live-graph endpoint can reflect descriptor-level dependency names.

Design choices:

  • Graph is computed on-the-fly from metadata; no persistence needed.
  • DOT-format rendering is left to the client (the CLI plugin pipes to
    dot -Tpng), keeping the API transport-agnostic.

Issue:

LMCROSSITXSADEPLOY-3717

Adds GET /mtas/{mtaId}/graph (live, from CF metadata annotations) and
POST /mtas/graph (descriptor-based, parses mtad.yaml). Introduces
MtaGraph/Node/Edge models. Requires mta_module_required_dependencies
annotation written by the metadata annotations commit.

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant