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

Standard library function read_bool does not support whitespace or capitalization #701

Open
stxue1 opened this issue Jul 3, 2024 · 0 comments
Labels
interop Bears on spec compatibility

Comments

@stxue1
Copy link

stxue1 commented Jul 3, 2024

The WDL spec says read_boolean is whitespace and case insensitive when calling read_bool.

However, MiniWDK is unable to run the following workflow:

version 1.1

task read_bool {
  command <<<
  printf "  true  \n" > true_file
  printf "  FALSE  \n" > false_file
  >>>

  output {
    Boolean b1 = read_boolean("true_file")
    Boolean b2 = read_boolean("false_file")
  }
}
2024-07-02 18:01:16.858 wdl.t:read_bool task setup :: name: "read_bool", source: "/home/heaucques/Documents/wdl-conformance-tests/unit_tests/read_bool_task.wdl", line: 3, column: 1, dir: "/home/heaucques/Documents/wdl-conformance-tests/20240702_180116_read_bool", thread: 125767233647744
2024-07-02 18:01:16.997 wdl.t:read_bool docker swarm lists existing miniwdl-related services. This is normal if other miniwdl processes are running concurrently; otherwise, stale state could interfere with this run. To reset it, `docker swarm leave --force`
2024-07-02 18:01:16.998 wdl.t:read_bool docker swarm resources :: workers: 1, max_cpus: 8, max_mem_bytes: 12270206976, total_cpus: 8, total_mem_bytes: 12270206976
2024-07-02 18:01:17.008 wdl.t:read_bool docker image :: tag: "ubuntu:20.04", id: "sha256:5f5250218d28ad6612bf653eced407165dd6475a4daf9210b299fed991e172e9", RepoDigest: "ubuntu@sha256:0b897358ff6624825fb50d20ffb605ab0eaea77ced0adb8c6a4b756513dec6fc"
2024-07-02 18:01:18.762 wdl.t:read_bool docker task exit :: state: "complete", exit_code: 0
2024-07-02 18:01:19.333 wdl.t:read_bool task read_bool (/home/heaucques/Documents/wdl-conformance-tests/unit_tests/read_bool_task.wdl Ln 3 Col 1) failed :: dir: "/home/heaucques/Documents/wdl-conformance-tests/20240702_180116_read_bool", error: "EvalError", message: "function evaluation failed, read_boolean(): file content is not \"true\" or \"false\"", node: "decl-b1", pos: {"source": "/home/heaucques/Documents/wdl-conformance-tests/unit_tests/read_bool_task.wdl", "line": 10, "column": 18}
2024-07-02 18:01:19.334 miniwdl-run function evaluation failed, read_boolean(): file content is not "true" or "false" :: error: "EvalError", node: "decl-b1", pos: {"source": "/home/heaucques/Documents/wdl-conformance-tests/unit_tests/read_bool_task.wdl", "line": 10, "column": 18}, dir: "/home/heaucques/Documents/wdl-conformance-tests/20240702_180116_read_bool"

Only when removing the whitespace and lowercasing the values does the WDL work.

version 1.1

task read_bool {
  command <<<
  printf "true" > true_file
  printf "false" > false_file
  >>>

  output {
    Boolean b1 = read_boolean("true_file")
    Boolean b2 = read_boolean("false_file")
  }
}
@stxue1 stxue1 changed the title Standard library function read_bool does not properly remove whitespace Standard library function read_bool does not support whitespace or capitalization Jul 3, 2024
@mlin mlin added the interop Bears on spec compatibility label Jul 3, 2024
@github-project-automation github-project-automation bot moved this to Backlog in miniwdl Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interop Bears on spec compatibility
Projects
Status: Backlog
Development

No branches or pull requests

2 participants