-
Notifications
You must be signed in to change notification settings - Fork 3
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
Workflow volume #57
Merged
Merged
Workflow volume #57
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d58eac7
add timestamps to job info
bertsky fe07565
make test: use 'run -i' to make interruptible
bertsky 12b98f4
provide PID file before ocrd-import already
bertsky 995ecc8
delegate kill signals to subprocesses
bertsky 07227b5
use /workflows volume, cp to WORKDIR/workflow.sh if workflow file ori…
bertsky eb96ea8
only docker exec -i if on tty
bertsky f49398b
add comment explaining custom workflow copy
bertsky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
File renamed without changes.
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.
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 do not understand the check here cause of Line 48 and i think that needs a comment.
So with this parameter substitution it looks like the file test Line 48 will fail or this check will not be successful.
IMO for example:
With /workflows/ocr-workflow-default.sh as
$WORKFLOW
Line 48 will successful.Line 54
"ocr-workflow-default.sh" = "/workflows/ocr-workflow-default.sh"
will fail.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.
That's precisely the point. The check trivially looks whether the realpath of the workflow starts with /workflows and thus, needs no further action. If it does not, then it gets copied into the workdir under a default name, to ensure it will be accessible.
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.
Alone that already the inquiry came from me would be worth to write comment there cause it is not easy to read (for none linux power users those for whom parameter substitution syntax has not yet become flesh and blood 😉 ) and understand why you do that here.
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.
The problem is that by this logic, I would have to second every other statement in the script with an explanatory comment. Code is also documentation in itself. Only complex / non-trivial code bits should be commented.
If you encounter an unknown construct in a (new) language, it's up to you to visit the documentation first. This expansion test is very common in shell scripts.
Feel free to make a suggestion with a better formulation (preferbly inside the condition, i.e. from the perspective after the test succeeded).
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.
Maybe a little bit simpler otherwise i would separate the variable or leave a small comment.
IMO not only knowledge was required, you also had to think outside the box. I think code should be clearly visible without thinking outside the box. But I understand your points and I can also live with the current state.
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 don't know what you mean by thinking outside the box here. This substitution test is straightforward and very common (e.g. you can see tons of these tests in every autoconf script). Your offeset-length test would also work (with plural
s
), but is less idiomatic.I just added a comment – happy now?
(You still need to unrequest changes, otherwise the PR is still blocked.)
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.
Thx sorry for the circumstances 🤐