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

[Bug]: Github Resolver cannot push to the SAME PR #5183

Closed
1 task done
xingyaoww opened this issue Nov 21, 2024 · 6 comments
Closed
1 task done

[Bug]: Github Resolver cannot push to the SAME PR #5183

xingyaoww opened this issue Nov 21, 2024 · 6 comments
Labels
bug Something isn't working resolver Related to OpenHands Resolver Stale Inactive for 30 days

Comments

@xingyaoww
Copy link
Collaborator

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Describe the bug and reproduction steps

It happens when you follow-up a comment on a PR: #5181

See detailed Github action: https://github.com/All-Hands-AI/OpenHands/actions/runs/11959703763/job/33342073747#step:13:375

OpenHands Installation

Docker command in README

OpenHands Version

No response

Operating System

None

Logs, Errors, Screenshots, and Additional Context

No response

@xingyaoww xingyaoww added the bug Something isn't working label Nov 21, 2024
@enyst
Copy link
Collaborator

enyst commented Dec 4, 2024

The relevant log shows that since 'git push' is not done by the agent, but by the resolver post-processing, it fails when the branch was modified on the remote:

Log

packages/openhands/resolver/send_pull_request.py", line 636, in main
process_single_issue(
File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/openhands/resolver/send_pull_request.py", line 478, in process_single_issue
update_existing_pull_request(
File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/openhands/resolver/send_pull_request.py", line 375, in update_existing_pull_request
Error: raise RuntimeError('Failed to push changes to the remote repository')

ERROR:root:<class 'RuntimeError'>: Failed to push changes to the remote repository
Copied repository to output/patches/pr_5181
Patch applied successfully
Git user configured as openhands
Error pushing changes: To https://github.com/All-Hands-AI/OpenHands.git
! [rejected] openhands-fix-issue-5179 -> openhands-fix-issue-5179 (fetch first)
error: failed to push some refs to 'https://github.com/All-Hands-AI/OpenHands.git'
hint: Updates were rejected because the remote contains work that you do not
hint: have locally. This is usually caused by another repository pushing to
hint: the same ref. If you want to integrate the remote changes, use
hint: 'git pull' before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

@xingyaoww
Copy link
Collaborator Author

@openhands-agent Check the issue history - Maybe you should modify the code to automatically git pull before git push - if it fails due to exit code non-zero, be sure to send an error message via Github comment.

Copy link
Contributor

github-actions bot commented Dec 4, 2024

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

@xingyaoww xingyaoww added fix-me Attempt to fix this issue with OpenHands and removed fix-me Attempt to fix this issue with OpenHands labels Dec 4, 2024
@All-Hands-AI All-Hands-AI deleted a comment from github-actions bot Dec 4, 2024
@mamoodi mamoodi added the resolver Related to OpenHands Resolver label Dec 5, 2024
Copy link
Contributor

github-actions bot commented Jan 5, 2025

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale Inactive for 30 days label Jan 5, 2025
@enyst enyst removed the Stale Inactive for 30 days label Jan 5, 2025
Copy link
Contributor

github-actions bot commented Feb 5, 2025

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale Inactive for 30 days label Feb 5, 2025
Copy link
Contributor

This issue was closed because it has been stalled for over 30 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolver Related to OpenHands Resolver Stale Inactive for 30 days
Projects
None yet
Development

No branches or pull requests

3 participants