GitHub App lambda failing on dev, sometimes
See original GitHub issueDescribe the bug Seeing errors in the logs like this:
errorType": "TypeError",
"errorMessage": "Cannot read property 'full_name' of undefined",
"stack": [
"TypeError: Cannot read property 'full_name' of undefined",
" at processEvent (/var/task/index.js:121:44)",
" at Runtime.exports.handler (/var/task/index.js:174:5)",
" at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)"
]
Anecdotally, adding repos doesn’t work in dev, although deleting branches does work for existing entities.
Steps to reproduce (I think, just reporting, haven’t tried it)
- Install GitHub app
- Add a .dockstore.yml
Additional context Note that dev is on an older version of the lambda, at master branch on commit ca214b6.
Seeing this sort of payload (truncated and redacted):
{
"action": "added",
"installation": {
"repositories_added": [
{
"id": xxx,
"node_id": "yyy",
"name": "zzz",
"full_name": "goo/foo",
"private": false
}
],
"repositories_removed": [
],
}
This sort of error in the logs:
{
"errorType": "TypeError",
"errorMessage": "Cannot read property 'full_name' of undefined",
"stack": [
"TypeError: Cannot read property 'full_name' of undefined",
" at processEvent (/var/task/index.js:121:44)",
" at Runtime.exports.handler (/var/task/index.js:174:5)",
" at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)"
]
}
Looks like index.js is looking for body.repository.full_name
, but may need to look for body.repositories_added[i].full_name
?
┆Issue is synchronized with this Jira Story ┆Issue Type: Story ┆Fix Versions: Dockstore 1.9 ┆Sprint: Sprint 35 Jellyfish ┆Issue Number: DOCK-1338
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Error when deploy lambda error after sam application manually
Describe the bug. Trying to deploy sam application manually after deploy the lambda crash. To Reproduce Steps to reproduce the behavior: Environment Vars:....
Read more >Causes app to fail startup on AWS Lambda · Issue #384 - GitHub
This works fine in a local development environment, but putting it on Lambda using Zappa, the app fails with a somewhat cryptic log:....
Read more >Deployment Fails with "ResourceConflictException" in Lambda
Just re-confirmed that neither site has the add aws:states:opt-out as the lambda description workaround set. Both sites are using a github ...
Read more >.NET ARM Lambda function using .NET 7 RC1 fails to start ...
Digging into the logs in CloudWatch show that the function is failing to start. ... This appears to be due to the AWS...
Read more >Appsync Lambda Go: failed: Error: The stack named ... - GitHub
This means when upgrading you're running into the issues related to the topics here and here, please read through these docs to understand...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I thought for @garyluu adding workflows via .dockstore.yml wasn’t working on dev. I researched it, found these errors and created a ticket. These particular messages may have been a red herring, but I don’t know if things are working overall.
BTW, latest deploy on dev has this fix.
This is not a real error. Pretty much push events return a set of messages, but we only care about a subset. That subset has some expected fields which are not necessarily present in the rest of the set. The lambda didn’t know this, so it was checking for some fields in the rest of the set that are not actually there. The rest of the set is now ignored, so the error message shouldn’t occur anymore.