-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Gitlab / linters: refactoring + testing #29969
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Nicolas Schweitzer <nicolas.schweitzer@datadoghq.com>
Co-authored-by: Nicolas Schweitzer <nicolas.schweitzer@datadoghq.com>
…stages from all configuration entry points
Gitlab CI Configuration ChangesModified Jobscompute_gitlab_ci_config compute_gitlab_ci_config:
artifacts:
expire_in: 1 day
paths:
- artifacts/
when: always
before_script:
- git fetch origin main
- git checkout main
- git checkout -
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/deb_arm64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
needs: []
- rules:
- - if: $CI_PIPELINE_SOURCE != "push"
- when: never
- - when: on_success
script:
- GITLAB_TOKEN=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $GITLAB_FULL_API_TOKEN)
|| exit $?; export GITLAB_TOKEN
- mkdir -p artifacts
- inv -e gitlab.compute-gitlab-ci-config --before-file artifacts/before.gitlab-ci.yml
--after-file artifacts/after.gitlab-ci.yml --diff-file artifacts/diff.gitlab-ci.yml
stage: .pre
tags:
- arch:arm64 lint_gitlab_ci lint_gitlab_ci:
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/deb_x64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
needs:
- compute_gitlab_ci_config
- rules:
- - if: $CI_PIPELINE_SOURCE != "push"
- when: never
- - changes:
- compare_to: main
- paths:
- - .gitlab-ci.yml
- - .gitlab/**/*
- - .gitlab/**/.*
- - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
- when: on_success
- - if: $CI_COMMIT_BRANCH == "main"
script:
- inv -e linter.gitlab-ci-jobs-needs-rules --config-file artifacts/after.gitlab-ci.yml
- inv -e linter.gitlab-ci-jobs-owners --config-file artifacts/after.gitlab-ci.yml
stage: .pre
tags:
- arch:amd64 lint_gitlab_ci_jobs_codeowners lint_gitlab_ci_jobs_codeowners:
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/deb_arm64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
needs: []
- rules:
- - changes:
- compare_to: main
- paths:
- - .gitlab-ci.yml
- - .gitlab/**/*
- - .gitlab/**/.*
script:
- inv -e linter.gitlab-ci-jobs-codeowners --all-files
stage: .pre
tags:
- arch:arm64 notify_gitlab_ci_changes notify_gitlab_ci_changes:
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/deb_x64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
needs:
- compute_gitlab_ci_config
rules:
- - if: $CI_PIPELINE_SOURCE != "push"
- when: never
- changes:
compare_to: main
paths:
- .gitlab-ci.yml
- .gitlab/**/*.yml
script:
- python3 -m pip install -r tasks/libs/requirements-github.txt
- GITHUB_KEY_B64=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $AGENT_GITHUB_APP key_b64)
|| exit $?; export GITHUB_KEY_B64
- GITHUB_APP_ID=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $AGENT_GITHUB_APP app_id)
|| exit $?; export GITHUB_APP_ID
- GITHUB_INSTALLATION_ID=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $AGENT_GITHUB_APP
installation_id) || exit $?; export GITHUB_INSTALLATION_ID
- echo "Using agent GitHub App"
- inv -e notify.gitlab-ci-diff --from-diff artifacts/diff.gitlab-ci.yml --pr-comment
stage: notify
tags:
- arch:amd64 Removed Jobs
Changes Summary
ℹ️ Diff available in the job log. |
[Fast Unit Tests Report] On pipeline 46280366 (CI Visibility). The following jobs did not run any unit tests: Jobs:
If you modified Go files and expected unit tests to run in these jobs, please double check the job logs. If you think tests should have been executed reach out to #agent-devx-help |
Regression DetectorRegression Detector ResultsMetrics dashboard Baseline: 521bc73 Regression Detector: ✅ Bounds Checks: ✅ Significant changes in experiment optimization goalsConfidence level: 90.00%
|
perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
---|---|---|---|---|---|---|
➖ | idle_all_features | memory utilization | +0.52 | [+0.42, +0.62] | 1 | Logs |
➖ | file_tree | memory utilization | +0.32 | [+0.21, +0.44] | 1 | Logs |
➖ | tcp_syslog_to_blackhole | ingress throughput | +0.17 | [+0.12, +0.22] | 1 | Logs |
➖ | file_to_blackhole_1000ms_latency | egress throughput | +0.09 | [-0.40, +0.58] | 1 | Logs |
➖ | file_to_blackhole_100ms_latency | egress throughput | +0.01 | [-0.21, +0.24] | 1 | Logs |
➖ | file_to_blackhole_0ms_latency | egress throughput | +0.01 | [-0.32, +0.34] | 1 | Logs |
➖ | file_to_blackhole_500ms_latency | egress throughput | +0.01 | [-0.24, +0.26] | 1 | Logs |
➖ | tcp_dd_logs_filter_exclude | ingress throughput | +0.00 | [-0.01, +0.01] | 1 | Logs |
➖ | uds_dogstatsd_to_api | ingress throughput | -0.01 | [-0.10, +0.08] | 1 | Logs |
➖ | file_to_blackhole_300ms_latency | egress throughput | -0.10 | [-0.28, +0.08] | 1 | Logs |
➖ | otel_to_otel_logs | ingress throughput | -0.31 | [-1.11, +0.50] | 1 | Logs |
➖ | idle | memory utilization | -0.53 | [-0.57, -0.49] | 1 | Logs |
➖ | uds_dogstatsd_to_api_cpu | % cpu utilization | -0.92 | [-1.65, -0.20] | 1 | Logs |
➖ | basic_py_check | % cpu utilization | -3.89 | [-7.69, -0.08] | 1 | Logs |
✅ | pycheck_lots_of_tags | % cpu utilization | -5.14 | [-8.51, -1.77] | 1 | Logs |
Bounds Checks Passed
perf | experiment | bounds_check_name | replicates_passed | links |
---|---|---|---|---|
✅ | file_to_blackhole_0ms_latency | memory_usage | 10/10 | |
✅ | file_to_blackhole_1000ms_latency | memory_usage | 10/10 | |
✅ | file_to_blackhole_100ms_latency | memory_usage | 10/10 | |
✅ | file_to_blackhole_300ms_latency | memory_usage | 10/10 | |
✅ | file_to_blackhole_500ms_latency | memory_usage | 10/10 | |
✅ | idle | memory_usage | 10/10 |
Explanation
Performance changes are noted in the perf column of each table:
- ✅ = significantly better comparison variant performance
- ❌ = significantly worse comparison variant performance
- ➖ = no significant change in performance
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:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
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.
-
Its configuration does not mark it "erratic".
@@ -33,11 +31,12 @@ | |||
|
|||
@task | |||
def generate_ci_visibility_links(_ctx, output: str | None): | |||
"""Generates links to CI Visibility for the current job. | |||
|
|||
Usage: |
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.
Could we make the usage the same between the tasks. Either use deva
or inv
everywhere but not a mix of the two?
What does this PR do?
This refactors the code related to linters / gitlab:
--all-files
to the jobs code owners lintergitlab_ci_jobs_owners
gitlab_ci_jobs_owners
linterMotivation
Describe how to test/QA your changes
Possible Drawbacks / Trade-offs
Additional Notes