-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Allow enterprises to skip upgrade checks and messages #7213
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
Conversation
joshka-oai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: It could be worth phrasing this in the positive (check_upgrades_on_startup) rather than the negative (skip...). But not a big deal either way.
Does this need a command line option as well as a config option? (A reasonable use case for this is automated scripts running codex where you don't want the update code to be triggered, but where you also don't want to have to modify the config.
Usually, I would phrase things in the positive direction but it makes it makes it harder to deduce whether we check for updates by default. The negative also allows the CLI arg (which is a good idea) to be a flag rather than k/v. |
@joshka-oai Actually, do you think |
Yes - that's perfect. I forgot we could do that. No need for an actual flag when we can pass config directly. |
In the cli flags we get to specify what the defaults are. Clap shows these in the help text. There's also an approach for true-false params that maps In the config, we don't currently publish a json schema, but doing so would allow us to have that loaded and show what the default values are in editors that support using this for validating and documenting TOML (e.g. VSCode). |
I'm sure we can set the defaults but if one were to just see the config name, you'd then have to go read the docs or the source to know whether or not you (an average person) should enable it. With the naming in this direction, it makes it clear that "this is a thing you should opt-in to for this specific behavior". Your perspective is valid though and I don't actually feel strongly because I typically default to positive naming. Wdyt? |
I'm fine with either way - I'm just 51:49 for using a positive name for this. That is to say. No need to change unless you feel strongly about it also. I can't think of a good reason this would ever bite us. |
|
I ran into this naming issue for the animation feature flag that I recently added. I chose |
codex-rs/core/src/config/mod.rs
Outdated
| /// When `true`, checks for Codex updates on startup and surfaces update prompts. | ||
| /// Set to `false` only if your Codex updates are centrally managed. | ||
| /// Defaults to `true`. | ||
| pub check_for_upgrades_on_startup: bool, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naming nit: check_for_update_on_startup (update instead of upgrade as it's clearer IMO and also consistent the description, also singular feels cleaner but feel free to use plural).
This is a feature primarily for enterprises who centrally manage Codex updates.