YAML custom tags !reset
and !override
are parsed and substituted by Dockge instead of compose
#448
Labels
bug
Something isn't working
🛡️ Security Policy
Description
The custom YAML tags
!reset
and!override
are wrongly parsed and replaced with their parsed value editing the YAML file, and furthermore this happens beforecompose
reads them, leading at best to differentcompose config
with respect to the meant stack definition or at worst to entirely invalidcompose config
s.These tags are useful to overwrite extended services' attributes from other stacks, and this bug not only prevents their use but also have the user to revert the wrongly parsed value(s) and perform
compose up
manually from outside Dockge every time, being Dockge unsafe to use on the stacks that use these tags.👟 Reproduction steps
!reset
or!override
tag in a stack, as shown in the compose documentation👀 Expected behavior
The custom YAML tags are left as they are written in the plain YAML file, like
so that
compose
can correctly interpret them. This syntax is valid and should not cause any error.😓 Actual Behavior
The tagget YAML values are actually parsed and substituted with the parsed value, and this happens before Compose has the chance to interpret them, leading to incorrect
compose config
result. This can be seen from the errors generated when deploying a stack containing for exampleports: !reset null
, which leads to the errorbecause the
ports
attribute has been rendered asports: "null"
, while the same results in acompose config
that has noports:
attribute.Dockge Version
1.4.2
💻 Operating System and Arch
Ubuntu 22
🌐 Browser
Safari macOS
🐋 Docker Version
Docker Engine - Community v25.0.4
🟩 NodeJS Version
No response
📝 Relevant log output
The text was updated successfully, but these errors were encountered: