GoogleCloudPlatform / GoogleCloudPlatform/cloud-build-notifiers

should extract build id in another way when build status is unknown

Open
#176 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
157
Forks
144
Avg merge
1h 34m
Merged PRs (30d)
1

Description

In chat notifier, we extract the build id from the first 8 chars in the build id [Here](https://github.com/GoogleCloudPlatform/cloud-build-notifiers/blob/17dd0b47f357d5e408437b3b5558eb1d43c51325/googlechat/main.go#LL137C27-L137C42). But build id is empty when the build has status unknown and would throw this error:
```
http: panic serving 169.254.1.1:35855: runtime error: slice bounds out of range [:8] with length 0 goroutine 47
```

We should manually set the build id when the build status is unknown.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.