Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

feat: Topology node list of versions containing flow id, image tag and baseline flag #28

Merged
merged 6 commits into from
Sep 18, 2024

Conversation

laurentluce
Copy link
Collaborator

@laurentluce laurentluce commented Sep 17, 2024

The node list of version strings is replaced with a list of flow id, image tag and baseline flag maps. The image tag is set to null for external services.

https://www.notion.so/kurtosistech/Topology-API-and-UI-improvements-91a422b818eb478296912b6797b9e9bc

Node versions type update: kurtosis-tech/kardinal#228

/topology response example:

{
    "edges": [
        {
            "source": "cartservice",
            "target": "postgres"
        },
        {
            "source": "frontend",
            "target": "cartservice"
        },
        {
            "source": "frontend",
            "target": "free-currency-api"
        },
        {
            "source": "frontend",
            "target": "productcatalogservice"
        },
        {
            "source": "frontend-external",
            "target": "frontend"
        }
    ],
    "nodes": [
        {
            "id": "free-currency-api",
            "label": "free-currency-api",
            "type": "external",
            "versions": [
                {
                    "flow-id": "baseline",
                    "is-baseline": true
                },
                {
                    "flow-id": "dev-p5vkmn4jb8",
                    "is-baseline": false
                }
            ]
        },
        {
            "id": "frontend",
            "label": "frontend",
            "type": "service",
            "versions": [
                {
                    "flow-id": "baseline",
                    "image-tag": "kurtosistech/frontend:main",
                    "is-baseline": true
                },
                {
                    "flow-id": "dev-p5vkmn4jb8",
                    "image-tag": "kurtosistech/frontend:demo-frontend",
                    "is-baseline": false
                }
            ]
        },
        {
            "id": "cartservice",
            "label": "cartservice",
            "type": "service",
            "versions": [
                {
                    "flow-id": "baseline",
                    "image-tag": "kurtosistech/cartservice:main",
                    "is-baseline": true
                }
            ]
        },
        {
            "id": "postgres",
            "label": "postgres",
            "type": "service",
            "versions": [
                {
                    "flow-id": "baseline",
                    "image-tag": "postgres:14",
                    "is-baseline": true
                }
            ]
        },
        {
            "id": "productcatalogservice",
            "label": "productcatalogservice",
            "type": "service",
            "versions": [
                {
                    "flow-id": "baseline",
                    "image-tag": "kurtosistech/productcatalogservice:main",
                    "is-baseline": true
                }
            ]
        },
        {
            "id": "frontend-external",
            "label": "frontend-external",
            "type": "gateway",
            "versions": []
        }
    ]
}

@laurentluce laurentluce changed the title feat: Node list of versions containing flow id, image tag and baseline flag feat: Topology node list of versions containing flow id, image tag and baseline flag Sep 17, 2024
Copy link
Contributor

@skylarmb skylarmb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume some changes are required here to address my comment on the types changes: kurtosis-tech/kardinal#228 (review)

Overall response looks good except for the JSON encoding for the keys, see above comment.

@laurentluce
Copy link
Collaborator Author

I assume some changes are required here to address my comment on the types changes: kurtosis-tech/kardinal#228 (review)

Overall response looks good except for the JSON encoding for the keys, see above comment.

Updating the cli kontrol api dep was the only change required here. Here is the latest output:

{
    "edges": [
        {
            "source": "cartservice",
            "target": "postgres"
        },
        {
            "source": "frontend",
            "target": "cartservice"
        },
        {
            "source": "frontend",
            "target": "free-currency-api"
        },
        {
            "source": "frontend",
            "target": "productcatalogservice"
        },
        {
            "source": "frontend-external",
            "target": "frontend"
        }
    ],
    "nodes": [
        {
            "id": "free-currency-api",
            "label": "free-currency-api",
            "type": "external",
            "versions": [
                {
                    "flowId": "baseline",
                    "isBaseline": true
                },
                {
                    "flowId": "dev-186rognpiz",
                    "isBaseline": false
                },
                {
                    "flowId": "dev-p5vkmn4jb8",
                    "isBaseline": false
                }
            ]
        },
        {
            "id": "frontend",
            "label": "frontend",
            "type": "service",
            "versions": [
                {
                    "flowId": "baseline",
                    "imageTag": "kurtosistech/frontend:main",
                    "isBaseline": true
                },
                {
                    "flowId": "dev-186rognpiz",
                    "imageTag": "kurtosistech/frontend:demo-frontend",
                    "isBaseline": false
                },
                {
                    "flowId": "dev-p5vkmn4jb8",
                    "imageTag": "kurtosistech/frontend:demo-frontend",
                    "isBaseline": false
                }
            ]
        },
        {
            "id": "cartservice",
            "label": "cartservice",
            "type": "service",
            "versions": [
                {
                    "flowId": "baseline",
                    "imageTag": "kurtosistech/cartservice:main",
                    "isBaseline": true
                }
            ]
        },
        {
            "id": "postgres",
            "label": "postgres",
            "type": "service",
            "versions": [
                {
                    "flowId": "baseline",
                    "imageTag": "postgres:14",
                    "isBaseline": true
                }
            ]
        },
        {
            "id": "productcatalogservice",
            "label": "productcatalogservice",
            "type": "service",
            "versions": [
                {
                    "flowId": "baseline",
                    "imageTag": "kurtosistech/productcatalogservice:main",
                    "isBaseline": true
                }
            ]
        },
        {
            "id": "frontend-external",
            "label": "frontend-external",
            "type": "gateway",
            "versions": []
        }
    ]
}

@laurentluce laurentluce merged commit 923b2b6 into main Sep 18, 2024
7 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants