Skip to content

make release fails with 'Chart.yaml file is missing' when hollow leftover chart dirs exist #788

Description

@aivong-openhands

Why

make release aborts while packaging the openhands chart with Error: Chart.yaml file is missing whenever a hollow directory exists under charts/ — one that contains no Chart.yaml, only gitignored leftovers. This happens naturally after switching branches: on main, automation and runtime-api are top-level charts, but on older release branches they are embedded in charts/openhands/charts/, so checking out such a branch removes the tracked files while the gitignored vendored charts/*.tgz files keep the directories alive.

The Makefile's dependency-rewrite loop only checks that the sibling directory exists before pointing a dependency at it:

if [ -d $(CHARTDIR)/$$dep ]; then \
    yq -i "(.dependencies[] | select(.name == \"$$dep\")).repository = \"file://../$$dep\"" ...

so the empty-repository embedded-subchart deps get rewritten to file://../automation / file://../runtime-api, and helm package -u fails resolving them. The check should be [ -f $(CHARTDIR)/$$dep/Chart.yaml ], which is the actual precondition for a usable local chart.

Validation

  • Reproduced on a cloud-1.40.x backport branch: with hollow charts/automation and charts/runtime-api present (only gitignored .tgz leftovers inside), make build/openhands-0.7.85.tgz fails with Error: Chart.yaml file is missing; after deleting the two directories the same target packages successfully.

This issue was drafted by an AI agent on behalf of the user.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    reviewedThis issue has been reviewed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions