Skip to content
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

Include binaries during ddev start #172 #207

Open
wants to merge 53 commits into
base: main
Choose a base branch
from

Conversation

deviantintegral
Copy link
Member

@deviantintegral deviantintegral commented May 9, 2023

#164 came up on two separate projects again within a day. As well, we noticed that the error still happens even when not running parallel jobs, which we had previously thought was a workaround.

I know we had left #172 at "needs discussion", but I had a good idea from other work how to approach this, so I figured a PR gave us something to talk about instead of something theoretical.

This PR adds a composer config to disable the current behaviour of downloading task and local-php-security-checker. That way, there's no immediate change for current sites, and they can migrate any existing CI or build scripts one tool at a time.

composer config --json extra.drainpipe.global-binaries.task "true"
composer config --json extra.drainpipe.global-binaries.local-php-security-checker "true"

This PR should also fix:

As well, it fixes users accidentally running composer on the host, getting the host OS binary, and then being confused with the binary not working inside of ddev.

Finally, it upgrades local-php-security-checker because version 1 isn't available for ARM macs.

@github-actions github-actions bot requested a deployment to pantheon-pr-207 May 9, 2023 21:30 In progress
@deviantintegral
Copy link
Member Author

Talked about this today:

  • "We agreed this is a great idea"
  • "Andrew is going to fix some little bits"
  • "lets ship it"

@mrdavidburns mrdavidburns self-requested a review May 26, 2023 13:21
Copy link
Member

@mrdavidburns mrdavidburns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the issues we were having with v3.0.0 on Lullabot.com

@github-actions github-actions bot requested a deployment to pantheon-pr-207 June 12, 2023 11:03 In progress
@deviantintegral
Copy link
Member Author

I've marked this as high because I know of at least 3 client projects the bugs this solves has affected.

@github-actions github-actions bot had a problem deploying to pantheon-pr-207 March 15, 2024 13:56 Failure
@github-actions github-actions bot had a problem deploying to pantheon-pr-207 March 15, 2024 14:15 Failure
@github-actions github-actions bot had a problem deploying to pantheon-pr-207 March 15, 2024 14:23 Failure
@github-actions github-actions bot had a problem deploying to pantheon-pr-207 March 15, 2024 14:35 Failure
@deviantintegral
Copy link
Member Author

I believe we've hit our multidev limit or similar as we're getting errors running wipe that are unrelated to this PR: https://github.com/Lullabot/drainpipe/actions/runs/8297688089/job/22709329644?pr=207

@mrdavidburns
Copy link
Member

I've noticed that on other PRs as well. I've been going in and manually deleting the oldest MultiDevs and re-running jobs for Renovate PRs. I just merged a Renovate pull request that all checks passed and then re-ran the action for this one.

@github-actions github-actions bot had a problem deploying to pantheon-pr-207 March 15, 2024 14:47 Failure
@mrdavidburns
Copy link
Member

@deviantintegral I've asked Pantheon support chat to bump us to 15 MultiDev and they said we'd have to have a Gold level account. I told them we were a Pantheon partner and they've done this for Lullabot.com which is on a Small tier, they still said they wouldn't do it. Maybe there's someone else we can ask?

@mrdavidburns
Copy link
Member

Looks like this is now failing because of a real error during the deploy to Pantheon.

https://github.com/Lullabot/drainpipe/actions/runs/8297688089/job/22710408917?pr=207#step:15:544

 [warning] Waited '180' seconds, giving up waiting for workflow to finish
 [notice] Fetching site information to build Drush aliases...
 [notice] 1 sites found.
 [notice] Writing Drush 8 alias file to ~/.drush/pantheon.aliases.drushrc.php
 [notice] Writing Drush 9 alias files to ~/.drush/sites/pantheon
> Warning: Permanently added '[appserver.pr-207.22fcd7e9-8dd3-4bab-8fe0-7c856b1ee202.drush.in]:2222,[34.34.44.43]:2222' (RSA) to the list of known hosts.

 You are about to:
 * DROP all tables in your 'pantheon' database.

 // Do you want to continue?: yes.                                              

> 
> In SiteInstallCommands.php line 181:
>                                                                                
>   Existing configuration directory not found or does not contain a core.exten  
>   sion.yml file.".                                                             
>                                                                                
> 

In SiteProcess.php line 214:
                                                                               
  The command "ssh -p 2222 -o "AddressFamily inet" pr-207.22fcd7e9-8dd3-4bab-  
  8fe0-7c856b1ee202@appserver.pr-207.22fcd7e9-8dd3-4bab-8fe0-7c856b1ee202.dru  
  sh.in 'drush --yes site:install --existing-config --uri=pr-207-***.pa  
  ntheonsite.io'" failed.                                                      
                                                                               
  Exit Code: 1(General error)                                                  
                                                                               
  Working directory:                                                           
                                                                               
  Output:                                                                      
  ================                                                             
                                                                               
   You are about to:                                                           
   * DROP all tables in your 'pantheon' database.                              
                                                                               
   // Do you want to continue?: yes.                                           
                                                                               
                                                                               
                                                                               
                                                                               
  Error Output:                                                                
  ================                                                             
  Warning: Permanently added '[appserver.pr-207.22fcd7e9-8dd3-4bab-8fe0-7c856  
  b1ee202.drush.in]:2222,[34.34.44.43]:2222' (RSA) to the list of known hosts  
  .                                                                            
                                                                               
  In SiteInstallCommands.php line 181:                                         
                                                                               
                                                                               
    Existing configuration directory not found or does not contain a core.ext  
  en                                                                           
    sion.yml file.".    

@penyaskito
Copy link
Member

Not sure how the test failure is related. Sadly the drush command doesn't give more information (that message has been fixed in HEAD) drush-ops/drush#5881

@github-actions github-actions bot had a problem deploying to pantheon-pr-207 April 4, 2024 13:39 Failure
@penyaskito
Copy link
Member

I've re-tested and now getting a different error (terminus missing a sitename argument).

@YesCT
Copy link
Contributor

YesCT commented Apr 12, 2024

@justafish @deviantintegral @davereid Any reason to not update this branch to the latest in main? Or the latest in the 3.7.0 release?? https://github.com/Lullabot/drainpipe/releases

I thought of this, cause we went to use #470 on a project that we are pulling in like "lullabot/drainpipe": "dev-172--global-binaries as 3.7.0", ... and I wanted to use #470 which went into v3.6.0. cc @leonel-lullabot

@justafish
Copy link
Member

@YesCT hopefully this branch won't be needed anymore with the last round of bug fixes in 3.7.1 and adding composer install to your ddev start hook

@YesCT
Copy link
Contributor

YesCT commented Apr 22, 2024

With 3.7.1, on tugboat, I ran into:

In Filesystem.php line 370:
                                                                               
  copy(/var/lib/tugboat/vendor/lullabot/drainpipe/scaffold/ddev/web-build/):   
  Failed to open stream: No such file or directory   

Though we aren't using the new tugboat drainpipe integration.

@YesCT
Copy link
Contributor

YesCT commented Apr 22, 2024

@justafish For the filesystem.php error, @leonel-lullabot was able to bypass the error. (By running the init steps again on the preview I think.) So, no known concerns from me about closing this.

@penyaskito
Copy link
Member

@YesCT It could be an issue on CI, where you don't have the option for "rerun again".
I have https://lullabot.slack.com/archives/C019JP1EN1Y/p1712262592896549?thread_ts=1712245179.161029&cid=C019JP1EN1Y on my pile for testing if that would work, but more than happy if you beat me to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working client affected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants