Skip to content

bug: semctl api --field boolean values sent as strings, not JSON booleans #74

Description

@Moep90

Version: v0.6.0

Repro steps

semctl api POST /project/2/tasks --field template_id=1 --field dry_run=true

Expected behavior

dry_run is sent as JSON boolean true in the request body, causing Semaphore to treat the task as a dry run.

Actual behavior

The task ran fully to completion (status: success, full playbook executed). The dry_run field either gets coerced to the string "true" instead of the boolean true, or is silently dropped. Either way, --field is unsafe for boolean parameters.

This was confirmed by triggering 3 real task runs (IDs 23875, 23876, 23878) on template 1 during testing — none were treated as dry runs.

Impact

Any boolean API field passed via --field key=true or --field key=false will not behave as expected. Users who rely on semctl api as a low-level escape hatch cannot safely pass boolean parameters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions