Skip to content

Remove redundant 'Apply workflow_dispatch overrides' step from build workflows#660

Draft
simonrosenberg wants to merge 1 commit into
mainfrom
openhands/fix-565-remove-workflow-dispatch-overrides
Draft

Remove redundant 'Apply workflow_dispatch overrides' step from build workflows#660
simonrosenberg wants to merge 1 commit into
mainfrom
openhands/fix-565-remove-workflow-dispatch-overrides

Conversation

@simonrosenberg
Copy link
Copy Markdown
Collaborator

Summary

This PR removes the redundant "Apply workflow_dispatch overrides" step from build workflows by replacing hardcoded env defaults with ${{ inputs.X || 'default' }} expressions.

Fixes #565

Changes

Pattern Applied

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' }}

This works because:

  • For workflow_dispatch: the input value is used directly
  • For pull_request_target: inputs are empty so the || fallback applies

Workflows Updated

  • .github/workflows/build-swebench-images.yml
  • .github/workflows/build-commit0-images.yml
  • .github/workflows/build-multiswebench-images.yml
  • .github/workflows/build-swebenchmultimodal-images.yml
  • .github/workflows/build-swegym-images.yml
  • .github/workflows/build-swesmith-images.yml

Additional Cleanup

Also removes unused env vars that were defined but never referenced:

  • BUILD_BATCH_SIZE
  • BUILDKIT_PRUNE_KEEP_GB
  • BUILDKIT_PRUNE_THRESHOLD_PCT

These were present in build-multiswebench-images.yml, build-swegym-images.yml, and build-swesmith-images.yml.

Testing

This is a workflow configuration change. The behavior should be equivalent for both trigger types:

  • Workflow dispatch will use input values with fallback defaults
  • PR trigger will use fallback defaults (since inputs are empty), then the "Set N_LIMIT based on label" step will override for PR-specific behavior

This PR was created by an AI assistant (OpenHands) on behalf of the user.

@simonrosenberg can click here to continue refining the PR

…workflows

Replace hardcoded env defaults with `${{ inputs.X || 'default' }}` expressions
so both workflow_dispatch and pull_request_target triggers work without a
separate override step.

For pull_request_target events, inputs are empty so the fallback applies.
For workflow_dispatch events, the input value is used directly.

Also removes unused env vars (BUILD_BATCH_SIZE, BUILDKIT_PRUNE_KEEP_GB,
BUILDKIT_PRUNE_THRESHOLD_PCT) from workflows where they were defined but
never referenced.

Fixes #565

Co-authored-by: openhands <openhands@all-hands.dev>
@simonrosenberg simonrosenberg force-pushed the openhands/fix-565-remove-workflow-dispatch-overrides branch from 74022ea to 7f48ef8 Compare April 13, 2026 14:31
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.

Remove redundant 'Apply workflow_dispatch overrides' step from build workflows

2 participants