Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hetzner: Cloud API Change: GET /actions endpoint #112

Open
ghost opened this issue Sep 19, 2023 · 2 comments
Open

Hetzner: Cloud API Change: GET /actions endpoint #112

ghost opened this issue Sep 19, 2023 · 2 comments

Comments

@ghost
Copy link

ghost commented Sep 19, 2023

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.

@JonasProgrammer
Copy link
Owner

JonasProgrammer commented Sep 24, 2023

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.

@ghost
Copy link
Author

ghost commented Sep 25, 2023

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 🙇🏼

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

No branches or pull requests

1 participant