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

Error: output directory is not empty! #358

Closed
casperdcl opened this issue Jan 10, 2022 · 7 comments · Fixed by #359
Closed

Error: output directory is not empty! #358

casperdcl opened this issue Jan 10, 2022 · 7 comments · Fixed by #359
Assignees
Labels
bug Something isn't working resource-task iterative_task TF resource ui/ux User interface/experience

Comments

@casperdcl
Copy link
Contributor

casperdcl commented Jan 10, 2022

following #340:

resource "iterative_task" "task" {
  ...
  workdir { input = "${path.root}/shared" }
}

results in Error: output directory ./shared is not empty!

We should support having output == input. It may cause edge cases/issues, but we should fix said issues later. To an end-user, output=input is a basic use case (default assumption for any pipeline). It's better to document/add FAQs for now saying "use output!=input to fix your problems."

@casperdcl casperdcl added bug Something isn't working resource-task iterative_task TF resource labels Jan 10, 2022
@casperdcl casperdcl changed the title Error: output directory . is not empty! Error: output directory is not empty! Jan 10, 2022
@0x2b3bfa0
Copy link
Member

This behavior seems intentional and especially counterintuitive.

if directory_out == "" {
directory_out = directory
}

@casperdcl
Copy link
Contributor Author

Yes there's nothing wrong with effectively if not output: output = input but the problem is subsequently insisting that output.ls() == []

@DavidGOrtega
Copy link
Contributor

Im not following this.
If the output dir exists and is not empty it fails to not overwrite it (and to not upload it also at start).
Whats the issue? what's counterintuitive?

@0x2b3bfa0
Copy link
Member

🤔 If output has to be empty, it would make more sense to remove the code mentioned on #358 (comment).

@0x2b3bfa0
Copy link
Member

Using the same directory for input and output is known to produce all kinds of issues. Should we support this mode of operation?

@DavidGOrtega
Copy link
Contributor

Using the same directory for input and output is known to produce all kinds of issues. Should we support this mode of operation?

For one task is OK, errors comes with more than one task def or reusing the task

@DavidGOrtega
Copy link
Contributor

I have created a fix, the order was not right. Now sets the output as the input if not defined and verifies the output to be OK if defined

@casperdcl casperdcl added the ui/ux User interface/experience label Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resource-task iterative_task TF resource ui/ux User interface/experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants