structurizr / cli

A command line utility for Structurizr.
https://docs.structurizr.com/cli
Apache License 2.0
492 stars 75 forks source link

Regression: validate command returning 0 (success) on error #134

Closed meacu1pa closed 1 year ago

meacu1pa commented 1 year ago

Description

Hey all :),

we validate our Structurizr workspace.dsl in CI before uploading it to the Structurizr cloud service. In the past, our CI failed when the validate command failed (as expected)

Since a few days, the Gitlab CI job succeeds, even though the validate command is throwing an error: A relationship between "SoftwareSystem://ServiceX" and "SoftwareSystem://ServiceY" already exists at line 33: serviceX -> serviceY

This results in the next CI step (the upload to Structurizr cloud) failing with exit code 1 via structurizr.sh push [...].

Not sure what caused the issue, we use the latest cli container image (structurizr/cli:latest)

Thanks for your support!

Steps to reproduce

  1. Create a duplicate relationship in workspace.dsl, see code example
  2. run structurizr.sh validate -workspace structurizr/workspace.dsl
  3. command throws a 0 (success) instead of a 1 (error)

Screenshot

image

Code sample

serviceX = softwareSystem "ServiceX"
serviceY = softwareSystem "ServiceY"
serviceX -> serviceY
serviceX -> serviceY

Configuration

No response

Severity

Minor

Priority

Medium

Resolution

I have no budget, please fix this for free

More information

No response

meacu1pa commented 1 year ago

That was quick :) thanks @simonbrowndotje !