unknowntpo commented on PR #56:
URL:
https://github.com/apache/gravitino-playground/pull/56#issuecomment-2367003012
> @unknowntpo I am going to add CI check for this repository. But there's an
issue when I lint this helm-chart. Can you help check this issue? Thanks!
>
> ```
> helm lint helm-chart
> walk.go:74: found symbolic link in path:
/Users/wangdanhua/Workspace/test/test2/gravitino-playground-feat-helm/helm-chart/healthcheck
resolves to
/Users/wangdanhua/Workspace/test/test2/gravitino-playground-feat-helm/healthcheck.
Contents of linked file included and used
> walk.go:74: found symbolic link in path:
/Users/wangdanhua/Workspace/test/test2/gravitino-playground-feat-helm/helm-chart/init
resolves to
/Users/wangdanhua/Workspace/test/test2/gravitino-playground-feat-helm/init.
Contents of linked file included and used
> walk.go:74: found symbolic link in path:
/Users/wangdanhua/Workspace/test/test2/gravitino-playground-feat-helm/helm-chart/healthcheck
resolves to
/Users/wangdanhua/Workspace/test/test2/gravitino-playground-feat-helm/healthcheck.
Contents of linked file included and used
> walk.go:74: found symbolic link in path:
/Users/wangdanhua/Workspace/test/test2/gravitino-playground-feat-helm/helm-chart/init
resolves to
/Users/wangdanhua/Workspace/test/test2/gravitino-playground-feat-helm/init.
Contents of linked file included and used
> ==> Linting helm-chart
> [INFO] Chart.yaml: icon is recommended
> [ERROR] templates/jupyter.yaml: unable to parse YAML: error converting
YAML to JSON: yaml: line 98: found character that cannot start any token
>
> Error: 1 chart(s) linted, 1 chart(s) failed
> ```
This is because we don't provide `projectRoot` variable, which is used to
locate hostPath.
helm seems to do rendering before actual linting, so if we don't provide it
while doing helm lint,
the rendered result of hostPath will be:
```
$ helm template --debug ./helm-chart/
# ... omit other result
- name: artifacts
hostPath:
path: %!s(<nil>)/init/jupyter/
type: DirectoryOrCreate
```
The rendering of `path` is broken.
If we provide projectRoot variable:
```
helm lint ./helm-chart/ --set projectRoot=$(pwd)
```
Linter result will be:
```
$ helm lint ./helm-chart/ --set projectRoot=$(pwd)
(base) 06:53:35
walk.go:74: found symbolic link in path:
/Users/unknowntpo/repo/unknowntpo/gravitino-playground/feat-helm/helm-chart/healthcheck
resolves to
/Users/unknowntpo/repo/unknowntpo/gravitino-playground/feat-helm/healthcheck.
Contents of linked file included and used
walk.go:74: found symbolic link in path:
/Users/unknowntpo/repo/unknowntpo/gravitino-playground/feat-helm/helm-chart/init
resolves to
/Users/unknowntpo/repo/unknowntpo/gravitino-playground/feat-helm/init. Contents
of linked file included and used
walk.go:74: found symbolic link in path:
/Users/unknowntpo/repo/unknowntpo/gravitino-playground/feat-helm/helm-chart/healthcheck
resolves to
/Users/unknowntpo/repo/unknowntpo/gravitino-playground/feat-helm/healthcheck.
Contents of linked file included and used
walk.go:74: found symbolic link in path:
/Users/unknowntpo/repo/unknowntpo/gravitino-playground/feat-helm/helm-chart/init
resolves to
/Users/unknowntpo/repo/unknowntpo/gravitino-playground/feat-helm/init. Contents
of linked file included and used
==> Linting ./helm-chart/
[INFO] Chart.yaml: icon is recommended
1 chart(s) linted, 0 chart(s) failed
```
And the rendered result will be:
```
helm template --debug ./helm-chart/ --set projectRoot=$(pwd)
```
```
$ helm template --debug ./helm-chart/
# ... omit other result
- name: artifacts
hostPath:
path:
/Users/unknowntpo/repo/unknowntpo/gravitino-playground/feat-helm/init/jupyter/
type: DirectoryOrCreate
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]