-
Notifications
You must be signed in to change notification settings - Fork 28
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 329 #331
base: main
Are you sure you want to change the base?
Fix issue 329 #331
Conversation
please rewrite your PR description according to the PR template we wrote and ensure all the tests and checks are working locally |
Hi @ashug06. Unfortunately your changes don't address #329. The issue is that for containerized backends (such as the Docker backend), we need a way for it to The way |
let status = status.with_context(|| { | ||
format!("failed to wait for termination of task child process {id}") | ||
})?; | ||
let status = status.with_context(|| { |
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.
There should be no changes to the local backend to fix #329.
@@ -2,7 +2,7 @@ | |||
## Note that due an inexact path separator replacement in the tests, | |||
## error messages in the baseline will show `/<escape>` instead of `\<escape>`. | |||
|
|||
version 1.1 | |||
|
|||
version 1.1 |
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.
Likewise, this file should not have any changes; I suspect your git
or editor are automatically changing the line endings in this file, but it is intentionally using a mix of new lines to test a lint.
If this is coming from git
, I suspect we are missing a .gitattributes
in the test directory to ignore 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 it happened to me as well
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.
I put up #338 to exclude the test from autocrlf
behavior, which I suspect is the problem here.
Hi @peterhuene, Thank you for your feedback! I now understand that the required fix should involve handling chown inside the containerized backend rather than modifying local.rs. I appreciate the reference to miniwdl's approach, and I'll look into implementing a similar solution. |
Hey @peterhuene, I'm trying to build the project, but I'm getting an error because the nodes-api branch is missing in bollard. Could you clarify which version or branch I should use? |
Hi @ashug06. That branch was deleted in favor of updating the patch in To get things building again, rebase your branch off of |
Hi @peterhuene, based on your feedback, I have implemented a chown_output_directory function to change the ownership of the output directory inside the container before removal. I plan to call this function before remove_container() in the relevant places. Does this approach align with what you had in mind, or would you suggest any modifications? |
Hi @peterhuene, I have updated remove_container to call chown_output_directory before removal. Let me know if any further modifications are needed! |
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.
Hi @ashug06. I don't see your changes to the docker backend that I was expecting. Is your local branch pushed to your remote repo?
bollard
Outdated
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.
We should not have a bollard submodule.
What patches to bollard did you need to implement this PR? bollard
itself should have everything we need to make this PR work (we also only use bollard
transitively through crankshaft
).
My expectations around an implementation here is that the docker backend in wdl-engine
gets called once at the end of evaluation to perform a "cleanup" operation, and the cleanup operation for the docker backend would be to run a task that does a recursive chown
on the entire output directory (thus we only ever do this once per run).
git
Outdated
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.
This PR shouldn't have a git
file.
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.
Hi Peter,
Thanks for the review! I’ll check why my changes to the Docker backend aren’t visible and ensure they are pushed properly.
Regarding the bollard submodule, I didn’t intend to introduce it as a submodule—I'll remove it if it's unnecessary. My modifications were focused on implementing the cleanup operation, but I’ll revisit how bollard is used via crankshaft.
For the cleanup operation, I now understand that it should be executed once at the end of evaluation to recursively chown the entire output directory. I’ll adjust my implementation accordingly.
I also noticed the accidental inclusion of a .git file—I'll remove it in the next update.
Thanks for the guidance! I’ll update the PR soon.
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.
I noticed there's no existing Docker backend in wdl-engine/src/backend/. I created docker.rs with a cleanup function that runs chown -R inside a minimal container at the end of execution. Is this approach correct?
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.
Duplicating from my slack message:
The docker backend is implemented via
src/crankshaft.rs
(crankshaft
is the library that's abstracting task execution and will support more than just docker soon). We should probably add a cleanup method to theTaskExecutionBackend
trait that is called whenever the engine finishes top-level evaluation (upon success or failure) and the crankshaft backend, if configured to use Docker, should perform the chown
136d955
to
3dc8137
Compare
Summary
This PR fixes issue #329 by making necessary updates to
local.rs
and formattingsource.wdl
.Changes
wdl-engine/src/backend/local.rs
: (describe the change if you understand it)wdl-lint/tests/lints/inconsistent-newlines/source.wdl
to maintain consistency.Notes