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
Rework provider implementations to avoid environment_variables and make it so people don't have to edit #4760
Comments
I don't see any reason to deprecate the capability, but rather stop using it (update the examples to use real environment variables). There's no reason to break existing provider integrations. |
Oh. Okay, I misunderstood you. However, won't this create a functional disparity, e.g. spaces in variable names works in providers but doesn't in config.yaml, etc.? I obviously don't know the history and don't know if there are multiple bugs that have been lodged and fixed against one but not the other. We can obviously kill this or alter it. I was just trying to follow up with what had been discussed. |
Spaces should work in variable names elsewhere. I think there's a solved issue about this. But the path here would be to
|
and
as you previously suggested? |
I think that's a good idea. I was probably too aggressive last time we talked, huh. |
I'd be aggressive too if I'd had to deal with those failing docker containers for as long as you. Hahaha But sounds like a plan. Will look to initiate this. |
Can you provide more guidance on exactly what was meant by:
What should the warning message say? Here's a suggestion to start from: Also, I was experimenting with this and added a test message for this on my local in Provider.go's Init function. And for convenience's sake tried the manual test from #4594 to see the test message on the |
DDEV should provide an acquia.yaml and pantheon.yaml that work just like the platform.yaml, not requiring edits to an example file. There should be checks to make sure the relevant environment variables are set.
I think it would be better to say "Instead use DDEV environment variable settings, see https://ddev.readthedocs.io/en/stable/users/extend/customization-extendibility/#providing-custom-environment-variables-to-a-container"
Yes, I would expect that the code currently tries to evaluate the (current) environment variable setup for each bash stanza, since that's where we need them. |
Hi Randy! Sorry for disappearing. Had a downturn in my finances and am still recovering. But at least now, on a cool project at Red Hat. I haven't forgotten you. I plan to start devoting some time back on here in the next few weeks. Congratulations on the award at DrupalCon, btw! :-) I was glad to see that! |
Glad you're recovering and on a good project! Will look forward to having you back. Feel free to sign up for the contributor training at https://ddev.com/blog/contributor-training/ |
|
Is there an existing issue for this?
Is your feature request related to a problem?
Use of environment_variables in Providers overcomplicates configurations and can cause duplication of effort in fixing bugs associated with yaml parsing. Centralizing this feature to config.yaml, global_config, .env, etc, would be better. platform.yaml already works this way.
Describe your solution
To avoid problems with users currently using this feature and to prevent unexpected breaking changes, add a notification to users stating that environment_variables in Providers will be deprecated in a future release if we detect the use of environment_variables in the provider.
Describe alternatives
An alternative is to simply remove the environment_variables parsing code from provider.go along with the notification and go ahead with the breaking change without early warning to change. I feel this might not be the best way since bugs that have been fixed that were lodged against providers should be tested against platform and general config parsing/handling and apply known fixes where they may be needed prior to dropping it entirely.
Additional context
No response
The text was updated successfully, but these errors were encountered: