carvel-dev / carvel-dev/kbld

kbld does not work with git error messages set to a different language

Open
#213 3 comments 0 reactions 0 assignees View on GitHub
bug carvel accepted priority/important-longterm
Dominant language
Go
Stars
329
Forks
52
PR merge metrics
No merged PRs in 30d

Description

I use brew install kbld, Version 0.32.0.

Here is my input Yaml file:
Deploy.yaml
```
#@ scaling_factor = 2
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: go-http-svr
labels:
app: http-svr
spec:
replicas: #@ scaling_factor
selector:
matchLabels:
app: http-svr
template:
metadata:
labels:
app: http-svr
spec:
containers:
- name: go-http-svr
image: rock981119/go-http:gitlabv1
ports:
- containerPort: 9000

```

kbld.yaml
```
---
apiVersion: kbld.k14s.io/v1alpha1
kind: Sources
sources:
- image: rock981119/go-http:gitlabv1
path: .

---
apiVersion: kbld.k14s.io/v1alpha1
kind: ImageDestinations
destinations:
- image: rock981119/go-http:gitlabv1
newImage: rock981119/go-http
```
command line execution:
```
kbld -f kbld.yaml -f Deploy.yaml
```
error message:
```
kbld: Error:
- Resolving image 'rock981119/go-http:gitlabv1': Getting details from git for directory '/Users/zangr/Desktop/Temp/Linux/demo-go-ci': Checking HEAD tags: exit status 128 (stderr 'fatal: 没有发现名称,无法描述任何东西。
')
```
Chinese part is 'No name found, can't describe anything'

**At the same time, I did the same test in the Linux (PhotonOS) environment and it was successful.**

My MacOS Version: 11.6.2

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the kbld -f kbld.yaml -f Deploy.yaml command with Git configured to emit Chinese messages, then locate the kbld entry point that retrieves Git details and handles the `Checking HEAD tags` error. Done means the command handles this localized Git output correctly, with a regression test covering the reported case if the project has an applicable test area.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, go
Domain
cli, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.