If you deploy a helm chart with a long description (and likely other fields), there will be an issue with generating the index.yaml for a virtual repo:
Chart.yaml snippet of deployed chart:
description: 'deployment.redacted.redacted.com/metadata: displayName: redacted Load Core Agent nameType: NAME namespace: redacted-loadcore-agent provides: - name: load-core-agent version: 2.1 requires:  deployOptions: skipDryRun: true '
The generated index.yaml for the local repo will look contain:
description: "deployment.redacted.redacted.com/metadata: displayName: redacted Load\
\ Core Agent nameType: NAME namespace: redacted-loadcore-agent provides:\
\ - name: load-core-agent version: "2.1 requires:  deployOptions:"
\ skipDryRun: true "
The helm virtual repo index calculation will throw the below error:
2021-07-06T19:13:54.009Z [jfrt ] [ERROR] [e6ebb3fe8b79e046] [.a.h.r.m.HelmVirtualMerger:256] [art-exec-5109 ] - Couldn't read index file in local repository test-helm-local : while parsing a block mapping
in 'reader', line 4, column 5:
- apiVersion: v2
expected <block end>, but found '<scalar>'
in 'reader', line 9, column 53:
... load-core-agent version: "2.1 requires:  deployOptions:"
at [Source: (org.jfrog.storage.binstore.common.ReaderTrackingInputStream); line: 9, column: 53] (through reference chain: org.jfrog.repomd.helm.model.HelmIndexYamlMetadata["entries"]->java.util.LinkedHashMap["load-core-agent"]->java.util.TreeSet)
Trying to add the local repo as a repo with the helm client will throw:
helm repo add test-helm http:Error: looks like "http: is not a valid chart repository or cannot be reached: error converting YAML to JSON: yaml: line 8: did not find expected key
helm.go:81: [debug] error converting YAML to JSON: yaml: line 8: did not find expected key
looks like "http: is not a valid chart repository or cannot be reached
It looks like Artifactory is adding extra "\" to the description.
Steps to reproduce:
Deploy two packages attached, and see the local repo index.yaml. Then, add the local repo to a virtual repo, and see the errors in the logs.
Artifactory does not add "\" in the generated index.yaml
None besides changing the Chart.yaml of the deployed chart