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

[chore] Remove new-from-rev parameter from golangci-lint #21266

Merged
merged 38 commits into from
Dec 5, 2023

Conversation

KSerrania
Copy link
Contributor

@KSerrania KSerrania commented Dec 4, 2023

What does this PR do?

Removes the new-from-rev parameter from golangci-lint.
Adds linter placeholders for all failures reported by revive and other linters.

Motivation

While it temporarily enabled us to re-enable the revive linter a few months ago, the new-from-rev parameter has harmful side-effects:

  • it hides new linter failures on files not modified after the new-from-rev commit, when these linter failures are due to changes in other files (eg. a function becomes unused).
  • it makes the linter unpredictable: if there is an operation that the underlying git diff cannot track well, like moving & modifying a file, then golangci-lint would throw linter errors that are unrelated to the changes.

Additional Notes

  • Each team has one commit for revive, and one commit for other linters (if applicable). Feel free to only review commits for your team.
  • Note for Agent Shared Components: gofmt also forced a change in pkg/gohai/cpu/lscpu_linux_arm64.go, please verify that it is okay to keep.

Possible Drawbacks / Trade-offs

n/a

Describe how to test/QA your changes

Run a full pipeline, verify that it passes.

Reviewer's Checklist

  • If known, an appropriate milestone has been selected; otherwise the Triage milestone is set.
  • Use the major_change label if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote.
  • A release note has been added or the changelog/no-changelog label has been applied.
  • Changed code has automated tests for its functionality.
  • Adequate QA/testing plan information is provided if the qa/skip-qa label is not applied.
  • At least one team/.. label has been applied, indicating the team(s) that should QA this change.
  • If applicable, docs team has been notified or an issue has been opened on the documentation repo.
  • If applicable, the need-change/operator and need-change/helm labels have been applied.
  • If applicable, the k8s/<min-version> label, indicating the lowest Kubernetes version compatible with this feature.
  • If applicable, the config template has been updated.

@KSerrania KSerrania added changelog/no-changelog [deprecated] team/agent-platform [deprecated] qa/skip-qa - use other qa/ labels [DEPRECATED] Please use qa/done or qa/no-code-change to skip creating a QA card labels Dec 4, 2023
@KSerrania KSerrania force-pushed the kserrania/revive-linter-fixes branch from 6da8887 to 618a3b2 Compare December 4, 2023 11:50
@KSerrania KSerrania added this to the 7.51.0 milestone Dec 4, 2023
@KSerrania KSerrania force-pushed the kserrania/revive-linter-fixes branch from 618a3b2 to 3a0778e Compare December 4, 2023 13:05
@pr-commenter
Copy link

pr-commenter bot commented Dec 4, 2023

Bloop Bleep... Dogbot Here

Regression Detector Results

Run ID: d4450b23-ab73-4ee8-825d-25324f72da97
Baseline: 193a36e
Comparison: 3a0778e
Total CPUs: 7

Explanation

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

No interesting changes in experiment optimization goals with confidence ≥ 90.00% and |Δ mean %| ≥ 5.00%.

Experiments that were not declared erratic but were detected as being so, coefficient of variation cutoff 0.10:

experiment goal Δ mean % Δ mean % CI confidence
otel_to_otel_logs ingress throughput -0.61 [-2.21, +0.99] 47.01%

Fine details of change detection per experiment.

experiment goal Δ mean % Δ mean % CI confidence
file_tree egress throughput +0.10 [-1.72, +1.91] 7.01%
dogstatsd_string_interner_8MiB_1k ingress throughput +0.01 [-0.09, +0.11] 12.46%
dogstatsd_string_interner_8MiB_100k ingress throughput +0.01 [-0.04, +0.05] 23.71%
file_to_blackhole egress throughput +0.00 [-1.01, +1.02] 0.21%
dogstatsd_string_interner_64MiB_100 ingress throughput +0.00 [-0.14, +0.14] 0.17%
dogstatsd_string_interner_8MiB_100 ingress throughput +0.00 [-0.13, +0.13] 0.09%
dogstatsd_string_interner_128MiB_100 ingress throughput -0.00 [-0.14, +0.14] 0.37%
dogstatsd_string_interner_128MiB_1k ingress throughput -0.00 [-0.14, +0.14] 0.70%
dogstatsd_string_interner_64MiB_1k ingress throughput -0.00 [-0.13, +0.13] 1.38%
idle egress throughput -0.00 [-2.38, +2.37] 0.12%
dogstatsd_string_interner_8MiB_10k ingress throughput -0.00 [-0.08, +0.08] 4.39%
dogstatsd_string_interner_8MiB_50k ingress throughput -0.01 [-0.05, +0.03] 26.15%
trace_agent_json ingress throughput -0.02 [-0.15, +0.12] 16.48%
tcp_dd_logs_filter_exclude ingress throughput -0.02 [-0.19, +0.15] 17.99%
trace_agent_msgpack ingress throughput -0.03 [-0.16, +0.10] 31.71%
uds_dogstatsd_to_api ingress throughput -0.04 [-0.22, +0.14] 27.47%
otel_to_otel_logs ingress throughput -0.61 [-2.21, +0.99] 47.01%
tcp_syslog_to_blackhole ingress throughput -0.96 [-1.09, -0.84] 100.00%

@KSerrania KSerrania marked this pull request as ready for review December 4, 2023 16:29
@KSerrania KSerrania requested review from a team as code owners December 4, 2023 16:29
@KSerrania KSerrania force-pushed the kserrania/revive-linter-fixes branch from 2ba30b0 to 638053d Compare December 5, 2023 16:06
@KSerrania KSerrania force-pushed the kserrania/revive-linter-fixes branch from 638053d to ce06c74 Compare December 5, 2023 16:22
@KSerrania
Copy link
Contributor Author

/merge -m rebase

@dd-devflow
Copy link

dd-devflow bot commented Dec 5, 2023

🚂 MergeQueue

Pull request added to the queue.

This build is next! (estimated merge in less than 45m)

you can cancel this operation by commenting your pull request with /merge -c!

@dd-mergequeue dd-mergequeue bot merged commit e187251 into main Dec 5, 2023
204 of 207 checks passed
@dd-mergequeue dd-mergequeue bot deleted the kserrania/revive-linter-fixes branch December 5, 2023 18:03
@KevinFairise2 KevinFairise2 restored the kserrania/revive-linter-fixes branch January 11, 2024 16:34
@dd-devflow dd-devflow bot deleted the kserrania/revive-linter-fixes branch June 6, 2024 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.