-
Notifications
You must be signed in to change notification settings - Fork 394
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
DT-1194: Environment Detector getSubclassResults Outside DRUPAL_ROOT #3994
Comments
@mikemadison13 as I recall the primary concern here was that ci.blt.yml wasn't working, but I saw your test PR and it looks like it works as expected. Is there something else we can do to reproduce this? |
@danepowell I find it highly suspect that I have had this issue on two projects but can't reproduce it on canary. Let me set upaa new project and document step by step and we can set what shakes out. |
I think I have figured out part of the reason for the problem here. As far as I can tell, the Environment Detector does not work for the Behat command. If you have a look at https://github.com/acquia/blt/blob/11.x/src/Robo/Common/EnvironmentDetector.php#L350
I have confirmed that while trying to |
Admittedly this is hacked out, but something like this (to provide a fallback for non-Drupal commands like the Behat one) DOES seem to work.
The question is, if DRUPAL_ROOT is undefined, is there a way to reliably figure out where the docroot is? Starting nested down inside of BLT and working up 6 directories is, theoretically sound (but again, horribly messy). |
I can confirm that patching my BLT with the above code does allow the getSubclassResults to function and identify the Azure server. Now I'm back into the 500 response on the webserver issue :( |
BLT: 11.1.1
Environment: Linux (Azure Pipelines) for CI, Linux (Lando) locally
Describe the bug
When running Drupal VM, BLT seems to have no issue managing configuration for Behat that works locally and in the CI container(s).
However, when running Lando locally, I haven't figured out a way to manage CI so that my Behat tests work locally AND in CI.
In particular, the issue comes down to the project.local.hostname variable. When I have my blt.yml set to "local.${project.machine_name}.com", this works in the CI container. However, it doesn't locally (since the lando paradigm is different). If I change this to be the proper lando paradigm "${project.machine_name}.lndo.ste:8000", it works locally, but not in the CI.
I have attempted to use the ci.blt.yml file to override this, but it doesn't seem to work as intended.
Scenarios:
It seems like we need a way to define project.local set of config AND a project.ci set of config, so that I can have different paths for the different environments. If project.ci isn't specified, I would expect it to default to local.
On the output side, there are a few things that happen.
The text was updated successfully, but these errors were encountered: