Skip to content

Audit Plugin Interface #8

Closed
Closed

Description

@beeradb

We have a plugin interface, but it hasn't been well reviewed or extensively used. We should do a full review on it, specifically with an eye towards systems plugins we expect to need:

  • Local DB/File import.
  • Drush site archive plugin
  • Pantheon plugin
  • Platform.sh (?) plugin
  • Legacy/newmedia plugin
  • S3 compatible file storage plugin

It's also worth spending some time reviewing what other similar systems (kalabox, docksal, drupalvm) do.

Additionally, we should probably gut check some base assumptions. Due to legacy concerns our plugins currently try to handle 100% of what it takes to get a running site. Does that assumption still hold? Specifically, It would be nice to consider whether the local environment should be dealing at all with git checkouts, or whether we should assume it's the users job to check out the code, and then run a ddev init or similar command.

Activity

  1. tannerjfco commented on Feb 3, 2017

    @tannerjfco
    Contributor

    +1 consideration on git behavior. This is something we currently do that is not really present in any competing products. It could be a nice-to-have in some ways, but i could also see it being problematic for various reasons. Removing checkout behavior would eliminate the need to handle environments on local like production and staging, which is strange in the context of local development.

  2. beeradb commented on Feb 6, 2017

    @beeradb
    ContributorAuthor

    Preferably I'd like signoff from at least two devs here. It may be a useful exercise to try and stub out sample plugins for local DB/File and Pantheon.

    The git behavior is probably best handled with a conversation. I'm not sure there's much research needed there, it really boils down to what we'd prefer the experience to be.

  3. tannerjfco commented on Feb 6, 2017

    @tannerjfco
    Contributor

    I feel like I have enough understanding of the current structure to stub another plugin, happy to do that.

  4. frodopwns commented on Feb 15, 2017

    @frodopwns
    Contributor

    I don't think there is any good reason to not use git to checkout repos. Each plugin should do what is best for its users but I can't support removing the git functionality without good cause.

  5. tannerjfco commented on Feb 15, 2017

    @tannerjfco
    Contributor

    I think there could still be use to handling checkouts in some cases, depending on the resource plugin and its requirements. I do think most developers expect to initialize and control their own working repository. Working from that as the default case also allows for ddev not to be tied to a specific VCS.

  6. rickmanelius commented on Feb 15, 2017

    @rickmanelius
    Contributor

    I don't quite understand the deliniation of what's being advocated (e.g. does ddev abstract away the need to use git directly or do we assume it pulls/checks out). I do agree with Tanner that there is probably an expectation to initiatlize/control or at least be able to peek under the hood and address by hand. However, I don't fully understand enough to add my vote.

  7. frodopwns commented on Feb 15, 2017

    @frodopwns
    Contributor

    I support allowing the tool to do the git checkout but also allowing the user to do it manually if they prefer.

    """I do think most developers expect to initialize and control their own working repository"""

    They expect to control it, but do they care about initializing it? I think the 0 to site in 5 minutes supports letting the tool do the automation.

  8. beeradb commented on Feb 15, 2017

    @beeradb
    ContributorAuthor

    I think the git checkout as a part of drud/ddev code made a lot more sense when we were working with external manifests (i.e. databags). Having that external manifest allowed us to encapsulate config outside of the git repo . We could just reach out when we needed it.

    When moving towards systems that don't necessarily have that external manifest than to me makes sense to have the git repo as that source. Also, as a developer, do not want or need a tool to manage basic stuff like git. It feels like a drud.yml is a natural place to store that sort of information, and could be used to consolidate a lot of stuff that might otherwise end up in CLI flags.

    I like the idea of being able to capture and version the config for a site in the ddev, and having the workflow be this (assuming you are already configured for any necessary auth):

    1. Check out the repo which you want to spin up
    2. Run ddev start (or similar)
  9. tannerjfco commented on Feb 15, 2017

    @tannerjfco
    Contributor

    IMO initializing is part of controlling it. What if i have WIP i want to spin against? What if its very WIP and I haven't pushed or maybe even committed it? At a high level I think we're better off saying "we expect a source checkout $here".

    I agree that having a git checkout ability helps deliver the 0->site expectation in the context of a platform plugin. At that point whether a source checkout happens automatically could be determined by platform, and whether an automated platform checkout happens or user provides manually, "we expect a source checkout $here" gets satisfied.

  10. frodopwns commented on Feb 15, 2017

    @frodopwns
    Contributor

    Here is what I'm envisioning:

    A user downloads the binary. The user then runs a command to add an existing site. The user is then prompted for things like repo name, git token, destination, etc. The tool then checks to see if the repo exists where it expects it to, if not in clones it.

    We simply aren't removing the current github functionality. The question is whether subsequent platform plugins will require the same functionality. I don't think we can answer that right now.

  11. frodopwns commented on Feb 15, 2017

    @frodopwns
    Contributor

    I don't see us gaining anything by trying to put a foot down on how we handle git. There are more pressing issues.

  12. beeradb commented on Feb 15, 2017

    @beeradb
    ContributorAuthor

    FWIW this doesn't necessarily have to be an either/or. Could always check for a drud.yml in the correct place and then prompt/fall back to CLI flags if it doesn't exist.

  13. tannerjfco commented on Feb 15, 2017

    @tannerjfco
    Contributor

    That workflow is already more complicated for an end user than it is to just clone it themselves. We don't gain anything by imposing requirements to have a github account, setup a personal token, have your repo in github, etc. When it comes to the default workflow, I strongly feel the default should be to simply expect source code at a given location (really if we establish that for all resources we gain the most flexibility in terms of what platforms can support). If we want to provide the option for automated checkouts at the platform level where much of that configuration can be abstracted from the user, I'm in favor of doing so there.

  14. frodopwns commented on Feb 15, 2017

    @frodopwns
    Contributor

    You guys are basically agreeing with me in saying it should do both. There doesn't need to be a default because it will fallback if the first check for an existing repo fails.

  15. frodopwns commented on Feb 15, 2017

    @frodopwns
    Contributor

    So far I believe @tannerjfco is the only other person to have created a plugin for one of the pluggable projects. Would be interesting to hear what he thinks about the architecture of the plugin systems in general.

    Was it easy to add a new plugin? Did you see any major improvements we could make?

  16. rickmanelius commented on Mar 6, 2017

    @rickmanelius
    Contributor

    Something to consider as we're auditing the plugin interface and (potentially) differentiating from platform/resource plugins. In a conversation today, we noted that when we decide to import an archive, the format of that archive may not be consistent (e.g. location of files, code, db, etc).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions