Skip to content

Remove project_id config option and global flag#74

Merged
nathanjcochran merged 10 commits intomainfrom
nathan/remove-project-id
Oct 20, 2025
Merged

Remove project_id config option and global flag#74
nathanjcochran merged 10 commits intomainfrom
nathan/remove-project-id

Conversation

@nathanjcochran
Copy link
Member

@nathanjcochran nathanjcochran commented Oct 17, 2025

See Slack thread for background.

This PR removes the project_id config option and the --project-id global flag, since users cannot actually change their project id after logging in, given that the API key is scoped to a particular project. This has been confusing in the past, since the presence of the config option and flag imply that users should be able to change it post-login.

Instead, the project id is now stored in the keyring (or file fallback) along with the api key. Specifically, the value stored in the keyring/file fallback is now a JSON object with api_key and project_id fields. I think this will also give us more flexibility going forwards (e.g. if we want to support different authentication mechanicsms in a backwards-compatible way, we can store different fields in that JSON object, and handle them accordingly).

Additionally, I updated tiger auth status to display the project ID, since it will no longer be visible in the tiger config show output. I think this will hopefully make it more clear that your login is scoped to a particular project, and prevent users from erroneously trying to change the project ID after login.

Note that while this is a breaking change in terms of how the api key and project ID are stored/used, it also changes the name of the keyring entry and fallback file (to credentials), meaning that users should simply appear to be logged out after updating to this version of the CLI (and will therefore have to log in again). That's perhaps not ideal, but it at least shouldn't leave them in a weird/broken state.

@nathanjcochran nathanjcochran self-assigned this Oct 17, 2025
Copy link
Member

@murrayju murrayju left a comment

Choose a reason for hiding this comment

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

lgtm, definitely simpler and more flexible this way. Just a couple minor comments.

I didn't test anything.

Copy link
Contributor

@cevian cevian left a comment

Choose a reason for hiding this comment

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

Looks great and a valuable cleanup. Only a few nits

@nathanjcochran nathanjcochran merged commit 4305852 into main Oct 20, 2025
2 checks passed
@nathanjcochran nathanjcochran deleted the nathan/remove-project-id branch October 20, 2025 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants