OpenHands / OpenHands/benchmarks

Remove redundant 'Apply workflow_dispatch overrides' step from build workflows

Open
#565 3 comments 1 reaction 1 assignee View on GitHub

@simonrosenberg is already working on this.

Since Apr 13, 2026.

openhands
Dominant language
Python
Stars
124
Forks
90
Avg merge
1d 6h
Merged PRs (30d)
1

Description

Problem

Several build workflows have a redundant pattern: an env: block with hardcoded defaults, followed by an "Apply workflow_dispatch overrides" step that copies inputs.* values into GITHUB_ENV. This override step is effectively a no-op because:

  1. For workflow_dispatch: inputs always have defaults that match the env block
  2. For pull_request_target: the step is skipped entirely (gated by if: workflow_dispatch)

The duplication is error-prone — if someone updates the input default without updating the env default (or vice versa), they silently diverge.

Fix

Replace hardcoded env defaults with ${{ inputs.X || 'default' }} expressions. For pull_request_target, inputs are empty so the || fallback applies. For workflow_dispatch, the input value is used directly. This eliminates the need for the separate override step.

This was already done for build-swtbench-images.yml in PR #555. The same cleanup should be applied to:

  • .github/workflows/build-swebench-images.yml
  • Any other workflows using this pattern

Example

Before:

env:
  DATASET: 'princeton-nlp/SWE-bench_Verified'
# ...
steps:
  - name: Apply workflow_dispatch overrides (if any)
    if: ${{ github.event_name == 'workflow_dispatch' }}
    run: |
      if [ -n "${{ inputs.dataset }}" ]; then echo "DATASET=${{ inputs.dataset }}" >> "$GITHUB_ENV"; fi

After:

env:
  DATASET: ${{ inputs.dataset || 'princeton-nlp/SWE-bench_Verified' }}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.