Skip to content

BUG: PUT /api/v1/darkube/apps/:id non-idempotent — wipes unset fields #8

Description

@erfanium

Problem

The Hamravesh API's PUT endpoint for app updates replaces the entire resource, not just the fields sent. Sending a partial payload silently drops fields not included:

# Only updating the disk config
curl -X PUT .../apps/xxx/ -d '{disk: {...}}'

# Result: custom_subdomain_addr → null, enable_SSL → false, plan → changed

During a single deployment session, subdomain was wiped 3 times accidentally.

Workaround

Always include custom_subdomain_addr, enable_SSL, disk, envs, and command in every PUT — effectively GET-first, then PUT with all fields merged.

Expected

Either:

  • PATCH endpoint for partial updates, or
  • PUT only overwrites fields actually present in the payload

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions