-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add drush local support to the Pantheon Backdrop CMS upstream. #6
Comments
…board and terminus can run drush commands.
After applying the PR as-is and trying a
so I tried changing permissions on my local /drush/ to 775, and then got this error with a
pushing to pantheon and running the same command
Reverting this commit (but leaving the pantheon.yml file) and running
and to confirm we have drush 8 I did
Also, my Local site is functional again,
|
Digging deeper, the version of drush that I am running on my local (8.2-dev) doesn't have |
…board, and terminus, can run drush commands.
I just filed a new PR with the 8.x branch of drush. this one actually clears my caches! :)
|
sadly, it still won't update my database :( I pushed this version of drush and the pantheon.yml to a site that needed an update for devel module, and even though I can use drush via terminus, the via terminus:
|
As best I can tell it looks like both terminus and drush using site aliases both recognize the new version of Drush, but the dashboard does not. I'm not sure if that's because the dashboard is hard-wired to use a different version of drush, but it would be great if we could get @greg1anderson or @populist to take a look and see if we are doing something incorrectly. |
I think maybe we should try this again, now that we can use the |
Drush will detect a site-local Drush if there is a My prediction is that if you do these two things, then the dashboard cc button will work, and the "urn update.php" checkbox should work. I don't know if site-audit works with Backdrop, so the "Status" panel might not work or might not contain useful information. |
Bah that dreaded |
Tested this on a local site using Not sure best way to include it -- make a PR for the upstream with the vendor folder and composer.lock? |
I'm of two minds about including a vendor directory in the repo. On one hand: devs who use Pantheon are probably going to want Drush, and those who don't may never notice it's there. On the other: I really don't want to add a vendor directory :( -- am I alone in feeling this way? |
Over at Pantheon, we have the drops-8 repository, which does not include If you only need a standard Drush (e.g. |
Plus it makes the dashboard work. I'm ok with the vendor's directory. Maybe we can leave out the composer files? |
... or would it be Note that if you include Drush in a vendor directory, then you need to include everything in that vendor directory as well. Otherwise, Drush won't be able to load its dependencies. |
Alex, have you tested |
Issue backdrop-ops#6: Multiple XMLSitemap Modules
Got a first client's Backdrop site that's going to be hosted on Pantheon so I'm interested in this again. I'm attempting to get |
@herbdool I think your best bet is drush site local on the site you have. I'm pretty sure i had drush commands working for me on individual sites w/ that setup, but I've not played w/ Pantheon for a few years now. testingI would always do |
thanks @serundeputy. I'll do it for a quick fix. I'm hoping to have something we can merge upstream here if possible. So we'll see. |
yeah; we can do that in the upstream, but make sure it works at all or on your site first i think. |
@greg-1-anderson @serundeputy I've been trying a few different configurations both with a site-local drush and using the default drush (ideally I'd like to get it working with default drush and without needing composer). I've put the Backdrop drush project in these locations with no luck:
It does recognize the site-local drush in I've also tried putting an example drush command in Thank you for any help. |
…board, and terminus, can run drush commands.
@joelsteidl I was just reading how you've set up Stanford sites on Pantheon. I was wondering if you'd be interested in taking this issue on, to get drush working on Pantheon with Backdrop. Or any other in this issue backlog. Thanks for the articles by the way. Interesting to read about the move to Backdrop. |
Pantheon assumes that if you have a site-local Drush, that you're using Composer. If you're not using Composer, you should by hand put a relative symlink from If it doesn't, I'd be willing to make changes to Drush 8 to help make things work better with Backdrop. I thought that many years ago, we set things up so that you could use Drush 8 + backdrop with only a Drush extension in your Backdrop site. Don't remember where that ended up; maybe Backdrop has introduced more changes that make that harder. I don't know, but I'm willing to work with someone on it. Maybe DrupalCon Portland? |
Awesome @greg-1-anderson - you've been super helpful so far. I hope someone else in the thread will be able to work with you at DrupalCon if things get stuck with this. I'm not sure if I'll have a chance to test your suggestion, but if I do hopefully that does the trick. |
Thanks @herbdool! I'd be happy to help brainstorm the best approach. This is how I got Backdrop and
We could just do this and commit this to the Pantheon Backdrop Upstream but I'm not sure it is the most sustainable to keep everything updated. The symlink idea that @greg-1-anderson proposed is interesting because it would avoid the composer files in the upstream. We would just need to update the upstream if there are I will unfortunately not be at DrupalCon this year, but happy to collaborate here. |
To be clear, my suggestion for making the symlink would be in the case where you were copying Drush to The main problem with putting the backdrop command in In my message above, I was making a reference to the fact that I thought that we had made changes in Drush to allow the backdrop command to be placed somewhere inside |
I don't think this scenario will be very likely since most Backdrop sites will not be using composer for anything else, and newer versions of Drush could potentially create other problems for Backdrop sites. I have created a PR that adds drush using composer, but adds none of the composer files to the project. Drush is placed at Just for funzies, I also created an alternate PR that adds the Backdrop drush extension separately, at Both locations for the Backdrop Drush commands appear to work seamlessly. 👍 |
Get tests running and entity_access fix
@joelsteidl has packaged drush 8.4.11 in the |
Can you explain the purpose of the two changes in that patch? I hope to have a new release of Drush 8 out shortly; if I can make any changes that make things better for Backdrop &/or PHP 8.2, I will. I don't want to remove the constants, but I am wondering about the addition of |
@greg-1-anderson It's mostly due to the PHP8.x errors laid out in this issue thread: The hacks in that patch prevent a few fatal errors and then drush functions again.
|
Ah, right, Backdrop does not have Regarding |
@greg-1-anderson There is an equivalent set of identifiers in Backdrop within To your second question, I would think it would be innocuous but wouldn't be super confident about saying so for certain, I'm afraid. I am stumped as to why Backdrop is behaving differently here as well! |
OK I looked at the code you're patching, and that function starts off with a check:
It looks like Drush is going down the Drupal 6 code path when using Backdrop, whereas I would expect it to be more applicable to use the Drupal 7 code path. There are a lot of places in the code where Drush checks the Drupal major version. It seems like it would be a good idea to make |
Good detective work! |
@greg-1-anderson I assume you mean |
Yeah, that's essentially what I meant @herbdool, but that's sort of a hack. A better solution would be if the bootstrap classes introduced new methods e.g. "Drupal7SeriesSite" and etc. that could be version compares in the default implementations, but just be overridden to always return |
This adds:
BACKDROP_ROOT/drush/drush
BACKDROP_ROOT/drush/drush/commands/backdrop
BACKDROP_ROOT/drush/drush/drush
PR from @serundeputy at #7PR from @jenlampton at #8PR from @herbdool at #25PR from @jenlampton at #65
The text was updated successfully, but these errors were encountered: