score-spec / score-go

Reference library for parsing and loading Score files
Apache License 2.0
26 stars 6 forks source link

[bug] interface conversion of metadata error sometimes occurs when running score-compose against existing state #38

Closed astromechza closed 6 months ago

astromechza commented 6 months ago

This generally occurred when running multiple score files, along with resources that use the metadata annotations state.

Error: failed to provision: resource 'amqp.default#rabbitmq': 
    failed to provision: 
        init template failed: 
            failed to execute template: template: :6:16: executing "" at <dig "annotations" "compose.score.dev/publish-port" "0" .Metadata>: 
                error calling dig: interface conversion: interface {} is types.ResourceMetadata, not map[string]interface {}

A similar issue has been found and fixed in score-k8s in https://github.com/score-spec/score-k8s/commit/283b80f31d241467dd5e3e2d0709e3d8febdca8a#diff-bcf8c86f9240e3ab822aa3a642e8bcbdca9bf042dba3d5e0ce4a25048386cb5cL25

astromechza commented 6 months ago

Fixed in #39