Skip to content

Restore triggers too early for 3rd party add-ons #91

@mattbrailsford

Description

@mattbrailsford

There is an issue with Deploy triggering too early if there are third party add-ons that require their IComponent implementations to run before they can safely deploy artefacts.

Reproduction

Bug summary

It appears that Umbraco.Deploy triggers a deploy from within it's IComponent.Initialize method, however because the DeployComposer class is registered before IUserComposer instances I believe this means that it is composed and thus initialized before all other composers / components of third parties.

The issue is, Vendr requires it's IComponent to be initialized before it can safely execute as there are a number of setup steps that occur within that method that it relies upon. Because these aren't triggered though before Deploy attempts a restore the attempt fails with exceptions due to a number of resources being null.

Steps to reproduce

  • Create a cloud site
  • Install Vendr + Vendr.Deploy
  • Setup a store in the settings section on the dev env
  • Pull the site locally and restore (this should succeed)
  • Trigger another restore by creating a deploy file in the data directory and then touch the web.config
  • The deploy will now fail because the deploy occurred before Vendr's IComponent was initialized which contains essential setup steps for Vendr to run

Expected result

I would expect that Umbraco Deploy should wait until the application is fully initialized before it attempts a restore as it can't know what third party dependencies it has and whether those dependencies are ready yet or not.

Actual result

Deploy attempts a restore too early and so causes errors.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions