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

Deployments aren't working #377

Open
tresf opened this issue May 30, 2024 · 2 comments
Open

Deployments aren't working #377

tresf opened this issue May 30, 2024 · 2 comments
Assignees

Comments

@tresf
Copy link
Member

tresf commented May 30, 2024

Dom kindly worked on #376, but it's not deploying to the lmms.io server. I had made a small code change earlier this week (d5bc47f), but first tested the code on the server directly, so didn't realize the webhook wasn't working (Github webhook says 200)

Troubleshooting/findings:

  • I've temporarily toggled OFF deployment cleanup for debugging purposes.
    • vi /deploy.lmms/public_html/deploy-config.php
    • Search for CLEAN_UP
    • TODO: Turn this back on! Edit: Done, it's back on.
  • Redeploy from https://github.com/LMMS/lmms.io/settings/hooks/2803003?tab=settings
  • Find repo cloned to /tmp/deploy-master
  • Run the following command:
    sudo bash               # switch to root
    sudo -u www-data bash   # switch to www-data
    export APP_ENV=prod
    composer --no-ansi --no-interaction --no-progress --working-dir=/tmp/deploy-master install --no-dev --optimize-autoloader
  • Test to see if Artifacts.php has been updated:
    diff /tmp/deploy-master/lib/Artifacts.php /home/deploy/lmms.io/lib/Artifacts.php
Outdated

The error output:

root@evs:/home/deploy/lmms.io# sudo -u www-data bash
www-data@evs:/home/deploy/lmms.io$ composer --no-ansi --no-interaction --no-progress --working-dir=/tmp/deploy-master install --no-dev --optimize-autoloader
[...]
Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 255
!!  Symfony\Component\ErrorHandler\Error\ClassNotFoundError {#86
!!    #message: """
!!      Attempted to load class "MakerBundle" from namespace "Symfony\Bundle\MakerBundle".\n
!!      Did you forget a "use" statement for another namespace?
!!      """
!!    #code: 0
!!    #file: "./vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php"
!!    #line: 136
!!    trace: {
!!      ./vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php:136 { …}
!!      ./vendor/symfony/http-kernel/Kernel.php:346 { …}
!!      ./vendor/symfony/http-kernel/Kernel.php:762 { …}
!!      ./vendor/symfony/http-kernel/Kernel.php:126 { …}
!!      ./vendor/symfony/framework-bundle/Console/Application.php:190 { …}
!!      ./vendor/symfony/framework-bundle/Console/Application.php:72 { …}
!!      ./vendor/symfony/console/Application.php:175 { …}
!!      ./vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php:49 { …}
!!      ./vendor/autoload_runtime.php:29 { …}
!!      ./bin/console:11 {
!!        › 
!!        › require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
!!        › 
!!        arguments: {
!!          "/tmp/deploy-master/vendor/autoload_runtime.php"
!!        }
!!      }
!!    }
!!  }
!!  2024-05-30T01:12:30+00:00 [critical] Uncaught Error: Class "Symfony\Bundle\MakerBundle\MakerBundle" not found
!!  
Script @auto-scripts was called via post-install-cmd

@DomClark @liushuyu any idea?

@tresf tresf changed the title Deployments are working Deployments aren't working May 30, 2024
@tresf
Copy link
Member Author

tresf commented May 30, 2024

Calling export APP_ENV=prod fixes the deployment error. Still isn't updating the Artifact.php file though. :/ Updated original post.

tresf added a commit that referenced this issue May 30, 2024
@tresf
Copy link
Member Author

tresf commented May 30, 2024

Temporary patch deployed: 120c00e. This seems to fix it for now. Someone that knows more offering insight would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants