Closed cdjames closed 7 months ago
Hi!
AXIOM_URL
should point to our API, e.g. api.axiom.co
instead of app.axiom.co
.
Can you double check and report back here?
Cheers!
Hi!
AXIOM_URL
should point to our API, e.g.api.axiom.co
instead ofapp.axiom.co
.Can you double check and report back here?
Cheers!
Thanks for the tip, but unfortunately changing the URL gives the same result:
By the way, this is where I got the original URL.
Thanks for the tip, but unfortunately changing the URL gives the same result:
That is interesting. I just re-ran a couple of tests for our API and that worked flawlessly. I'll investigate further...
By the way, this is where I got the original URL.
Duh! Thanks for letting us know! /cc @thecraftman Can you update our docs?
@cdjames Could you back up any config files or env vars and start from a blank state? How does running axiom auth login
work for you?
@cdjames Could you back up any config files or env vars and start from a blank state? How does running
axiom auth login
work for you?
I'm able to run commands after I manually login using axiom auth login
. However, I was hoping to avoid that since it's annoying to check my email to log in.
I think I figured it out; after I added the "active_deployment" line to my .axiom.toml
file (based on the file created when axiom auth login
was run, I was able to connect without a manual login. I think that might be something that's missing from the online documentation.
active_deployment = "axiom"
[deployments]
[deployments.axiom]
url = "https://api.axiom.co/"
token = "xapt-XXXX"
org_id = "clavis-vsr2"
Remember you only need to be logged in once as the credentials are persisted in ~/.axiom.toml
. But if you prefer to use environment variables, that is totally fine, too.
I think you stumbled across a bug here: If CLI is explicitly configured via the environment, the active_deployment
should be ignored. The active_deployment
is only there to persist the chosen environment/deployment and in most cases there is only one.
I'll leave this issue open as there are definitely some takeaways from this.
thanks @cdjames i will update the docs and get this issue fixed.
@cdjames I just double checked some of your reports and I wonder: It sounds like you had a ~/.axiom.toml
present and environment variables? Ideally, you get rid of the config file if you don't plan on utilising that. If the env vars are present, it uses those. That should work for you without needing to wait of a fix. Also no need to set AXIOM_DEPLOYMENT
.
I'll make sure docs get updated.
@thecraftman Do you think we should get rid of the Sessions section? https://axiom.co/docs/reference/cli#session-support. I think it is a bit confusing. Most people won't use more than one deployment. Switching between orgs is possible via axiom auth switch-org
or just setting AXIOM_ORG_ID
.
We should probably highlight that a good starting point is logging in via CLI (axiom auth login
or just running axiom
when there is no config present) OR explicitly configuring via the environment, with credentials taken from the Profile
page on the App. And in that later case also hint at the correct API url.
IMHO, the config file shouldn't be documented explicitly as it isn't intended to be edited manually for nearly all use cases.
@lukasmalkmus yeah awesome we need to specify that in the docs, and when to work with the active deployments per session support specifying axiom auth login
and axiom
commands. If the user has multiple environments we need to add how they can configure that as well using the API url
thanks @cdjames a fix for this is on the way.
Ideally, you get rid of the config file if you don't plan on utilising that. If the env vars are present, it uses those.
@lukasmalkmus This is what I see if I get rid of the deployment file and try a command
Then if I replace the deployment file, the command works:
The token is the same in both cases.
@cdjames Ah I see. Should have been more specific: You should be able to run all other commands, e.g. axiom stream
, axiom ingest
, everything under the axion dataset
command without a problem.
axiom auth
is indeed special as it operates directly on the configuration file, not caring about the env setup.
@cdjames thanks the documentation for this has been updated here: https://axiom.co/docs/reference/cli
Feel free to re-open or add a new issue if you have more questions, as the original cannot decode
error was caused by setting the wrong API url. We improved the documentation on that.
All commands are failing with error "cannot decode response with unknown content type". Installed with
brew install axiom
~/.zprofile:
Shell: zsh OS: macOS 12.7.2 Go version: go1.21.6 darwin/arm64 Brew version: 4.2.5 Axiom CLI version: 0.12.0 (revision: c70256c)