pantheon-systems / docker-build-tools-ci

Dockerfile source for docker image pantheon-public/build-tools-ci on quay.io
34 stars 39 forks source link

Composer dependency conflict #36

Closed jfussion closed 3 years ago

jfussion commented 5 years ago

On fresh install, I got the following error:

  The plugin pantheon-systems/terminus-build-tools-plugin has installed the p  
  roject phpspec/prophecy: 1.8.0, but Terminus has installed phpspec/prophecy  
  : 1.8.1. To resolve this, try running 'composer update' in both the plugin   
  directory, and the terminus directory.       

Steps To Reproduce: Created new site using this command:

$ terminus build:project:create --team='My Agency Name' wp my-site

Known Workarounds: Downgrade image to 5.x

greg-1-anderson commented 5 years ago

Do you get the error above in CircleCI, or as part of the output of build:project:create? The workaround implies the former.

Is TERMINUS_BUILD_TOOLS_VERSION defined anywhere?

ataylorme commented 5 years ago

It seems you’ve installed Build Tools with dev dependencies. How did you install it? If you used Composer, try doing an install without dev dependencies

jfussion commented 5 years ago

@greg-1-anderson I didn't define that somewhere.

@ataylorme I installed build tools plugin without dev dependencies.

Also, the error is from the ci build not on my local. Here's the screenshot: https://monosnap.com/file/umiiVd6zgabkMMeyKcTkWSXbnMGYTI

jfussion commented 5 years ago

I pushed again to my master branch and the build failed again with the same error on command deploy to pantheon.

ataylorme commented 5 years ago

Just to follow up CI providers cache Docker images and you may need to clear that cache to get the fix. For CircleCI, see this article

ataylorme commented 5 years ago

For some more background, when installing Terminus and Build Tools they need to be installed with --no-dev to avoid this error. A previous version of our Dockerfile here was not doing that.

Beta 15 of Build Tools added some unit tests, and more dev dependencies, which is why the conflict is surfacing now and did not appear in previous versions of the Dockerfile.

aaronbauman commented 5 years ago

I'm using the latest "bleeding-build-tools" tag and still getting this error. 5.x with build tools dev-master does not exhibit this error.

ataylorme commented 5 years ago

@aaronbauman I just tagged beta 16 of Build Tools and updated the 6.x tag of the Dockerfile.

Commits 6989a66 and dcc24df resolved this issue in the 6.x version of the Dockerfile. Since those changes, it has been working for me on CircleCI, GitLab and BitBucket Pipelines.

Please test the 6.x tag (currently the same as dev-master), do not set BUILD_TOOLS_VERSION, and ensure your CI service is not caching the Dockerfiles.

5.x with build tools dev-master does not exhibit this error.

That doesn't make sense to me as you are installing the same version of Build Tools (dev-master) on both. Perhaps 5.x has Terminus 2.0.0 and not 2.1.0, even though it is pinned at 2.x, since it hasn't been built in some time.

kporras07 commented 3 years ago

This seems to be fixed so I'm closing this issue. Feel free to reopen/create a new one if further discussion is needed :)