score-spec / score-compose

Reference implementation for docker-compose target platform support
https://docs.score.dev/docs/score-implementation/score-compose/
Apache License 2.0
446 stars 42 forks source link

fix: assert volume based on outputs and not type #122

Closed astromechza closed 5 months ago

astromechza commented 5 months ago

This PR changes the way that volumes are provisioned in score-compose. Previously volumes HAD TO be type=volume and return a source value, and were limited to just being persistent docker compose volumes.

This PR now removes the restriction on the type field and just requires that the outputs must match one of the 3 kinds of supported docker compose volume mounts: tmpfs, bind, or persistent volume - and we also support the extended attributes https://docs.docker.com/compose/compose-file/compose-file-v3/#volumes

This also modifies the way the 2-part resource-id placeholder is resolved. ${resources.foo} will not resolve to type.class#workload.foo (the resource uid).