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

[Resolver][Bug]: Fix success list to str representation bug #5351

Merged
merged 6 commits into from
Dec 3, 2024

Conversation

malhotra5
Copy link
Contributor

@malhotra5 malhotra5 commented Dec 1, 2024

End-user friendly description of the problem this fixes or functionality that this introduces

  • Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below

Give a summary of what the PR does, explaining any non-trivial design decisions

Instead of using json.dumps we were utilizing "\n".join() to serialize success explanations. This caused downstream problems when attempting deserialize them using json.loads().


Link of any specific issues this addresses

#5234


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:bc27a16-nikolaik   --name openhands-app-bc27a16   docker.all-hands.dev/all-hands-ai/openhands:bc27a16

@malhotra5 malhotra5 requested a review from enyst December 1, 2024 19:41
@malhotra5 malhotra5 requested a review from enyst December 1, 2024 21:25
@@ -334,6 +334,23 @@ def reply_to_comment(github_token: str, comment_id: str, reply: str):
response.raise_for_status()


def send_comment_msg(base_url: str, issue_number: int, github_token: str, msg: str):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just a nit: could we add a docstring?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@openhands-agent can you add a docstring to this new function? Note how the other docstrings are in the file, and keep the same style!

In particular, add the args without types.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@malhotra5 this is funny, it added a docstring to another function 😂 1e26cf0

Copy link
Collaborator

Choose a reason for hiding this comment

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

@openhands-agent good job, now add a docstring to the new send_comment_msg function. Similarly, look how other docstrings are in the file, and keep the same style!

Copy link
Collaborator

@enyst enyst left a comment

Choose a reason for hiding this comment

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

Thank you for this fix, I hated the issue. I did have openhands fix this for me in my playground repo, but I am not sure among many changes if it even did exactly this - don't think so - just fallback processing. 😅 🤷

I'm not that familiar with the resolver code, but this makes perfect sense and FWIW it looks good to me. I'd love it if @neubig could take a look though.

Copy link
Contributor

github-actions bot commented Dec 2, 2024

OpenHands started fixing the pr! You can monitor the progress here.

@openhands-agent
Copy link
Contributor

New OpenHands update

Copy link
Contributor

github-actions bot commented Dec 2, 2024

The workflow to fix this issue encountered an error. Please check the workflow logs for more information.

Copy link
Contributor

github-actions bot commented Dec 2, 2024

OpenHands started fixing the pr! You can monitor the progress here.

@openhands-agent
Copy link
Contributor

New OpenHands update

Copy link
Contributor

github-actions bot commented Dec 2, 2024

The workflow to fix this issue encountered an error. Please check the workflow logs for more information.

@malhotra5 malhotra5 requested a review from neubig December 2, 2024 03:11
Copy link
Collaborator

@xingyaoww xingyaoww 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 bf2688d into main Dec 3, 2024
13 checks passed
@malhotra5 malhotra5 deleted the bug/resolver-json-errors branch December 3, 2024 16:12
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.

4 participants