fix: trim comments that are not modifers #371

Merged
decentral1se merged 2 commits from trim-env-var-comments into main 2023-10-09 12:44:18 +00:00
Owner

See coop-cloud/organising#505. @cas i was thinking of just removing it altogether? As long as it isn't # length=... (or any future modifiers, which the code can adapt to). Does that seem OK?

See https://git.coopcloud.tech/coop-cloud/organising/issues/505. @cas i was thinking of just removing it altogether? As long as it isn't `# length=...` (or any future modifiers, which the code can adapt to). Does that seem OK?
decentral1se added 1 commit 2023-10-08 20:44:50 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
be693e9df0
fix: trim comments that are not modifers
See coop-cloud/organising#505
Owner

As long as the modifiers don't get into the values coming from the app config (.env) I'm good with them being non-stripped. I should've specified that this has been biting from the app config although I'm sure it has bitten from the compose.yml also.

As long as the modifiers don't get into the values coming from the app config (.env) I'm good with them being non-stripped. I should've specified that this has been biting from the app config although I'm sure it has bitten from the compose.yml also.
Author
Owner

Oh yeh, indeed, endless footguns on this one 😆 Will try to cover those edge cases.

Gonna close off coop-cloud/organising#496 with tihs as well.

Thanks for the heads up @cas!

Oh yeh, indeed, endless footguns on this one 😆 Will try to cover those edge cases. Gonna close off https://git.coopcloud.tech/coop-cloud/organising/issues/496 with tihs as well. Thanks for the heads up @cas!
decentral1se added 1 commit 2023-10-09 12:37:44 +00:00
continuous-integration/drone/pr Build is failing Details
continuous-integration/drone/push Build is failing Details
7ad2e347ae
fix: fix: trim comments that are not modifers
See coop-cloud/organising#505
Author
Owner

OK, this turned into a bit of a whack-a-mole but it seems like the simplest code change is just strip all comments when reading in the environment. Then, when we need comments, e.g. secret length modifiers, we re-read and don't strip. This is an easier mental model to follow in the code. Otherwise, I feel like comments will kinda just be popping up in unwanted places like in coop-cloud/organising#496.

OK, this turned into a bit of a whack-a-mole but it seems like the simplest code change is just strip all comments when reading in the environment. Then, when we need comments, e.g. secret length modifiers, we re-read and don't strip. This is an easier mental model to follow in the code. Otherwise, I feel like comments will kinda just be popping up in unwanted places like in https://git.coopcloud.tech/coop-cloud/organising/issues/496.
decentral1se force-pushed trim-env-var-comments from 7ad2e347ae to c249c6ae9c 2023-10-09 12:42:17 +00:00 Compare
decentral1se merged commit c249c6ae9c into main 2023-10-09 12:44:18 +00:00
decentral1se deleted branch trim-env-var-comments 2023-10-09 12:44:18 +00:00
Sign in to join this conversation.
No description provided.