-
Notifications
You must be signed in to change notification settings - Fork 7.1k
feat: add analytics config setting #8350
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
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
7602905 to
bc086d6
Compare
|
@codex review |
bc086d6 to
c35195c
Compare
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Could we make this a bit more complex? I expect we will have multiple fields in there in the end so could we have something like: And btw we are not allowed to enable it by default in some juridiction so we must check with legal (I already sent the request but no answer yet) |
|
@jif-oai rebased and updated as per your suggestion! How does it look? |
ee05a22 to
40c82b9
Compare
test(config): cover [analytics].enabled in fixture
40c82b9 to
03f7260
Compare
jif-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.
lgtm
| .as_ref() | ||
| .and_then(|a| a.enabled) | ||
| .or(cfg.analytics.as_ref().and_then(|a| a.enabled)) | ||
| .unwrap_or(true), |
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.
I guess this has been validated with legal right?
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.
Yup, I'll ping you in Slack with more details
codex-rs/core/src/config/types.rs
Outdated
| /// Analytics settings loaded from config.toml. Fields are optional so we can apply defaults. | ||
| #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)] | ||
| pub struct AnalyticsConfigToml { | ||
| /// When `false`, disables analytics across Codex product surfaces in this machine. |
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.
"in this profile" ?
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.
| /// When `false`, disables analytics across Codex product surfaces in this machine. | |
| /// When `false`, disables analytics across Codex product surfaces in this profile. |
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.
Done
| approval_policy = "on-failure" | ||
| [profiles.zdr.analytics] | ||
| enabled = false |
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.
Can you add a test to make sure this work?
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.
It's there! see test_precedence_fixture_with_zdr_profile below, it checks that analytics is false
No description provided.