Skip to content

GFI: Add automated task for building Helm chart dependencies in correct order #192

@itsharshvb

Description

@itsharshvb

Summary
Create a Taskfile command that automatically builds Helm chart dependencies in the correct order from child charts to parent charts.

Type
Enhancement

Context
Contributors must manually run helm dependency update for 8+ charts in specific order: leaf charts first (card-vault, web, monitoring, istio, keymanager, ucs), then dependent chart (hyperswitch-app), then umbrella chart (hyperswitch-stack). This manual process is:

  • Time-consuming: Requires running commands for 8+ different charts
  • Error-prone: Easy to miss charts or run them in wrong order
  • Knowledge-intensive: Requires understanding the dependency hierarchy
  • Friction for new contributors: Creates unnecessary barriers to getting started

The current dependency hierarchy requires this manual sequence:

# Step 1: Build leaf charts first
cd charts/incubator/hyperswitch-card-vault && helm dependency update
cd charts/incubator/hyperswitch-web && helm dependency update
cd charts/incubator/hyperswitch-monitoring && helm dependency update
cd charts/incubator/hyperswitch-istio && helm dependency update
cd charts/incubator/hyperswitch-keymanager && helm dependency update
cd charts/incubator/hyperswitch-ucs && helm dependency update

# Step 2: Build intermediate chart that depends on card-vault
cd charts/incubator/hyperswitch-app && helm dependency update

# Step 3: Build umbrella chart that depends on multiple charts
cd charts/incubator/hyperswitch-stack && helm dependency update

Starter tasks

  1. Analyze the dependency hierarchy in charts/incubator/*/Chart.yaml files
  2. Identify which charts have local dependencies vs external-only dependencies
  3. Examine existing package-incubator-hyperswitch-helm task pattern in Taskfile.yaml
  4. Create build order: independent → dependent → umbrella charts

Implementation hints

  • File to modify: Taskfile.yaml (root level)
  • Dependency order:
    1. Independent charts: hyperswitch-card-vault, hyperswitch-web, hyperswitch-monitoring, hyperswitch-istio, hyperswitch-keymanager, hyperswitch-ucs
    2. Dependent chart: hyperswitch-app (depends on card-vault)
    3. Umbrella chart: hyperswitch-stack (depends on app, web, monitoring, ucs)
  • Task structure:
update-dependencies:
  desc: "Build all Helm chart dependencies in correct order"
  cmds:
    - echo "Building Helm chart dependencies..."
    - | 
       # add the chart building logic over here 
    - echo "All dependencies built successfully\!"
  aliases:
    - ud
  • Error handling: Each helm dependency update should stop execution on failure

Acceptance criteria

  • Task update-dependencies (alias ud) added to root Taskfile.yaml
  • Dependencies built in correct order: leaf → intermediate → umbrella
  • Command task build-dependencies passes locally after fresh clone
  • All Chart.lock files are generated correctly
  • Task provides clear progress feedback for each step
  • Error handling stops execution if any chart fails to build
  • Task works from any directory (uses proper cd commands)
  • Test helm template charts/incubator/hyperswitch-stack works after running task

Resources

Mentor contact
@itsharshvb

Pre-flight

  • I read the Contributing Guide and setup
  • I searched existing issues and PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomershacktoberfestIssues created specifically for Hacktoberfest.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions