Skip to content

Do not use service_name for endpoint selection. Fix: #2074 - #2176

Merged
micafer merged 5 commits into
trunkfrom
fix_openstak_endpoints
Sep 2, 2026
Merged

Do not use service_name for endpoint selection. Fix: #2074#2176
micafer merged 5 commits into
trunkfrom
fix_openstak_endpoints

Conversation

@micafer

@micafer micafer commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Do not use service_name for endpoint selection

Description

Select service catalog endpoints by service type without filtering by the default service name. The service name is only used as a filter when explicitly provided via ex_force_service_name.

Status

  • done, ready for review

Checklist (tick everything that applies)

  • Code linting (required, can be done after the PR checks)
  • Documentation
  • Tests
  • ICLA (required for bigger changes)

@codecov-commenter

codecov-commenter commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.59%. Comparing base (c26989b) to head (55abdc3).
⚠️ Report is 20 commits behind head on trunk.

Additional details and impacted files
@@            Coverage Diff             @@
##            trunk    #2176      +/-   ##
==========================================
+ Coverage   83.57%   83.59%   +0.01%     
==========================================
  Files         352      352              
  Lines       81788    81852      +64     
  Branches     8765     8771       +6     
==========================================
+ Hits        68353    68417      +64     
  Misses      10562    10562              
  Partials     2873     2873              
Files with missing lines Coverage Δ
libcloud/common/openstack.py 86.55% <100.00%> (+1.23%) ⬆️
libcloud/test/common/test_openstack.py 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

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

@micafer
micafer requested a review from tisonkun July 31, 2026 11:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The changelog entry includes trailing whitespace on a blank line, which can trigger style/lint failures and should be cleaned up before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates OpenStack endpoint selection to prefer service type (and region) without implicitly filtering by the driver’s default service_name, only applying a name filter when explicitly provided via ex_force_service_name (with a fallback to the default name only to resolve ambiguous matches).

Changes:

  • Update OpenStackBaseConnection.get_endpoint() to pass name=None by default and only apply name filtering when ex_force_service_name is set, with ambiguity-resolution fallback.
  • Add unit tests covering the new endpoint selection behavior (no default name filtering, explicit name filtering, ambiguity fallback, and no fallback when an explicit name is set).
  • Document the behavior change in CHANGES.rst.
File summaries
File Description
libcloud/test/common/test_openstack.py Adds regression tests validating endpoint selection behavior around service name filtering and ambiguity handling.
libcloud/common/openstack.py Adjusts get_endpoint() selection logic to avoid default service_name filtering, with explicit-name and ambiguity fallback handling.
CHANGES.rst Notes the OpenStack service catalog endpoint selection behavior change.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread CHANGES.rst
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@micafer
micafer merged commit 8ffc0a3 into trunk Sep 2, 2026
17 checks passed
@micafer
micafer deleted the fix_openstak_endpoints branch September 2, 2026 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants