Skip to content

fix(ci): apt-get update before apt install in docker-image jobs#4011

Merged
realFlowControl merged 1 commit into
masterfrom
florian/randomized-tests-apt-update
Jun 24, 2026
Merged

fix(ci): apt-get update before apt install in docker-image jobs#4011
realFlowControl merged 1 commit into
masterfrom
florian/randomized-tests-apt-update

Conversation

@realFlowControl

@realFlowControl realFlowControl commented Jun 24, 2026

Copy link
Copy Markdown
Member

Description

While working on #4002 all randomized tests job suddenly started failing. This is because of the apt index is stale on the image and we are not updating it before running apt install -y php git make curl, so that fails with:

Err … libxml2 2.9.14+dfsg-1.3ubuntu3.7  404 Not Found
E: Failed to fetch …/libxml2_2.9.14%2bdfsg-1.3ubuntu3.7_amd64.deb  404  Not Found
E: Unable to fetch some archives, maybe run apt-get update?

This also fails on master since today: https://gitlab.ddbuild.io/DataDog/apm-reliability/dd-trace-php/-/jobs/1799170178

This PR adds apt-get update before each of the three apt install steps in .gitlab/generate-package.php. The other apt-based jobs in this file already do this.

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

The randomized-tests and frameworks jobs run on the docker:29.4.0-noble image
and apt-install php/git/make/curl at runtime, but without refreshing the apt
index first. The image's baked index goes stale and breaks once Ubuntu's
security pocket supersedes a pinned package (currently libxml2), e.g.:

  Err … libxml2 2.9.14+dfsg-1.3ubuntu3.7  404 Not Found
  E: Failed to fetch … maybe run apt-get update

Add 'apt-get update' before each of the three 'apt install' steps in
generate-package.php (the other apt jobs in this file already do this).
@realFlowControl realFlowControl changed the title ci: apt-get update before apt install in docker-image jobs fix(ci): apt-get update before apt install in docker-image jobs Jun 24, 2026
@realFlowControl realFlowControl marked this pull request as ready for review June 24, 2026 10:08
@realFlowControl realFlowControl requested a review from a team as a code owner June 24, 2026 10:08
@datadog-official

datadog-official Bot commented Jun 24, 2026

Copy link
Copy Markdown

Pipelines  Tests

Fix all issues with BitsAI

⚠️ Warnings

🚦 13 Pipeline jobs failed

DataDog/apm-reliability/dd-trace-php | ASAN test_c with multiple observers: [8.3]   View in Datadog   GitLab

DataDog/apm-reliability/dd-trace-php | test_integrations_guzzle_latest: [7.2]   View in Datadog   GitLab

DataDog/apm-reliability/dd-trace-php | test_integrations_guzzle_latest: [7.4]   View in Datadog   GitLab

View all 13 failed jobs.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 54.08% (+0.00%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 67f6a0d | Docs | Datadog PR Page | Give us feedback!

@realFlowControl realFlowControl merged commit b8a27a3 into master Jun 24, 2026
1824 of 2018 checks passed
@realFlowControl realFlowControl deleted the florian/randomized-tests-apt-update branch June 24, 2026 10:30
@github-actions github-actions Bot added this to the 1.22.0 milestone Jun 24, 2026
@bwoebi

bwoebi commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Alternatively, we could just have rebuilt these images, but okay :-D

@realFlowControl

realFlowControl commented Jun 24, 2026

Copy link
Copy Markdown
Member Author

We have an aging todo in there to build a proper image that has php, make and git pre-installed:

image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/docker:29.4.0-noble # TODO: use a proper docker image with make, php and git pre-installed

The image used here is "just" an ubuntu iamge. I figured it'll be a little less bad than it is currently with adding apt-get upadte. And this way the todo comment stays valid :-P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants