-
Notifications
You must be signed in to change notification settings - Fork 1.3k
CI: macOS: use the existing godeps cache #37442
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
base: main
Are you sure you want to change the base?
Conversation
Gitlab CI Configuration ChangesModified Jobs.macos_setup_go .macos_setup_go:
- echo Setting up Go
- mkdir -p ~/go
- export GO_VERSION="$(cat .go-version)"
- eval "$(gimme $GO_VERSION)"
- export PATH="$PATH:$GOROOT/bin"
+ - export GOPATH=$GOROOT
- echo Go version should be $GO_VERSION
- go version
- dda inv check-go-version agent_dmg-x64-a7 agent_dmg-x64-a7:
after_script:
- "if [ \"$SIGN\" = true ]; then\n security delete-keychain \"build.keychain\"\
\ || true\nfi\n"
- sudo umount /Volumes/Agent || true
artifacts:
expire_in: 2 weeks
paths:
- omnibus/pkg/*.dmg
- omnibus/pkg/version-manifest.json
before_script:
- sudo umount /Volumes/Agent || true
cache:
- key:
files:
- omnibus/Gemfile
- release.json
prefix: omnibus-deps-$CI_JOB_NAME-$OMNIBUS_RUBY_VERSION
paths:
- omnibus/vendor/bundle
needs:
- go_mod_tidy_check
+ - go_deps
rules:
- if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
when: never
- changes:
compare_to: $COMPARE_TO_BRANCH
paths:
- comp/core/gui/guiimpl/systray/**/*
- if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
when: never
- changes:
compare_to: $COMPARE_TO_BRANCH
paths:
- omnibus/**/*
- .gitlab-ci.yml
- release.json
- .gitlab/package_build/**/*
- if: $CI_COMMIT_BRANCH == "main"
- if: $CI_COMMIT_BRANCH =~ /^[0-9]+\.[0-9]+\.x$/
- if: $CI_COMMIT_BRANCH == "main" || $DEPLOY_AGENT == "true" || $RUN_ALL_BUILDS
== "true" || $DDR_WORKFLOW_ID != null
- if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
when: never
- allow_failure: true
when: manual
script:
- set -eo pipefail
- export VAULT_ADDR=https://vault.us1.ddbuild.io
- vault login -method=aws -no-print
- 'export PATH="$(pyenv root)/shims:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
'
- "if [ -n \"$PYTHON_VERSION\" ]; then\n # 1. Use PYTHON_VERSION if set\n if !\
\ [[ \"$PYTHON_VERSION\" =~ ^[0-9]+\\.[0-9]+\\.[0-9]+$ ]]; then\n echo \"Invalid\
\ Python version format (should be X.Y.Z): $PYTHON_VERSION\" >& 2\n exit 1\n\
\ fi\n if ! [ -d \"$(pyenv root)/versions/$PYTHON_VERSION\" ]; then\n echo\
\ \"Python version $PYTHON_VERSION not found. Installing...\"\n pyenv install\
\ \"$PYTHON_VERSION\"\n fi\nelse\n # 2. Find appropriate python version from\
\ major version\n PYTHON_VERSION=\"$(cat .python-version)\"\n echo \"Find python\
\ version matching $PYTHON_VERSION\"\n PYTHON_VERSION_ESCAPED=\"${PYTHON_VERSION//./\\\
\\.}\"\n versionmatches=\"$(ls \"$(pyenv root)/versions\" | grep -E \"^${PYTHON_VERSION_ESCAPED}\\\
\\.[0-9]+$\")\"\n if [ -n \"$versionmatches\" ]; then\n # 2.a.\n echo \"\
Found already existing python version for $PYTHON_VERSION\"\n else\n # 2.b.\n\
\ echo \"Installing Python $PYTHON_VERSION...\"\n pyenv install \"$PYTHON_VERSION\"\
\n versionmatches=\"$(ls \"$(pyenv root)/versions\" | grep -E \"^${PYTHON_VERSION_ESCAPED}\\\
\\.[0-9]+$\")\"\n if [ -z \"$versionmatches\" ]; then\n echo \"No matching\
\ Python version found for $PYTHON_VERSION even after installation.\" >& 2\n \
\ exit 1\n fi\n fi\n # If there are multiple matches, select the latest\
\ one\n PYTHON_VERSION=\"$(echo \"$versionmatches\" | sort -V | tail -n 1)\"\n\
fi\nVENV_NAME=\"datadog-agent-python-$PYTHON_VERSION\"\nVENV_PATH=\"$(pyenv root)/versions/$VENV_NAME\"\
\n"
- echo "Using Python $PYTHON_VERSION..."
- "# Check if the virtual environment directory exists\nif [ ! -d \"$VENV_PATH\"\
\ ]; then\n echo \"Creating virtual environment '$VENV_NAME'...\"\n pyenv virtualenv\
\ \"$PYTHON_VERSION\" \"$VENV_NAME\"\nelse\n echo \"Virtual environment '$VENV_NAME'\
\ already exists. Skipping creation.\"\nfi\n"
- pyenv activate $VENV_NAME
- python3 -m pip install "git+https://github.com/DataDog/datadog-agent-dev.git@v$(cat
.dda/version)" --break-system-packages
- pyenv rehash
- python3 -m dda self dep sync -f legacy-tasks
- pyenv rehash
- echo Setting up Go
- mkdir -p ~/go
- export GO_VERSION="$(cat .go-version)"
- eval "$(gimme $GO_VERSION)"
- export PATH="$PATH:$GOROOT/bin"
+ - export GOPATH=$GOROOT
- echo Go version should be $GO_VERSION
- go version
- dda inv check-go-version
+ - mkdir -p $GOPATH/pkg/mod/cache && tar xJf modcache.tar.xz -C $GOPATH/pkg/mod/cache
+ || exit 101
+ - rm -f modcache.tar.xz
- DD_API_KEY="$("$CI_PROJECT_DIR"/tools/ci/fetch_secret.sh "$AGENT_API_KEY_ORG2"
token)" || exit $?; export DD_API_KEY
- DD_APP_KEY="$("$CI_PROJECT_DIR"/tools/ci/fetch_secret.sh "$AGENT_APP_KEY_ORG2"
token)" || exit $?; export DD_APP_KEY
- "if [ \"$CI_COMMIT_BRANCH\" = \"main\" ] || [[ \"$CI_COMMIT_BRANCH\" =~ ^[0-9]+\\\
.[0-9]+\\.(x|[0-9]+)$ ]]; then\n dda inv -- -e macos.report-versions -l all ||\
\ true\nfi\n"
- "if [ \"$((RANDOM%20))\" -eq 0 ]; then\n echo Trying to remove inactive versions\n\
\ dda inv -- -e macos.remove-inactive-versions -l python -t \"$PYTHON_VERSION\"\
\ || true\n dda inv -- -e macos.remove-inactive-versions -l go -t \"$(cat .go-version)\"\
\ || true\nfi\n"
- sudo bash -c "rm -rf /var/cache/omnibus/src/*" || true
- pushd omnibus && bundle config set --local path 'vendor/bundle' && popd
- 'export GOMODCACHE=~/gomodcache
mkdir -p $GOMODCACHE
'
- bash .gitlab/package_build/build_agent_dmg.sh
- $S3_CP_CMD $OMNIBUS_PACKAGE_DIR/version-manifest.json $S3_SBOM_STORAGE_URI/$CI_JOB_NAME/version-manifest.json
stage: package_build
tags:
- macos:ventura-amd64
- specific:true
timeout: 2h
variables:
INTEGRATION_WHEELS_CACHE_BUCKET: dd-agent-omnibus
INTEGRATION_WHEELS_SKIP_CACHE_UPLOAD: true
KEYCHAIN_NAME: build.keychain
NOTARIZATION_ATTEMPTS: 3
NOTARIZATION_TIMEOUT: 15m
NOTARIZATION_WAIT_TIME: 15s
S3_OMNIBUS_CACHE_BUCKET: dd-ci-datadog-agent-omnibus-cache-build-stable
SIGN: true Changes Summary
ℹ️ Diff available in the job log. |
Uncompressed package size comparisonComparison with ancestor Size reduction summary
Diff per package
Decision✅ Passed |
Regression DetectorRegression Detector ResultsMetrics dashboard Baseline: 06e08cf Optimization Goals: ✅ No significant changes detected
|
perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
---|---|---|---|---|---|---|
➖ | docker_containers_cpu | % cpu utilization | +1.70 | [-2.13, +5.53] | 1 | Logs |
➖ | uds_dogstatsd_20mb_12k_contexts_20_senders | memory utilization | +0.42 | [+0.37, +0.47] | 1 | Logs |
➖ | tcp_syslog_to_blackhole | ingress throughput | +0.34 | [+0.30, +0.38] | 1 | Logs |
➖ | file_to_blackhole_100ms_latency | egress throughput | +0.11 | [-0.47, +0.69] | 1 | Logs |
➖ | quality_gate_logs | % cpu utilization | +0.06 | [-2.59, +2.71] | 1 | Logs bounds checks dashboard |
➖ | file_to_blackhole_0ms_latency_http1 | egress throughput | +0.06 | [-0.56, +0.68] | 1 | Logs |
➖ | otlp_ingest_logs | memory utilization | +0.06 | [-0.07, +0.18] | 1 | Logs |
➖ | file_to_blackhole_1000ms_latency_linear_load | egress throughput | +0.04 | [-0.19, +0.28] | 1 | Logs |
➖ | file_to_blackhole_0ms_latency | egress throughput | +0.02 | [-0.55, +0.59] | 1 | Logs |
➖ | tcp_dd_logs_filter_exclude | ingress throughput | +0.00 | [-0.01, +0.01] | 1 | Logs |
➖ | uds_dogstatsd_to_api | ingress throughput | +0.00 | [-0.24, +0.24] | 1 | Logs |
➖ | file_to_blackhole_300ms_latency | egress throughput | -0.02 | [-0.69, +0.66] | 1 | Logs |
➖ | file_to_blackhole_500ms_latency | egress throughput | -0.02 | [-0.61, +0.57] | 1 | Logs |
➖ | file_to_blackhole_0ms_latency_http2 | egress throughput | -0.03 | [-0.59, +0.53] | 1 | Logs |
➖ | file_to_blackhole_1000ms_latency | egress throughput | -0.07 | [-0.70, +0.55] | 1 | Logs |
➖ | quality_gate_idle_all_features | memory utilization | -0.16 | [-0.28, -0.05] | 1 | Logs bounds checks dashboard |
➖ | ddot_logs | memory utilization | -0.21 | [-0.35, -0.07] | 1 | Logs |
➖ | file_tree | memory utilization | -0.23 | [-0.39, -0.07] | 1 | Logs |
➖ | uds_dogstatsd_to_api_cpu | % cpu utilization | -0.30 | [-1.20, +0.61] | 1 | Logs |
➖ | quality_gate_idle | memory utilization | -0.35 | [-0.40, -0.29] | 1 | Logs bounds checks dashboard |
➖ | ddot_metrics | memory utilization | -0.44 | [-0.56, -0.33] | 1 | Logs |
➖ | otlp_ingest_metrics | memory utilization | -0.74 | [-0.90, -0.57] | 1 | Logs |
➖ | docker_containers_memory | memory utilization | -2.27 | [-2.35, -2.18] | 1 | Logs |
Bounds Checks: ✅ Passed
perf | experiment | bounds_check_name | replicates_passed | links |
---|---|---|---|---|
✅ | docker_containers_cpu | simple_check_run | 10/10 | |
✅ | docker_containers_memory | memory_usage | 10/10 | |
✅ | docker_containers_memory | simple_check_run | 10/10 | |
✅ | file_to_blackhole_0ms_latency | lost_bytes | 10/10 | |
✅ | file_to_blackhole_0ms_latency | memory_usage | 10/10 | |
✅ | file_to_blackhole_0ms_latency_http1 | lost_bytes | 10/10 | |
✅ | file_to_blackhole_0ms_latency_http1 | memory_usage | 10/10 | |
✅ | file_to_blackhole_0ms_latency_http2 | lost_bytes | 10/10 | |
✅ | file_to_blackhole_0ms_latency_http2 | memory_usage | 10/10 | |
✅ | file_to_blackhole_1000ms_latency | memory_usage | 10/10 | |
✅ | file_to_blackhole_1000ms_latency_linear_load | memory_usage | 10/10 | |
✅ | file_to_blackhole_100ms_latency | lost_bytes | 10/10 | |
✅ | file_to_blackhole_100ms_latency | memory_usage | 10/10 | |
✅ | file_to_blackhole_300ms_latency | lost_bytes | 10/10 | |
✅ | file_to_blackhole_300ms_latency | memory_usage | 10/10 | |
✅ | file_to_blackhole_500ms_latency | lost_bytes | 10/10 | |
✅ | file_to_blackhole_500ms_latency | memory_usage | 10/10 | |
✅ | quality_gate_idle | intake_connections | 10/10 | bounds checks dashboard |
✅ | quality_gate_idle | memory_usage | 10/10 | bounds checks dashboard |
✅ | quality_gate_idle_all_features | intake_connections | 10/10 | bounds checks dashboard |
✅ | quality_gate_idle_all_features | memory_usage | 10/10 | bounds checks dashboard |
✅ | quality_gate_logs | intake_connections | 10/10 | bounds checks dashboard |
✅ | quality_gate_logs | lost_bytes | 10/10 | bounds checks dashboard |
✅ | quality_gate_logs | memory_usage | 10/10 | bounds checks dashboard |
Explanation
Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%
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".
CI Pass/Fail Decision
✅ Passed. All Quality Gates passed.
- quality_gate_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
- quality_gate_logs, bounds check lost_bytes: 10/10 replicas passed. Gate passed.
- quality_gate_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_idle, bounds check intake_connections: 10/10 replicas passed. Gate passed.
- quality_gate_idle_all_features, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_idle_all_features, bounds check intake_connections: 10/10 replicas passed. Gate passed.
Static quality checks✅ Please find below the results from static quality gates Successful checksInfo
|
What does this PR do?
Use the same godeps cache as our linux jobs do
Motivation
Fasten the job by avoiding to fetch all dependencies again in the macOS build job
Describe how you validated your changes
Possible Drawbacks / Trade-offs
Additional Notes