Skip to content

ci: make steps into jobs to rerun them independently; enable the job to be executed manually#171

Merged
michael-chang-appier merged 2 commits intomasterfrom
michael/fix-cd-steps-rerunable
Jan 12, 2026
Merged

ci: make steps into jobs to rerun them independently; enable the job to be executed manually#171
michael-chang-appier merged 2 commits intomasterfrom
michael/fix-cd-steps-rerunable

Conversation

@michael-chang-appier
Copy link
Contributor

Release Framework Workflow Improvements

Summary

Refactored the release workflow to support both automatic PR merge triggers and manual retry capability via workflow_dispatch. This fixes issues where failed jobs could block successful ones on rerun, and allows selective job skipping during manual retries.

Changes

Problem Statement

  • Blocked reruns: If trunk deployment failed but tagging succeeded, rerunning the workflow would fail at tagging again (tag already exists), preventing redeployment
  • No workflow_dispatch support: The workflow condition used github.head_ref which is null during manual dispatch, preventing any manual reruns
  • All-or-nothing execution: All jobs ran in a single monolithic unit, making it impossible to retry individual failed jobs

Solution

  1. Separated concerns into independent jobs

    • prepare: Validates release conditions (handles both PR merge and workflow_dispatch)
      Screenshot 2026-01-12 at 16 46 47

    • setup: Runs checkout & gem setup once (avoids redundant execution)

    • create_release: Creates GitHub release & tag

    • deploy_pod_framework: Deploys framework pod

    • deploy_pod_extension: Deploys extension pod

    • enable_dependent_workflows: Enables downstream workflows (only if release created)

  2. Added idempotency checks

    • Tag existence check prevents failures when rerunning create_release
    • Sets release_created output to false if tag already exists
  3. Enabled selective job skipping

    • Three skip inputs: skip_add_tag_and_release, skip_deploy_pod_framework, skip_deploy_pod_extension
    • Works with both PR merge and manual workflow_dispatch triggers
  4. Minimized redundant execution

    • setup job runs once with checkout + gem install
    • Other jobs depend on setup, then do minimal checkout for code access
    • Parallel execution after setup completes

Workflow Execution

graph TD
    A[PR Merge or Manual Dispatch] --> B[prepare: Check Conditions]
    B -->|should_release=true| C[setup: Checkout & Gem Setup]
    C --> D{skip_add_tag_and_release?}
    D -->|No| E[create_release: Tag & Release]
    D -->|Yes| E2[Skipped]
    C --> F{skip_deploy_pod_framework?}
    F -->|No| G[deploy_pod_framework: Deploy Framework]
    F -->|Yes| G2[Skipped]
    C --> H{skip_deploy_pod_extension?}
    H -->|No| I[deploy_pod_extension: Deploy Extension]
    H -->|Yes| I2[Skipped]
    E -->|release_created=true| J[enable_dependent_workflows]
    E -->|release_created=false| J2[Skipped]
    G --> K[Slack Success/Fail Message]
    I --> K
    J --> K
    B -->|should_release=false| L[All jobs skipped]
Loading

Copy link
Collaborator

@wubai-wu-appier wubai-wu-appier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved with static review

@michael-chang-appier michael-chang-appier merged commit bc32008 into master Jan 12, 2026
1 check passed
@michael-chang-appier michael-chang-appier deleted the michael/fix-cd-steps-rerunable branch January 12, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants