Skip to content
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

Include minimum compatible version check to telemetry reports #6361

Closed
tsandall opened this issue Oct 30, 2023 · 0 comments · Fixed by #6475
Closed

Include minimum compatible version check to telemetry reports #6361

tsandall opened this issue Oct 30, 2023 · 0 comments · Fixed by #6475

Comments

@tsandall
Copy link
Member

It would be useful to have visibility into the adoption of the if/contains keywords that are planned as required for 1.0 as well as any other language features that have been released recently. To do this, we could extend the telemetry report to include the minimum compatible version of policies loaded into OPA. This way we can see what era of Rego people are writing policies for without disclosing anything interesting about the policies themselves. Since there are a variety of ways that policies can be loaded into OPA, we could scope them to two cases:

  1. Policies loaded via filesystem (e.g., opa run -s ./path/to/policy.rego)
  2. Policies loaded via bundles (e.g., opa run -s -c config.yaml) where bundles are configured statically or dynamically via discovery config

Policies loaded via the v1/policies API are out of scope.

I think it should be possible to handle both of these by sending the telemetry report in a separate goroutine here. Note, we need to send the report asynchronously w.r.t. the onCommit function because we can't block the server waiting while waiting for the response. I think we should avoid sending the telemetry report on every compile update because this could be too chatty (so the plugin manager should include logic to send the report at most once per hour.) Lastly, it would be nice if OPA did not send reports unnecessarily, e.g., if a report will be sent once the policies are loaded, do not automatically send one on startup.

@ashutosh-narkar ashutosh-narkar added this to Backlog in Open Policy Agent via automation Oct 30, 2023
@ashutosh-narkar ashutosh-narkar moved this from Backlog to Planning - v0.59 (TBD) in Open Policy Agent Oct 30, 2023
@ashutosh-narkar ashutosh-narkar self-assigned this Oct 30, 2023
@ashutosh-narkar ashutosh-narkar moved this from Planning - v0.59 to In Progress in Open Policy Agent Nov 2, 2023
ashutosh-narkar added a commit to ashutosh-narkar/opa that referenced this issue Dec 13, 2023
This commit extends the telemetry report to include the
minimum compatible version of policies loaded into OPA.
This information can be helpful to get visibility into
era of Rego being adopted in the wild.

Fixes: open-policy-agent#6361

Co-authored-by: Stephan Renatus <stephan@styra.com>
Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
ashutosh-narkar added a commit to ashutosh-narkar/opa that referenced this issue Dec 13, 2023
This commit extends the telemetry report to include the
minimum compatible version of policies loaded into OPA.
This information can be helpful to get visibility into
era of Rego being adopted in the wild.

Fixes: open-policy-agent#6361

Co-authored-by: Stephan Renatus <stephan@styra.com>
Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
ashutosh-narkar added a commit to ashutosh-narkar/opa that referenced this issue Dec 14, 2023
This commit extends the telemetry report to include the
minimum compatible version of policies loaded into OPA.
This information can be helpful to get visibility into
era of Rego being adopted in the wild.

Fixes: open-policy-agent#6361

Co-authored-by: Stephan Renatus <stephan@styra.com>
Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
ashutosh-narkar added a commit to ashutosh-narkar/opa that referenced this issue Dec 15, 2023
This commit extends the telemetry report to include the
minimum compatible version of policies loaded into OPA.
This information can be helpful to get visibility into
era of Rego being adopted in the wild.

Fixes: open-policy-agent#6361

Co-authored-by: Stephan Renatus <stephan@styra.com>
Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
ashutosh-narkar added a commit to ashutosh-narkar/opa that referenced this issue Dec 18, 2023
This commit extends the telemetry report to include the
minimum compatible version of policies loaded into OPA.
This information can be helpful to get visibility into
era of Rego being adopted in the wild.

Fixes: open-policy-agent#6361

Co-authored-by: Stephan Renatus <stephan@styra.com>
Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
Open Policy Agent automation moved this from In Progress to Done Dec 18, 2023
ashutosh-narkar added a commit that referenced this issue Dec 18, 2023
This commit extends the telemetry report to include the
minimum compatible version of policies loaded into OPA.
This information can be helpful to get visibility into
era of Rego being adopted in the wild.

Fixes: #6361

Co-authored-by: Stephan Renatus <stephan@styra.com>
Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

2 participants