-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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: workspace folder permission & app container cannot access client API #3300
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…nt.py" This reverts commit e8556cd.
neubig
approved these changes
Aug 8, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clear enough, thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the problem that this fixes or functionality that this introduces? Does it fix any open issues?
Requires #3299 and #3301 to be merge first.
Issue 1: Workspace folder permission
In #3282, I tried to fix the dubious ownership issue by "chown" the whole mounted folder to the current
user_id
, but it raised a new issue while I was trying to fix things in #3299: When I mount a folder own by "me" with group "staff", that "chmod" will fail, possibly due to MacOS's permission management.On second thought, as long as the mounted workspace is owned by the current user "me" and the user id is set properly to the OpenDevin application, this permission issue / dubious ownership should not happen in the first place. I think the original issue probably arises when i try have the agent running as root and commit to my workspace (owned by "me").
Issue 2: After build OpenDevin
app
docker application, the backend cannot access the runtime APIBecause It will try to access
localhost:{port}
, instead ofhost.docker.internal:{port}
.Give a summary of what the PR does, explaining any non-trivial design decisions
Fix issue 1
/workspace
does not exists (in the case of mounted workspace, we should assume/workspace
is already there)pytest
will create tmp dir owned by root, while the UID we send to OpenDevin is actually the current user "me", which cause weird behavior of the test.Fix issue 2
app
dockerOther references