Images/CI: adds [runtime_datadog] image
What
- Creates an intermediate image
runtime_datadogthat addsdatadog-cito allimages/ciimages exceptruntime. - Modifies
before_scriptso that every job that has a non-NOOPbefore_scriptstep will by default try to send info to datadog.
Why
- To instrument all CI jobs using one of the
prebuild,build,test,e2etestimages. (NB: no job uses directlyruntimeimage.) - Temporary change that we plan to reverse:
- it's a low hanging fruit to have more jobs instrumented by datadog-ci
- but ultimately we want all CI jobs to run
scripts/ci/datadog_send_job_info.sh.
How
- We move
npmanddatadog-cifrome2etestto a newly createdruntime_datadogimage.-
datadog-cineeds to be installed withnpm(the standalone binary does not work on alpine). - The authentication to our proxy NPM registry is now done in
runtime_datadog.
-
- We use
runtime_datadoginstead ofruntimeinprebuild,build,test,e2etest. - We add
runtime_datadogin the variants build in the CI defined inci.inc.sh. - We update the README as well as some comments in the Dockerfiles.
An alternative would have been to add datadog-ci in runtime and then to remove it when building the Octez Docker image.
We chose not to do that since it was simpler to create a dedicated image and because no CI job uses the runtime image. (Many thanks @abate for this suggestion.)
Manually testing the MR
-
Test pipelines are (mostly) green: images can be built (CI images and also Octez Docker image).
- master branch pipeline (green): https://gitlab.com/tezos/tezos/-/pipelines/1758135688
- schedule extended test: https://gitlab.com/tezos/tezos/-/pipelines/1758136099
- failed jobs are the one that have been failing recently in the daily schedule extended test pipeline (cf. here)
-
Jobs are indeed instrumented, which means that
datadog-ciis installed onprebuild,build,test,e2etest.- compare this widget that shows the jobs in
masterfrom aschedule_extended_testpipeline vs this second widget that lists the jobs in the MR branch run in aschedule_extended_testpipeline. - additionally, this widget lists three jobs that resp. use
build,testande2etestimage. (no job usingprebuildran - these jobs areopam:*jobs).
- compare this widget that shows the jobs in
-
NPM registry authentication worked: we did use our proxy in both
runtime_datadogande2etest:- cf.
datadog-ci(installed inruntime_datadog) https://gitlab.com/tezos/tezos/-/jobs/9658751978/viewer#L347
- cf.
npm silly packumentCache full:https://us-central1-npm.pkg.dev/nl-gitlab-runner/npm-registry/@datadog%2fdatadog-ci cache-miss
- cf.
eth-cliinstalled ine2etesthttps://gitlab.com/tezos/tezos/-/jobs/9658751978/viewer#L5176
npm silly packumentCache full:https://us-central1-npm.pkg.dev/nl-gitlab-runner/npm-registry/eth-cli cache-miss
- No
datadog-ciornpmis installed in the Octez Docker image: it's a consequence of it being built on top ofCI.runtimebut if you want further proof, you can run:
% docker run --rm -it --entrypoint /bin/sh us-central1-docker.pkg.dev/nl-gitlab-runner/registry/tezos/tezos:bruno-dd-ci-runtime-clean
Unable to find image 'us-central1-docker.pkg.dev/nl-gitlab-runner/registry/tezos/tezos:bruno-dd-ci-runtime-clean' locally
bruno-dd-ci-runtime-clean: Pulling from nl-gitlab-runner/registry/tezos/tezos
94e9d8af2201: Already exists
1ee698eb3074: Pull complete
728b256944aa: Pull complete
a5b07fe1561e: Pull complete
4f4fb700ef54: Pull complete
9949625d351e: Pull complete
34359a8c5cf3: Pull complete
20a48dd52ba3: Pull complete
Digest: sha256:1b1e155e74d4a0cd8bb5cfec195544368ea06c7b1ebe1eeb0e56e434560fbee3
Status: Downloaded newer image for us-central1-docker.pkg.dev/nl-gitlab-runner/registry/tezos/tezos:bruno-dd-ci-runtime-clean
~ $ npm --version
/bin/sh: npm: not found
~ $ datadog-ci --version
/bin/sh: datadog-ci: not found
~ $ exit
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR