Skip to content

CALM Validate Crash #1210

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

Closed
aidanm3341 opened this issue Apr 25, 2025 · 0 comments
Closed

CALM Validate Crash #1210

aidanm3341 opened this issue Apr 25, 2025 · 0 comments
Assignees
Labels
bug Something isn't working cli
Milestone

Comments

@aidanm3341
Copy link
Member

aidanm3341 commented Apr 25, 2025

Bug Report

The CALM CLI Validate command crashes when using this minimal pattern (yes it's a horrendously invalid pattern, but we should be getting actual feedback on how its invalid):

{
    "properties": {
        "nodes": {
            "prefixItems": [{}]
        },
        "relationships": {
            "prefixItems": [
                {
                    "properties": {
                        "relationship-type": {
                            "const": {
                                "connects": {
                                    "destination": {
                                        "node": "abc",
                                        "interfaces": []
                                    }
                                }
                            }
                        }
                    }
                }
            ]
        }
    }
}

Steps to Reproduce:

  1. create a pattern.json file with the above contents
  2. run calm validate -p pattern.json

Expected Result:

The output should be a json object which includes jsonschema and spectral errors.

Actual Result:

The CLI crashes with the following error:
Image

Environment:

CLI v0.7.2 was used here, however this was observed in versions as far back as 0.4.0

@aidanm3341 aidanm3341 self-assigned this Apr 25, 2025
@aidanm3341 aidanm3341 added bug Something isn't working cli labels Apr 25, 2025
@aidanm3341 aidanm3341 added this to the 1.0 milestone Apr 25, 2025
aidanm3341 added a commit to aidanm3341/architecture-as-code that referenced this issue Apr 25, 2025
aidanm3341 added a commit to aidanm3341/architecture-as-code that referenced this issue Apr 28, 2025
aidanm3341 added a commit that referenced this issue Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli
Projects
None yet
Development

No branches or pull requests

1 participant