Skip to content

Say which config client control could not find a profile in - #100

Merged
andrewchen5678 merged 2 commits into
mainfrom
control-no-profile-error
Sep 6, 2026
Merged

andrewchen5678 merged 2 commits into
mainfrom
control-no-profile-error

Conversation

@andrewchen5678

Copy link
Copy Markdown
Contributor

A bare flextunnel client control under the systemd template layout (docs/systemd.md: one <instance>.toml per unit, no client.toml) failed with:

Error: The profile has no server node id (set server_node_id in the config or pass -n).

which blames a profile that was never found — the default config does not exist at all in that layout.

What changed

  • client control now reports the three cases separately:
    • -c <file> with no server_node_id — names that file.
    • default client.toml with no server_node_id — names it, and mentions -c for another profile.
    • no config file at all — says so and lists the *.toml profiles found in ~/.config/flextunnel (exactly the set of systemd instances):
      Error: There is no client config at /home/user/.config/flextunnel/client.toml, so `client control` has no profile to attach to. Pass the profile's config with -c <file>, or attach by server id with -n <server EndpointId>.
      Profiles in /home/user/.config/flextunnel: aws.toml, macintel.toml
      
  • Dropped the .context() that wrapped genuine read/parse failures with "client control needs a profile", hiding the real reason.
  • Added config::default_client_config_path() so the default path can be named in errors.
  • docs/systemd.md: note that -c is not optional under the template layout.
  • Version bump to 0.0.77.

Testing

cargo clippy --workspace --all-targets clean; cargo test --workspace passes, including three new tui tests.

🤖 Generated with Claude Code

https://claude.ai/code/session_017qaKrfofmiVWdkXnyjubXF

Andrew Chen and others added 2 commits September 5, 2026 22:20
A bare `flextunnel client control` under the systemd template layout
(docs/systemd.md: one `<instance>.toml` per unit, no `client.toml`) failed
with "The profile has no server node id (set server_node_id in the config or
pass -n)" — blaming a profile that was never found, since the default config
does not exist at all.

Split that into the three cases it was covering: an explicit -c file with no
server_node_id (name that file), a default client.toml with no
server_node_id (name it, and mention -c), and no config file at all (say so,
and list the *.toml profiles that are in the config dir, which is exactly the
set of systemd instances).

Also drop the .context() that wrapped genuine read/parse failures with
"client control needs a profile", and expose
config::default_client_config_path() so the path can be named in the errors.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017qaKrfofmiVWdkXnyjubXF
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017qaKrfofmiVWdkXnyjubXF
@andrewchen5678
andrewchen5678 merged commit 2c5e573 into main Sep 6, 2026
4 checks passed
@andrewchen5678
andrewchen5678 deleted the control-no-profile-error branch September 6, 2026 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant