Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@polarathene
Copy link
Member

@polarathene polarathene commented Jan 27, 2024

Description

I don't see this as a breaking change given the logic we have for it.

  • I have brought this up a few times in the past, this PR finally contributes the suggestion to remove ONE_DIR.
  • It doesn't really serve a purpose anymore, the /var/mail-state location existing is the real detection for triggering the runtime-state consolidation feature.
  • I've updated all docs referencing it, and the first commit improves the documentation on our volumes (I can split this out into a separate PR if preferred, although the ONE_DIR changes in docs relates to centralizing the docs for our DMS state volume).

I've explained DMS Volumes several times in past issues (example), so that should be a helpful addition to reference to link users to instead 👍

Type of change

  • Improvement (non-breaking change that does improve existing functionality)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (README.md or the documentation under docs/)
  • New and existing unit tests pass locally with my changes
  • I have added information about changes made in this PR to CHANGELOG.md

@polarathene polarathene added area/scripts kind/improvement Improve an existing feature, configuration file or the documentation area/documentation labels Jan 27, 2024
@polarathene polarathene added this to the v14.0.0 milestone Jan 27, 2024
@polarathene polarathene self-assigned this Jan 27, 2024
@polarathene polarathene force-pushed the feat/remove-env-one-dir branch from 34f222d to c146b76 Compare January 27, 2024 03:32
@polarathene polarathene force-pushed the feat/remove-env-one-dir branch from c146b76 to d14db98 Compare January 27, 2024 03:37
Only `ONE_DIR=0` has any effect. As the actual feature is now dependent upon the `/var/mail-state` location existing.

It is advised not mounting anything there instead if wanting to avoid runtime state consolidation.
This is more search friendly / organized to find references to all DMS volumes.
@polarathene polarathene force-pushed the feat/remove-env-one-dir branch from d14db98 to 3eba74d Compare January 27, 2024 03:52
@polarathene
Copy link
Member Author

Just some thoughts on the lint failure as I didn't expect this (feel free to ignore this comment):

  • It's only because I modified the last line in VSCode, while other files saved didn't adjust it.
  • This contributes to a prior confusion about "final newline" being a line-ending only, but in VSCodes case the default is probably where I got the idea that it required a full blank line 😓

image

# 0 for missing final newline, 1 for present:
$ tail -c 1 docs/content/config/environment.md | wc -l
0

We already have that prevented by a recent PR for user config parsing (where the last report was related to VSCode defaults), and the ECLint check config catches it here in PRs.


Perhaps a git pre-commit hook could better prevent it (I haven't checked if that's implicit, or requires the contributor to use an editor plugin like for .editorconfig), there doesn't seem to be an equivalent .gitattributes feature like we do for preventing CRLF line-endings.

image

I'm wondering if there's any value in highlighting that default setting for VSCode in our docs (with required configuration change) 🤔

VSCode otherwise expects a blank line (a separate setting enabled by default optionally also renders it as a separate blank line visually):

image

VSCode by default excludes this if the last line rendered is removed (rendered as a separate blank line).

A separate setting can enforce adding the final newline upon save regardless.
@georglauterbach
Copy link
Member

georglauterbach commented Jan 27, 2024

I have Insert Final Newline set to true, but I didn't know about Render Final Newline (which is set to dimmed for me by default). IMO

"files.trimTrailingWhitespace": true

is useful as well.

Copy link
Member

@georglauterbach georglauterbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the first commit in particular; it always bothered me how we only document the volumes in the FAQ 👍🏼

@polarathene
Copy link
Member Author

I'll leave this a little bit longer for @casperklein to possibly chime in since I recall ONE_DIR discussions with him in the past too.

@casperklein
Copy link
Member

Short and sweet:

  • Let's remove ONE_DIR 👍
  • I haven't enough time to think this completely through. If there are no drawbacks for people, currently still using ONE_DIR, then it's fine to merge. Otherwise I would wait for the next major release.

I am also using this in VSCode:

    "files.trimTrailingWhitespace": true,
    "files.insertFinalNewline": true,

@georglauterbach
Copy link
Member

If there are no drawbacks for people, currently still using ONE_DIR, then it's fine to merge. Otherwise I would wait for the next major release.

I can't think of any issues this PR introduces in this regard; it would be a problem if someone mounted a volume to the paths we specify in our docs but then sets ONE_DIR=0, which makes no sense really. IMO this is fine to go into v14.0.0, but I'll leave it up to you :)

@github-actions
Copy link
Contributor

Documentation preview for this PR is ready! 🎉

Built with commit: 41359fe

@polarathene polarathene merged commit 3b11a83 into docker-mailserver:master Jan 28, 2024
AlMaVizca added a commit to AlMaVizca/docker-mailserver-helm that referenced this pull request Jun 19, 2024
AlMaVizca added a commit to AlMaVizca/docker-mailserver-helm that referenced this pull request Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/documentation area/scripts kind/improvement Improve an existing feature, configuration file or the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants