Hey guys, has anyone experienced `pants package pa...
# general
s
Hey guys, has anyone experienced
pants package path/to/my/helm-chart-dir::
hanging indefinitely when performing operations on helm charts? It seems to be the case where there are dependencies on 3rd party charts:
Copy code
helm_artifact(
    name="cert-manager-chart",
    artifact="cert-manager",
    version="1.12.2",
    repository="<https://charts.jetstack.io>",
)

helm_chart(
    name="cert-manager",
    dependencies=[
        ":cert-manager-chart",
    ]
)
such as the above. However, it does not hang when packaging this one, which also has a dependency on 3rd party:
Copy code
helm_artifact(
    name="argocd-chart",
    artifact="argo-cd",
    version="5.36.3",
    repository="<https://argoproj.github.io/argo-helm>",
)

helm_chart(
    name="argocd",
    dependencies=[
        ":argocd-chart",
    ]
)
what might be the best way to debug? output:
Copy code
✗ pants package apps/argocd::    
15:53:28.23 [INFO] Wrote dist/apps.argocd/argocd/argocd-0.5.0.tgz
Built Helm chart artifact: apps.argocd/argocd/argocd-0.5.0.tgz
✗ pants package apps/cert-manager
⠒ 
⠖ 
.... indefinitely hangs
b
A good first step for debugging these is to look at the sandbox and try running the
__run.sh
script there, to see if you can reproduce it outside of pants. If so, you can edit the run script and sandbox contents to add more logging, to get to a minimal reproducer or whatever else required to understand what’s going on. https://www.pantsbuild.org/2.20/docs/using-pants/troubleshooting-common-issues#debug-tip-inspect-the-sandbox-with---keep-sandboxes
s
thanks for the tip! i’ll give it a shot
If the pants command hangs and must be aborted, then is there a sandbox environment that I can inspect?
b
Ah hmmm, good point. Maybe setting
--keep-sandboxes=always
will print out the sandbox path in advance? And/or maybe finding the command that's hanging and killing that (via the normal operating system means e.g.
pkill ...
) which will look like a failure to Pants? You can use
--level=debug
I think to have pants print out the command that it's running if you need help finding which command is hanging
s
Found the issue. It seems that if the chart that you are packaging is the same name as a subchart that is a dependency, it will hang unless the chart and subchart names are unique. not ideal
b
Ah, how annoying! Is that an issue with the underlying tool, or is it an issue with pants (or maybe an issue pants is making worse)?
s
Yes :( Not entirely sure. It might be a behaviour of helm itself. I'm digging into it and have tentatively raise an issue with pants as well.