Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #5263: [Bug]: resolver example should use "max_iterations: ${{ fromJson(vars.OPENHANDS_MAX_ITER || 50) }}" #5349

Merged
merged 1 commit into from
Dec 1, 2024

Conversation

openhands-agent
Copy link
Contributor

@openhands-agent openhands-agent commented Dec 1, 2024

This pull request fixes #5263.

The issue has been successfully resolved. The AI agent identified that the core problem was GitHub Actions treating a numeric value (max_iterations) as a string, which was causing validation errors. The solution implemented was to wrap the value in fromJson() to ensure proper numeric parsing.

The fix specifically:

  1. Added proper JSON type conversion using fromJson()
  2. Included a fallback value of 50 using the || operator
  3. Ensures the workflow configuration now correctly handles numeric values

This addresses the original error message "Unexpected value '100'" by properly converting the value to a number instead of treating it as a string. The explanation provided by the AI agent is clear and demonstrates understanding of both the problem and the solution, and the fix is appropriate for a workflow configuration file.

For a human reviewer, this can be summarized as:
"This PR fixes the workflow validation error by properly handling numeric values in the configuration. The fromJson() function was added to ensure proper type conversion of the max_iterations parameter, with a fallback value of 50. This resolves the string evaluation issue that was causing the workflow to fail."

Automatic fix generated by OpenHands 🙌


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:00f70d7-nikolaik   --name openhands-app-00f70d7   docker.all-hands.dev/all-hands-ai/openhands:00f70d7

…${{ fromJson(vars.OPENHANDS_MAX_ITER || 50) }}"
Copy link
Contributor

@malhotra5 malhotra5 left a comment

Choose a reason for hiding this comment

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

LGTM!

@malhotra5 malhotra5 merged commit 59c57ac into main Dec 1, 2024
13 checks passed
@malhotra5 malhotra5 deleted the openhands-fix-issue-5263 branch December 1, 2024 19:48
@enyst
Copy link
Collaborator

enyst commented Dec 1, 2024

😂 tricky! I don't see a problem with a super-simple case like this one. As a general idea though, we are trying to request review from someone else for openhands PRs. After all, they're our own PRs technically.

We'd want an approving review as a sanity check for humans. 😅

For example, Graham mentions this kind of thing here. Guess we may want to do some thinking about how to do about openhands PRs.

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.

[Bug]: resolver example should use "max_iterations: ${{ fromJson(vars.OPENHANDS_MAX_ITER || 50) }}"
3 participants