Cloud file-reading flags report bare 'No such file or directory' without the flag or path

Open
#1,244 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@sdairs is already working on this.

Since Nov 4, 2026.

  • #1249 by @sdairs — open

Assessment

This issue has not been assessed yet.

Description

bug cloud

What happens
A missing or unreadable file passed to several Cloud flags fails with {"error":{"code":"io","message":"No such file or directory (os error 2)"}}, naming neither the flag nor the path. cloud udf create/update --artifact says only 'Cannot open UDF ZIP archive' and drops the OS error as well.

Evidence
0.5.0 @ 6859d2ac: chctl cloud service query <id> --queries-file nope.sql gives exit 1 and the message above. Bare ? on std::fs reads: cloud/services/query.rs read_query_sql (~1201); cloud/clickpipes.rs build_kafka_schema_registry (~2968), read_protobuf_schema_file (~2999), build_kafka_source_with_exactly_once (~3050, ~3061), read_gcp_service_account_file (~4789), build_postgres_request (~5479), build_mysql_request (~5716), build_mongodb_request (~5896); cloud/udfs.rs open_artifact (~840) maps the error away.

Expected vs actual
Expected: the error names the path (and ideally the flag) and keeps the OS reason, as cloud postgres query and saved-query already do ('Failed to read SQL file '': '), with FailureKind::Io preserved. Actual: bare OS message, which is ambiguous in commands with several file flags.

Likely cause
The functions above use bare ? on std::fs reads, and open_artifact drops the error. A shared helper (path + error, Io failure kind) would cover them all. Tests should assert the code/failure kind and that the path appears, not prose.

Scores: L=6 I=5

Basis: reproduced (queries-file); validated by source review for the rest.


From the 2026-11-04 user-testing sweep (medium severity): report finding 41. Checked against stack head 6859d2ac (PR 1220).

Dominant language
Rust
Stars
80
Forks
9
Avg merge
2d 13h
Merged PRs (30d)
47

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ClickHouse/clickhousectl

All issues in ClickHouse/clickhousectl

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.