capactio / capact

Simple way to manage applications and infrastructure.
https://capact.io
Apache License 2.0
80 stars 19 forks source link

When using `capact-when`, TypeInstance names cannot contain dashes #571

Closed pkosiec closed 2 years ago

pkosiec commented 2 years ago

Description

When a TypeInstance had a dash in its name, Engine rendering failed on capact-when:

capact-when: s3-object-storage == nil

I believe it also didn't work when I provided it with quotes (capact-when: "s3-object-storage" == nil)

When I renamed the TypeInstance to s3storage, rendering succeeded.

Expected behavior

Engine rendering succeeds.

Actual behavior

message: 'Cannot render given action: while rendering Action: while evaluating
      OCFWhen: while evaluating expression: Value ''<nil>'' cannot be used with the
      modifier ''-'', it is not a number (will retry - 10/15)'

Steps to reproduce

Rename postgresql to e.g. postgresql-db inside the manifest https://github.com/capactio/hub-manifests/blob/main/manifests/implementation/mattermost/mattermost-team-edition/install.yaml#L99 and check whether it renders properly.

AC