Vapor: Debugging Hooks, CI Deployments, and more!

Oct, 22 2020#vapor

Over the last few days, we've been working on some enhancements on Vapor. Now, before we talk about what's new, make sure you are running the latest version of the packages laravel/vapor-core, and laravel/vapor-cli — otherwise, you won't be able to see these new updates.

Debugging Failing Hooks

Starting today, you can now quickly debug failing deployment hooks directly from the console. If the deployment fails because of a hook, the output will be now displayed in the console:


In addition, a new Vapor hook:output command was added to vapor-cli so you can easily review a hook's output at any time:

vapor hook:output {DEPLOYMENT_HOOK_ID}

Also, you may use hook:log command to review the logs associated with the failing hook:

vapor hook:log {DEPLOYMENT_HOOK_ID}

The hook:log command will print the JSON logs in your console like so:


CI Deployments

Previously, Vapor's rate limit was applied per IP address, meaning that some of our customers using CI platforms like GitHub Actions or CircleCI were receiving "You are attempting this action too often" errors. Of course, this happened because those CIs services often share IP addresses.

Starting today, the rate limit is applied per Vapor user - meaning that your application's deployment won't be affected by the number of other Vapor customers using the same CI service as you.

In the rare event you do hit a rate limit, vapor-cli is now smart enough to retry the request in a few seconds:


Reviewing Logs

Finally, we have improved how output is stored in CloudWatch. Because of the way CloudWatch works, every newline output by your CLI and queue Lambda functions were being stored as a single record event in CloudWatch:


This can be very confusing, as you can't see the entire output altogether. So starting today, the output is compiled to a single record event in CloudWatch, meaning logs will be displayed better in both CloudWatch and the Vapor UI package:


We hope you enjoy new improvements on Laravel Vapor. At Laravel, we're committed to providing you with the most robust and developer friendly PHP experience in the world. If you haven't checked out Vapor, now is a great time to start! You can create your account today at:

By Nuno Maduro

Software Engineer at Laravel.

Follow the RSS Feed.