Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

instrument config.yaml #13

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

instrument config.yaml #13

wants to merge 3 commits into from

Conversation

torenware
Copy link
Owner

Test what's in the config.yaml file

@rfay
Copy link
Contributor

rfay commented Feb 3, 2023

Just a note that ddev debug configyaml may be more effective, since it doesn't just focus on the config.yaml, but gives the entire content of the parsed config.*.yaml.

@torenware
Copy link
Owner Author

Good to know, although my use case is a little unusual: I just fixed some issues with my tests that broke about a week ago. The problem tests modified config.yaml to set up for a particular test.

It used to be possible to append key/value pairs to config.yaml and if the key was already present, the last instance of the key in config.yaml would win out. About a week ago, the parsing of config.yaml appears to have changed, and duplicate keys became a syntax error in the file. This broke my tests.

I was printing out config.yaml to confirm that this was case, since I am operating on the actual file.

My real goal is to figure out what changed in the parser. Anything you can think of? The tests I've removed wanted to set config.yaml to a known state. I used to:

  • Set the http and https ports to non-standard settings. This was to attempt to run tests locally on my Mac. Since I could not get this to work, these changes to config.yaml are now unnecessary, and I can remove these from the tests.
  • Set the project type to "laravel", on the assumption that some down stream code will care what the value is. While nothing appears to have broken in the test, I've found that the file contains "type: php", instead of "type: laravel", which is what I wanted to test.

I'm looking into putting together a bit of sed code to do a modification of config.yaml that will work with the new parsing behavior.

@rfay
Copy link
Contributor

rfay commented Feb 4, 2023

You'd probably be better using yq to edit the config.yaml

@torenware
Copy link
Owner Author

You'd probably be better using yq to edit the config.yaml

Probably true. I'll give that a try to see if it does the necessary. I'd guess yq will be easier to use than sed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants