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

Type check SHA response #322

Merged
merged 2 commits into from
Aug 24, 2023
Merged

Type check SHA response #322

merged 2 commits into from
Aug 24, 2023

Conversation

adamrdrew
Copy link
Collaborator

This patch adds a type check on the response object when we get a SHA. it can sometimes be a list rather than a dict.

We got this report and this should fix it:

2023-08-24 14:22:41 [   ERROR] [          MainThread] failed to fetch template file for service-accounts
2023-08-24 14:22:41 [   ERROR] [          MainThread] hit fatal error: list indices must be integers or slices, not str
2023-08-24 14:22:41 [    INFO] [          MainThread] releasing namespace 'ephemeral-x0cun8'
2023-08-24 14:22:42 [    INFO] [          MainThread] processing namespace reservation
2023-08-24 14:22:42 [    INFO] [          MainThread] running (pid 95686): oc apply -f -
2023-08-24 14:22:43 [    INFO] [           pid-95686]  |stdout| namespacereservation.cloud.redhat.com/bonfire-reservation-cf86f0d8 configured
2023-08-24 14:22:43 [    INFO] [          MainThread] releasing reservation 'bonfire-reservation-cf86f0d8' namespace 'ephemeral-x0cun8'
ERROR: deploy failed: list indices must be integers or slices, not str

@bsquizz
Copy link
Collaborator

bsquizz commented Aug 24, 2023

Unclear how we got a list back, since API docs don't indicate that we should get a list: https://docs.github.com/en/rest/git/refs?apiVersion=2022-11-28#get-a-reference -- but at any rate, LGTM.

@bsquizz bsquizz merged commit 74f9ec2 into master Aug 24, 2023
@bsquizz bsquizz deleted the git_ref_typecheck_response branch August 24, 2023 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants