-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Support for docker steps in host environment #1674
Conversation
I'm concerned about this change, ToContainerPath is used to move fileio from readonly checkout into a scratch space under .cache. This breaks file operations of host environment if the exact workdir should be translated Seems like my tests also show this is a bad idea to remove.
I'm 100% fine with the rest of your changes. |
@shubham149 this pull request has failed checks 🛠 |
@ChristopherHX I have reverted workdir changes from this pull request. Is there a way we can set the working directory for container steps same as input working directory for host env? |
Codecov Report
@@ Coverage Diff @@
## master #1674 +/- ##
==========================================
+ Coverage 61.22% 62.73% +1.51%
==========================================
Files 46 48 +2
Lines 7141 7463 +322
==========================================
+ Hits 4372 4682 +310
+ Misses 2462 2461 -1
- Partials 307 320 +13
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
You have started to work on a very complex area of act The current design of HostEnvironment is not really compatible with docker actions..., multiple container path translations are not implemented and volume mounts of workdir won't work with stepcontainer without jobcontainer. You can use tocontainerpath of
Like used in the startjobcontainer implementation. To translate the workdir for the docker action start, there are probably more places causing issues. After the step container is created, you may need to replace some calls of jobcontainer.tocontainerpath with stepcontainer.tocontainerpath. (eventually you have to replace interface Container with ExecutionContext to get access) Addidionally you need to translate all host paths of your inputs and env's back to a docker container paths. (Currently in act, either every env uses docker paths or host paths, never both at same time in one job) |
@ChristopherHX Can we merge this PR? I have removed the workDir changes from it. If anything is pending, let me know about it. |
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.
Yes, you need another approval.
Network mode in host environment is set to container network earlier. But the container network is not present. This PR uses default as network mode in case host environment is enabled.
Also, setting working directory for container step to same as one specified in the input params.