Skip to content

refactor: use generic request for actions calls #624

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

Merged
merged 2 commits into from
Mar 18, 2025
Merged

Conversation

jooola
Copy link
Member

@jooola jooola commented Mar 17, 2025

No description provided.

@jooola jooola requested a review from a team as a code owner March 17, 2025 08:38
Copy link

codecov bot commented Mar 17, 2025

Codecov Report

Attention: Patch coverage is 90.34091% with 17 lines in your changes missing coverage. Please review.

Project coverage is 77.33%. Comparing base (88352df) to head (03929a1).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
hcloud/volume.go 0.00% 9 Missing ⚠️
hcloud/server.go 92.94% 6 Missing ⚠️
hcloud/primary_ip.go 84.61% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #624      +/-   ##
==========================================
+ Coverage   71.98%   77.33%   +5.34%     
==========================================
  Files          49       49              
  Lines        4348     3971     -377     
==========================================
- Hits         3130     3071      -59     
+ Misses        909      685     -224     
+ Partials      309      215      -94     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@apricote apricote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few calls where the wrong schema struct is being used. All of them were already wrong before this commit, I just noticed it while reviewing, not necessary to fix in this PR.


var respBody PrimaryIPAssignResult
resp, err := c.client.Do(req, &respBody)
respBody, resp, err := postRequest[PrimaryIPAssignResult](ctx, c.client, reqPath, nil)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This uses a PrimaryIPAssignResult but its the Unassign call.

@jooola jooola merged commit d6420c1 into main Mar 18, 2025
5 checks passed
@jooola jooola deleted the generic-actions branch March 18, 2025 09:55
jooola added a commit that referenced this pull request Mar 19, 2025
This does not include the fixes for the primary ip client, because those
changes are more involved.

Related to the comments in #624
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

Successfully merging this pull request may close these issues.

2 participants