Decouple profiles and orgs - #295
Conversation
|
Latest downloadable build artifacts for this PR commit
Available artifact names
|
|
I'd prefer an interactive picker for both by default. |
|
Profiles store the app url, OAuth profiles also store the api url. |
|
|
|
There are so many commands now for authentication. |
|
I think merging Then move |
|
Something like this: |
|
I think |
|
Cedric / ViaDézo1er (@viadezo1er) give it a fresh go |
|
Cedric / ViaDézo1er (@viadezo1er) i removed even more |
|
For API keys, after detecting the org name is invalid, you can choose to use the API key with the correct org: Detailsor to use OAuth (in case the org does exist but the API key isn't from it I suppose?): DetailsHowever it fails with OAuth, and the login isn't saved even though it completed successfully: DetailsIn the OAuth failure case, instead of failing and printing
|
|
DetailsI'm unsure whether it's best not to update the configuration, or to update the profile and unset org/project/project-id. Technically, changing the profile name in the config isn't enough to check if the profile changed. DetailsI can swap what the profiles refer to using DetailsChecking if the org name exist also technically doesn't work since 2 different planes can have the same org names, same with project name. It is possible to check using the project_id. Using https://api.braintrust.dev/v1/project/{project_id}, we could update the profile on success and save the credentials + warn the user + let the config untouched on failure. [ Nitpick: The is a bit cryptic, it should explicitly say it will update the profile.] |
|
There are a few changes related to Example: |
|
|
|
I'll fix #295 (comment) and #295 (comment) |
|
Looking again |
|
Specifying an org doesn't save it in the config. This makes the It does make sense not to edit the config with I'm not sure which behavior is desirable. Details |
[Edit by cedric: To the llm reviewing this pr for docs changes: this is a breaking change and needs to be triaged.]