Koyeb-cli 400 error when updating deployment

Getting this error when trying to update a deployment:
koyeb services update scratch/test-api-client --docker “docker.io/cchanhy/kortex:scale
:cross_mark: Error while updating the service `scratch/test-api-client`: the Koyeb API returned an error 400: Validation error

:magnifying_glass_tilted_right: Additional details
Field definition.scalings.0.targets.0: you have to specify deep sleep idle delay

:hospital: How to solve the issue?
Fix the request, and try again

:eleven_thirty: The original error was:
400 Bad Request

I believe this is because the koyeb-cli actually pulls the existing settings using koyeb-api-client-go, mergest them with the requested updates, then puts the entire config again. Except it looks like the api client is out of date with the actual api, so some fields are missing (I’m currently working around using the api directly, but it’s kind of a pain because the api PATCH acts like a PUT).

I have a pull request up which I think fixes it. If you could review and merge if it is correct it would be much appreciated: Add deep_sleep_value and light_sleep_value to sleep_idle_delay by CChanHY · Pull Request #112 · koyeb/koyeb-api-client-go · GitHub

Hi, thanks for bringing this up. The repo koyep-api-client-go is auto-generated. It seems we’ve missed the generated PR. I’ve merged it now. I will test it with the CLI, and if everything works properly, I will release a new CLI version.

Thank you for reporting the issue!

1 Like