Let Bref Cloud find the error of a failed serverless deploy - #61
Merged
Merged
Conversation
The CLI sent the line after `Error:` in the osls output as the deployment's error message, which is often not the useful one: for a CloudFormation failure, AWS's reason is on the next line. The whole osls output is already pushed as the deployment's logs, so Bref Cloud now finds the error there, and the CLI sends none when osls fails. This also removes the check for a missing `npx`, which never matched (it looked for `npo: command not found`): Bref Cloud adds that hint instead. Claude-Session: https://claude.ai/code/session_01Awk33iZ9mDSg1xgSAPkgGK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
serverless deployfails, the CLI no longer looks for the error in the osls output. It sends no error message, and Bref Cloud finds the error in the deployment logs, which already contain the whole osls output.Bref Cloud must be deployed first: with the current Bref Cloud, failed deployments would have no error message.
Why
The CLI sent the line that follows
Error:, which is often not the useful one:CREATE_FAILED: HelloLambdaFunction (AWS::Lambda::Function), and AWS's reason is on the next line.Cannot resolve serverless.yml: Variables resolution errored with:, and the variable is on the next line.Bref Cloud can be fixed without a CLI release, and the change reaches every CLI version: it replaces the line older CLIs send with the whole error.
Also removed
The check for a missing
npxnever matched: it looked fornpo: command not found. Bref Cloud now adds that hint from the logs. It matches the shell errors of bash (npx: command not found) and dash/busybox (npx: not found).Tested
Tested against Bref Cloud with the server side of this change:
An unresolved variable prints the whole osls error, with this branch and with the current release:
Without
npxin thePATH: