Remove 'host-app/' prefix from User-Agent host app suffix#262
Merged
ayeshurun merged 2 commits intoJul 8, 2026
Merged
Conversation
The host-app was being appended in the format 'host-app/[app-name]/version' which is invalid. This removes the 'host-app/' prefix so the format is now '[app-name]/version' (e.g. 'fabric-azuredevops-extension/1.2.0'). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the User-Agent host application suffix format by removing the unintended host-app/ prefix when a host application is configured via environment variables, and updates tests to match the corrected header format.
Changes:
- Remove the
host-app/prefix from the host app suffix produced by_get_host_app(). - Update User-Agent-related test expectations to reflect the new suffix format.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/fabric_cli/client/fab_api_client.py |
Adjusts host app suffix construction (and related User-Agent example) to omit the host-app/ prefix. |
tests/test_core/test_fab_api_client.py |
Updates parameterized expectations and request assertions to match the corrected User-Agent suffix. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
ayeshurun
approved these changes
Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
When a host application is configured via environment variables, the CLI appends it to the User-Agent header in an invalid format:
host-app/[app-name]/version. Thehost-app/prefix is not part of the intended User-Agent token format and should be removed.Approach
Removed the
host-app/prefix from the string built in_get_host_app()so the suffix is now just the app name and optional version directly (e.g.fabric-azuredevops-extension/1.2.0).Before:
ms-fabric-cli/1.0.0 (create; Windows/10; Python/3.10.2) host-app/fabric-azuredevops-extension/1.2.0After:
ms-fabric-cli/1.0.0 (create; Windows/10; Python/3.10.2) fabric-azuredevops-extension/1.2.0Updated all related test expectations to match the corrected format.