backdrop-ops / backdrop-pantheon

Version of Backdrop CMS that runs on the Pantheon hosting platform.
GNU General Public License v2.0
5 stars 8 forks source link

Do we need to port pantheon_api for custom upstreams #17

Closed kreynen closed 6 years ago

kreynen commented 6 years ago

This module is really just a single function, but when it isn't in the system table Pantheon's Dashboard complains when managing sites using custom upstreams created from forks of this repo.

https://github.com/pantheon-systems/drops-7/tree/master/modules/pantheon/pantheon_api

screen shot 2018-08-15 at 8 27 46 am

Sites created using this upstream aren't looking for pantheon_api. I'm not sure if the correct fix is to port this module and use the D7 upstream type or figure out how to get Pantheon to apply the same changes made for this upstream to others.

greg-1-anderson commented 6 years ago

I don't believe that any of the actual functionality in the pantheon_api or pantheon_login modules do anything useful that you need. However, you need to have a module named pantheon_api enabled in your Drupal 7 or Drupal-7-like site. If you do, then Drupal hooks in the pantheon_api module namespace will be called. Pantheon defines and includes the sources for these hooks automatically from the platform, but these hooks are only called from Drupal if the module is enabled.

I haven't done a survey of these hooks, but at a minimum the Varnish cache clear mentioned in the message above is part of the integration. It would be best to have this module enabled for Backdrop sites.

herbdool commented 6 years ago

So looks like having it helps. I've created a PR https://github.com/backdrop-ops/backdrop-pantheon/pull/24

quicksketch commented 6 years ago

https://github.com/backdrop-ops/backdrop-pantheon/pull/24 has been merged and should be available by Pantheon dashboards.

What further hooks could we include here? It would be great if we could get the "Run updates" checkbox working, is that possible with this?

We could also include pantheon_api in the standard.profile I think fairly easily. Or we could include make a new default profile used by Pantheon. The recent change in 1.11.0 (as soon as it's released) to move /profiles into /core/profiles frees up the root directory to add a new custom profile.

greg-1-anderson commented 6 years ago

"Run updates" should just run a drush updatedb command. As long as you get the site-local Backdrop Drush extensions working, you should be able to hook the updatedb command and get that working.

I don't think that the pantheon api does much more than the varnish cache clear. This is also predicated on whether or not Backdrop is running cache clear hooks that look like the Drupal 7 cache clear hooks.