Skip to content
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

Cannot unset the context JS domain #1284

Open
Zambito1 opened this issue Feb 20, 2025 · 1 comment
Open

Cannot unset the context JS domain #1284

Zambito1 opened this issue Feb 20, 2025 · 1 comment
Labels
defect Suspected defect such as a bug or regression

Comments

@Zambito1
Copy link
Contributor

Observed behavior

When you have a JS domain specified in your context, Jetstream requests are made to $JS.<domain>.<endpoint>. You can override the domain specified in the context using --js-domain. For example, the nats stream ls command will make a request to $JS.foo.API.STREAM.LIST when your selected context is in the foo JS domain, but if you specify --js-domain=bar, it will make the request to $JS.bar.API.STREAM.LIST. There is currently no way to achieve the standard, unspecified domain behavior when using a context that has a specified JS domain.

Expected behavior

--js-domain='' should unset the JS domain of the context for the current command.

Server and client version

Client: v0.1.2-0.20250217122005-9e54943a82b2

Host environment

Ubuntu 24.10

Steps to reproduce

  • Create and select a context with a Jetstream Domain specified
  • Try to interface with access unspecified domain endpoints ($JS.<endpoint>) using the nats stream subcommands, without selecting another context
@Zambito1 Zambito1 added the defect Suspected defect such as a bug or regression label Feb 20, 2025
@Zambito1
Copy link
Contributor Author

For context, the reason this is interesting to me is because I am trying to use --js-api-prefix, which I have discovered is incompatible with having a specified domain. They are incompatible because domains are a formalization of prefixes, so it doesn't make sense to have both set at the same time. This incompatibility makes being able to quickly unset the JS domain useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Suspected defect such as a bug or regression
Projects
None yet
Development

No branches or pull requests

1 participant