mirror of
https://github.com/moghtech/komodo.git
synced 2026-05-08 21:28:16 -05:00
Comments are deleted in Stacks Environments #44
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @FibreTTP on GitHub (Sep 8, 2024).
When saving a Stacks Environment configuration, any lines beginning with
#are deleted. Empty lines are additionally deleted:to just
As far as I know, lines beginning with
#are ignored by Docker, so there's no reason to be deleting them. This doesn't happen in the Compose file section.@mbecker20 commented on GitHub (Sep 9, 2024):
This is not the reason, Env variables are internally not stored in file form but rather converted to array form:
Array<{ variable: string, value: string }>.This form allows for better diffing when using resource syncs. Ie the diff can show just one variables value has changed.
The
config.environmentdefined in resource syncs do support full line comments using either # or //@FibreTTP commented on GitHub (Sep 9, 2024):
It's a bit misleading given that there's an option for the filename directly below.
Not everyone has the need to use Resource Syncs. I suggest changing this to store the field as entered, and IF a Sync updates the variables, parse for the variables and remove the comments at that time. This wouldn't affect functionality for anyone, you can still perform the diff.
@mbecker20 commented on GitHub (Sep 9, 2024):
I considered this, however the code complexity would be high. Of course like most feedback I do see the value here and would like to deliver. But it has to be clean and not increase complexity too much or risk more bugs.
@mbecker20 commented on GitHub (Sep 26, 2024):
I figured this out, next release will keep your Env file with comments intact
@Twilek-de commented on GitHub (Apr 28, 2025):
I am still seeing that comments are deleted when saving the .enf file. @mbecker20 I do not understand the confing.environment sync post here. What do I have to set up to have comments remain intact in the .env file? You might consider by the way to include your own comment in the generated .env file like "Generated by Komodo"
@mbecker20 commented on GitHub (Apr 29, 2025):
It saves the comments you make in the Environment section in the ui. At deploy time they are parsed and written to host, this is so multiple formats can be supported like using : instead of = . Maybe there could be an option to write it as is instead.
@Twilek-de commented on GitHub (Apr 29, 2025):
I think that would be nice. As there is often important information in the comments. If Komodo fails for some reason or someone does not want to use Komodo anymore, all this extra information would be lost for all stacks or would have to be painstakingly recovered.