Skip to content

feat: better handling of drush commands outside of Lagoon environments#38

Open
rocketeerbkw wants to merge 1 commit intomainfrom
ddev-support
Open

feat: better handling of drush commands outside of Lagoon environments#38
rocketeerbkw wants to merge 1 commit intomainfrom
ddev-support

Conversation

@rocketeerbkw
Copy link
Copy Markdown
Member

In #23, a brute force check for LAGOON env var was added to prevent errors when attempting to run any Drush command in a non-lagoon environment. This had the side effect of preventing drush lagoon commands from running in environments that could work, but aren't Lagoon, like DDEV.

This PR changes so that the specific error is caught and handled, instead of disabling all together. This allows all lagoon commands to be run in DDEV as well.

Supersedes #24.

Note for reviewers. There was inconsistent spelling of variables jwt_token/jwttoken and ssh_port_timeout/sshTimeout throughout. It looked like a bug to me so I unified them all.

Allows all `lagoon` commands to be run in DDEV
Copy link
Copy Markdown
Contributor

@bomoko bomoko left a comment

Choose a reason for hiding this comment

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

Yeah, all makes sense.

* @var string
*/
private $api;
private $api = 'https://api.lagoon.amazeeio.cloud/graphql';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not entirely against this - just I know we had some focus around not hardcoding this stuff into the integrations work before. Thoughts?

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.

I think removing the hardcoded values at this moment would break these drush commands for the majority of users, not just "outside of lagoon environments"? They aren't in .lagoon.yml by default and the env vars LAGOON_OVERRIDE_API/LAGOON_OVERRIDE_SSH are non-standard (not set by Lagoon).

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