Skip to content

fix: handle string id when checking has_id_or_name #504

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 1 commit into from
Jun 10, 2025

Conversation

jooola
Copy link
Member

@jooola jooola commented Jun 10, 2025

The function did not handle the case of string ids (e.g. "2345"), we now handle this edge case.

Related to ansible-collections/hetzner.hcloud#647

Copy link

codecov bot commented Jun 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.95%. Comparing base (1bd5e98) to head (8e054c1).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #504   +/-   ##
=======================================
  Coverage   92.94%   92.95%           
=======================================
  Files          64       64           
  Lines        3020     3023    +3     
=======================================
+ Hits         2807     2810    +3     
  Misses        213      213           

☔ 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.

@jooola jooola force-pushed the handle_stirng_ids_in_has_id_or_name branch from 2e59d20 to c1ac2ac Compare June 10, 2025 15:57
The function did not handle the case of string ids (e.g. "2345"), we now handle this edge case.

Co-authored-by: Lukas Metzner <lukas.metzner@hetzner-cloud.de>
@jooola jooola force-pushed the handle_stirng_ids_in_has_id_or_name branch from c1ac2ac to 8e054c1 Compare June 10, 2025 16:00
@jooola jooola merged commit 0cc58f8 into main Jun 10, 2025
10 checks passed
@jooola jooola deleted the handle_stirng_ids_in_has_id_or_name branch June 10, 2025 16:05
jooola pushed a commit that referenced this pull request Jun 10, 2025
<!-- section-start changelog -->
### Bug Fixes

- invalid placement group id casting (#501)
- handle string id when checking has_id_or_name (#504)

<!-- section-end changelog -->

---

<details>
<summary><h4>PR by <a
href="https://github.com/apricote/releaser-pleaser">releaser-pleaser</a>
🤖</h4></summary>

If you want to modify the proposed release, add you overrides here. You
can learn more about the options in the docs.

## Release Notes

### Prefix / Start

This will be added to the start of the release notes.

```rp-prefix
```

### Suffix / End

This will be added to the end of the release notes.

```rp-suffix
```

</details>

Co-authored-by: releaser-pleaser <>
jooola pushed a commit to ansible-collections/hetzner.hcloud that referenced this pull request Jun 10, 2025
##### SUMMARY
<!--- Describe the change below, including rationale and design
decisions -->

Add a test that adding a placement group to a server by ID is
idempotent.

Verifies fix for #647

<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->

##### ISSUE TYPE
<!--- Pick one below and delete the rest -->
- Bugfix Pull Request

##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below
-->
server

##### ADDITIONAL INFORMATION

Will pass when the changes introduced in
hetznercloud/hcloud-python#504 are available in
this module.
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