Skip to content

fix: normalize metrics, features and registration urls - #397

Merged
sighphyre merged 5 commits into
mainfrom
fix/normalize-urls
Jul 29, 2026
Merged

fix: normalize metrics, features and registration urls#397
sighphyre merged 5 commits into
mainfrom
fix/normalize-urls

Conversation

@sighphyre

Copy link
Copy Markdown
Member

Fixes an issue in the URL generation code for metrics, registration and features by preventing double slashes in the URL path when the user sets a Unleash server path with a trailing slash

@sighphyre
sighphyre force-pushed the fix/normalize-urls branch from 4816151 to c3a9e16 Compare July 24, 2026 07:54
@coveralls

coveralls commented Jul 24, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 30435144080

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage increased (+0.2%) to 93.428%

Details

  • Coverage increased (+0.2%) from the base build.
  • Patch coverage: 6 of 6 lines across 4 files are fully covered (100%).
  • 1 coverage regression across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

1 previously-covered line in 1 file lost coverage.

File Lines Losing Coverage Coverage
UnleashClient/utils.py 1 85.45%

Coverage Stats

Coverage Status
Relevant Lines: 776
Covered Lines: 725
Line Coverage: 93.43%
Coverage Strength: 0.93 hits per line

💛 - Coveralls

@gastonfournier gastonfournier 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.

LGTM!

@github-project-automation github-project-automation Bot moved this from New to Approved PRs in Issues and PRs Jul 24, 2026
Comment thread UnleashClient/api/urls.py Outdated
@@ -0,0 +1,2 @@
def get_url(url: str, path: str) -> str:

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.

nitpick1: Have we considered a more specific name (e.g. normalize_trailing_slash)

get suggests me either a getter from a class or a function that will fetch something over the network

Footnotes

  1. https://conventionalcomments.org/

@sighphyre
sighphyre merged commit 0c9f4d3 into main Jul 29, 2026
39 of 61 checks passed
@sighphyre
sighphyre deleted the fix/normalize-urls branch July 29, 2026 08:53
@github-project-automation github-project-automation Bot moved this from Approved PRs to Done in Issues and PRs Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants