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

watchbot-dead-letter's "View this message's recent logs?" functionality throws an error and exits the command #350

Closed
jseppi opened this issue Jan 22, 2021 · 2 comments · Fixed by #354

Comments

@jseppi
Copy link
Contributor

jseppi commented Jan 22, 2021

In the watchbot-dead-letter command, when I selected:

  • Triage dead messages individually?
  • View this message's recent logs?

the command crashes with InvalidParameterException: Invalid filter pattern.

Full error stack, though probably not very helpful:

? Would you like to: View this message's recent logs?
⠆ Searching CloudWatch logs...InvalidParameterException: Invalid filter pattern
    at Request.extractError (/Users/jamesseppi/CODE/ecs-watchbot/node_modules/aws-sdk/lib/protocol/json.js:51:27)
    at Request.callListeners (/Users/jamesseppi/CODE/ecs-watchbot/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
    at Request.emit (/Users/jamesseppi/CODE/ecs-watchbot/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
    at Request.emit (/Users/jamesseppi/CODE/ecs-watchbot/node_modules/aws-sdk/lib/request.js:683:14)
    at Request.transition (/Users/jamesseppi/CODE/ecs-watchbot/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/Users/jamesseppi/CODE/ecs-watchbot/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /Users/jamesseppi/CODE/ecs-watchbot/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/Users/jamesseppi/CODE/ecs-watchbot/node_modules/aws-sdk/lib/request.js:38:9)
    at Request.<anonymous> (/Users/jamesseppi/CODE/ecs-watchbot/node_modules/aws-sdk/lib/request.js:685:12)
    at Request.callListeners (/Users/jamesseppi/CODE/ecs-watchbot/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
@rclark
Copy link
Contributor

rclark commented Jan 22, 2021

Pulling logs is done through an external dependency: https://github.com/mapbox/cwlogs. Here is where the "filter pattern" is used to perform a search across CloudWatch Logs. This is either a bug in watchbot (sending bad values to that library), or an upstream bug in cwlogs (using valid input to construct a bad request).

@jseppi
Copy link
Contributor Author

jseppi commented Jan 24, 2021

Looks like exactly the same issue as #141. I think #220 did not actually fix that particular issue.

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