Skip to content

feat(warnings): Allow silencing warnings about custom config files, for #7638 - #7660

Merged
rfay merged 3 commits into
ddev:mainfrom
rfay:20250925_rfay_silence_warnings
Sep 30, 2025
Merged

rfay merged 3 commits into
ddev:mainfrom
rfay:20250925_rfay_silence_warnings

Conversation

@rfay

@rfay rfay commented Sep 25, 2025 •

Copy link
Copy Markdown
Member

The Issue

It's good that we warn people about overridden or extra configuration. But when it's intentional and planned, it becomes just a wall of text hiding other things that might be important.

I have a ~/.ddev/traefik/static-config.loglevel.yaml so every project I start gets a wall of text.

Also addresses #7638 by showing a warning in this situation.

How This PR Solves The Issue

  • Allow #ddev-silent-no-warn to be added to extra config or overridden config, silence the ddev start wall.
  • Add a new check for files in .ddev/traefik/config that are not <project>.yaml since they're almost always a problem.

Manual Testing Instructions

  • Turn off warnings about your favorite file using #ddev-silent-no-warn
  • Check the .ddev/traefik/config warning

Automated Testing Overview

Release/Deployment Notes

@github-actions

github-actions Bot commented Sep 25, 2025 •

Copy link
Copy Markdown

@rfay
rfay force-pushed the 20250925_rfay_silence_warnings branch from a07a9ad to faddd56 Compare September 26, 2025 03:20
@rfay
rfay marked this pull request as ready for review September 26, 2025 13:50
@rfay
rfay requested review from a team as code owners September 26, 2025 13:50
@rfay
rfay requested a review from stasadev September 26, 2025 13:50
Comment thread pkg/ddevapp/config.go Outdated
Comment on lines +732 to +736
if len(unexpected) > 0 {
printable, _ := util.ArrayToReadableOutput(unexpected)
util.Warning("Unexpected files found in .ddev/traefik/config (expected only %s): %v", app.Name+".yaml", printable)
customConfig = true
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should people be able to silence this too?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in c392420

@rfay
rfay force-pushed the 20250925_rfay_silence_warnings branch from faddd56 to c392420 Compare September 29, 2025 14:19
@rfay
rfay requested a review from stasadev September 29, 2025 14:20

@stasadev stasadev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's do the same for the .ddev/.gitignore file:

$ echo '#ddev-silent-no-warn' > .ddev/.gitignore
$ ddev start
Starting l12... 
User-managed /home/stas/code/ddev/l12/.ddev/.gitignore will not be managed/overwritten by ddev
...

@rfay

rfay commented Sep 29, 2025

Copy link
Copy Markdown
Member Author

.ddev/.gitignore is so much a part of DDEV's functionality that I'm hesitant to do it, but tell me your thinking.

@stasadev stasadev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

.ddev/.gitignore is so much a part of DDEV's functionality that I'm hesitant to do it, but tell me your thinking.

Okay, I agree that this file is a bit different and no modification is expected here.

@rfay rfay changed the title feat(warnings): Allow silencing warnings about custom config files feat(warnings): Allow silencing warnings about custom config files, for #7638 Sep 30, 2025
@rfay
rfay merged commit 5033ac9 into ddev:main Sep 30, 2025
@rfay
rfay deleted the 20250925_rfay_silence_warnings branch September 30, 2025 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants