docker-machine-driver-hetzner icon indicating copy to clipboard operation
docker-machine-driver-hetzner copied to clipboard

Hetzner: Cloud API Change: GET /actions endpoint

Open ghost opened this issue 2 years ago • 3 comments

Hi 👋🏼

Yesterday we noticed this message (hetzner cloud changelog) in the Hetzner Cloud interface, and it seems they already updated the hcloud-go.

I am not familiar with upgrading dependencies in golang but I will create a PR shortly that updates hcloud-go from v2.1.1 to v2.2.0 (there was no other release in between) in the hopes that it 'just' works. I ran go get github.com/hetznercloud/[email protected] and go mod tidy afterwards which updated the go.mod and go.sum file entries as I expected.

I don't know if this breaks anything though.

ghost avatar Sep 19 '23 09:09 ghost

I have merged #113 now. I also adapted the old homebrew waitForAction to use WatchProgress as defined by hcloud's ActionClient.

~Apparently, the implementation still uses the (apparently deprecated-for-removal) plain /actions endpoint. I could use resource-specific action clients, as all actions we care about are actually of type Server.Action. But for now I would stay on the more convenient WatchProgress function, as I think this is the 'most supported' way and should cause less breakage in the future~

~If the driver really were to fail on Oct. 1, we could still roll back my latest commit, use the version of your PR and replace the client call in waitForAction with the corresponding server action. But for now and given how it is communicated, I doubt Hetzner would break their own code.~

EDIT: Apparently there was a changelog entry that completely went over my head. Given that the helper methods were implemented only after this change and the deprecation notice only names GET /actions (i.e. not GET /actions/{id}), I'm now positive this should work. Sorry for the time loops taken, I now think your PR would have been sufficient.

JonasProgrammer avatar Sep 24 '23 00:09 JonasProgrammer

Absolutely no worries, that was kind of what I was thinking. That it maybe just works by using the recent hcloud. Thank you for taking a look 🙇🏼

ghost avatar Sep 25 '23 07:09 ghost