-
Notifications
You must be signed in to change notification settings - Fork 350
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
github sync nonetype error when listing repo-teams #1334
Comments
which relies on data from this graphql object: and that is defined here: The We could add in logic to continue on despite this GitHub error, but this would cause us to lose team-to-repo mappings or team permission data in the graph. This is because something wrong happened on GitHub's end and if we don't include a team-to-repo mapping in this run, it will get cleaned up and disappear. I think I'd prefer to continue the current behavior of failing the sync here rather than losing data when GitHub has problems. Still, there may be something wrong with our specific deployment if this problem is happening frequently enough. cc: @heryxpc |
Another approach: wrap it with retry + sleep. I started this in https://github.com/lyft/cartography/pull/1336/files. Will add tests when I have time but assuming my theory about GitHub API not behaving well is correct, this should help. |
…cartography-cncf#1336) ### Summary > Describe your changes. Adds a retry with sleep to `_get_team_repos_for_multiple_teams` because we have seen the GitHub GraphQL API sometimes return None for fields that are not supposed to be None. ### Related issues or links > Include links to relevant issues or other pages. - cartography-cncf#1334 ### Proof that this works > We can merge your change in faster if we see that it works. For example, if making a change to the graph, include a > screenshot showing what the graph looked like before and after your changes. You can also include console log traces > showing what happened before and after your changes. Added unit tests. ### Checklist - [x] Update/add unit or integration tests If you are modifying or implementing an intel module: - [ ] Update the [schema](https://github.com/lyft/cartography/tree/master/docs/root/modules) and [readme](https://github.com/lyft/cartography/blob/master/docs/schema/README.md) - [ ] Use the NodeSchema [data model](https://lyft.github.io/cartography/dev/writing-intel-modules.html#defining-a-node)
…cartography-cncf#1336) ### Summary > Describe your changes. Adds a retry with sleep to `_get_team_repos_for_multiple_teams` because we have seen the GitHub GraphQL API sometimes return None for fields that are not supposed to be None. ### Related issues or links > Include links to relevant issues or other pages. - cartography-cncf#1334 ### Proof that this works > We can merge your change in faster if we see that it works. For example, if making a change to the graph, include a > screenshot showing what the graph looked like before and after your changes. You can also include console log traces > showing what happened before and after your changes. Added unit tests. ### Checklist - [x] Update/add unit or integration tests If you are modifying or implementing an intel module: - [ ] Update the [schema](https://github.com/lyft/cartography/tree/master/docs/root/modules) and [readme](https://github.com/lyft/cartography/blob/master/docs/schema/README.md) - [ ] Use the NodeSchema [data model](https://lyft.github.io/cartography/dev/writing-intel-modules.html#defining-a-node) Signed-off-by: chandanchowdhury <[email protected]>
Bug Template
Description:
GitHub sync crashes when listing repo-teams with a Nonetype error;
To Reproduce:
Not sure why this suddenly started failing.
Logs:
Crash:
Please complete the following information::
The text was updated successfully, but these errors were encountered: