Skip to content

fix: persist hostname-override flag to context#630

Merged
miparnisari merged 1 commit intoauthzed:mainfrom
ivanauth:fix/issue-593-persist-hostname-override
Mar 30, 2026
Merged

fix: persist hostname-override flag to context#630
miparnisari merged 1 commit intoauthzed:mainfrom
ivanauth:fix/issue-593-persist-hostname-override

Conversation

@ivanauth
Copy link
Copy Markdown
Contributor

Fixes #593

Persists --hostname-override to zed context storage, matching the existing pattern for --insecure and --no-verify-ca. CLI flag still overrides stored value when explicitly set.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 20, 2026

Codecov Report

❌ Patch coverage is 53.57143% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 42.29%. Comparing base (7fde559) to head (696541c).

Files with missing lines Patch % Lines
internal/cmd/context.go 0.00% 8 Missing ⚠️
internal/client/client.go 58.33% 3 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #630      +/-   ##
==========================================
- Coverage   42.31%   42.29%   -0.02%     
==========================================
  Files          38       38              
  Lines        6102     6109       +7     
==========================================
+ Hits         2582     2584       +2     
- Misses       3260     3264       +4     
- Partials      260      261       +1     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@miparnisari miparnisari left a comment

Choose a reason for hiding this comment

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

  • Please rebase off main
  • Please amend the following unit tests: TestTokenWithOverride and TestTokenAnyValue

otherwise, LGTM

@ivanauth ivanauth force-pushed the fix/issue-593-persist-hostname-override branch from 3681aa7 to 162236a Compare March 30, 2026 14:00
@ivanauth
Copy link
Copy Markdown
Contributor Author

Done, thanks!

Copy link
Copy Markdown
Contributor Author

@ivanauth ivanauth left a comment

Choose a reason for hiding this comment

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

Rebased onto main and added HostnameOverride coverage to both TestTokenWithOverride and TestTokenAnyValue. Ready for re-review.

The --hostname-override flag was not persisted when setting a context,
requiring users to pass it on every command. This adds hostname-override
to the Token struct and saves it alongside other TLS-related flags like
--insecure and --no-verify-ca during `zed context set`. Subcommands now
read hostname-override from the stored context, with CLI flags still
taking precedence when explicitly provided.

Signed-off-by: ivanauth <ivan@authzed.com>
@ivanauth ivanauth force-pushed the fix/issue-593-persist-hostname-override branch from 162236a to 696541c Compare March 30, 2026 17:33
@miparnisari miparnisari merged commit 660dcd5 into authzed:main Mar 30, 2026
12 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Add hostname-override flag to root command to support overriding SNI hostname

3 participants