Skip to content

[image] consolidate apt package installation - #60687

Merged
aslonnie merged 1 commit into
ray-project:masterfrom
anyscale:lonnie-260202-luamove
Feb 3, 2026
Merged

aslonnie merged 1 commit into
ray-project:masterfrom
anyscale:lonnie-260202-luamove

Conversation

@aslonnie

@aslonnie aslonnie commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

so that it is not installing apt packages in two different locations

@aslonnie
aslonnie requested review from a team February 3, 2026 00:46

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly consolidates the installation of apt packages for HAProxy in the docker/base-extra/Dockerfile. By moving socat and liblua5.3-0 to the main APT_PKGS list, you've streamlined the image build process, improved maintainability, and fixed a latent bug where a later apt-get update would fail. This is a great improvement.

As a suggestion for a follow-up, a similar consolidation could be applied to docker/base-slim/Dockerfile, which also installs these HAProxy dependencies in a separate RUN instruction.

so that it is not installing apt packages in two different locations

Signed-off-by: Lonnie Liu <[email protected]>
@aslonnie
aslonnie force-pushed the lonnie-260202-luamove branch from e54e928 to bcd5506 Compare February 3, 2026 00:59
@ray-gardener ray-gardener Bot added core Issues that should be addressed in Ray Core devprod labels Feb 3, 2026
mkdir -p /etc/haproxy /run/haproxy /var/log/haproxy
chown -R ray:"$(id -gn ray)" /run/haproxy

rm -rf /var/lib/apt/lists/*

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was removing apt package metadata causing issues? Or is the intention to keep them around for tracking reasons?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these files are already deleted from previous steps. it the apt-get update commands recreate them. we remove these files so that auto package upgrade won't be triggered in production usage by default. auto upgrades can cause issues when running production jobs on the images.

@aslonnie aslonnie added the go add ONLY when ready to merge, run all tests label Feb 3, 2026
@aslonnie
aslonnie merged commit 888dc6c into ray-project:master Feb 3, 2026
3 checks passed
Sparks0219 pushed a commit to Sparks0219/ray that referenced this pull request Feb 9, 2026
so that it is not installing apt packages in two different locations

Signed-off-by: Lonnie Liu <[email protected]>
elliot-barn pushed a commit that referenced this pull request Feb 9, 2026
so that it is not installing apt packages in two different locations

Signed-off-by: Lonnie Liu <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
elliot-barn pushed a commit that referenced this pull request Feb 9, 2026
so that it is not installing apt packages in two different locations

Signed-off-by: Lonnie Liu <[email protected]>
ans9868 pushed a commit to ans9868/ray that referenced this pull request Feb 18, 2026
so that it is not installing apt packages in two different locations

Signed-off-by: Lonnie Liu <[email protected]>
Signed-off-by: Adel Nour <[email protected]>
elliot-barn added a commit that referenced this pull request Aug 28, 2026
## What

`docker/base-extra/Dockerfile` installs the apt package
`google-cloud-sdk`, which no longer exists. Renames it to
`google-cloud-cli`. One word, one line.

## Why

Any `base-extra` build that misses the layer cache fails outright:

```
Package google-cloud-sdk is not available, but is referred to by another package.
However the following packages replace it:
  google-cloud-cli
E: Package 'google-cloud-sdk' has no installation candidate
=> ERROR: process "/bin/bash -c /dev/pipes/EOF" ... exit code: 100
```

The package name is simply gone from Google's repo — confirmed against
the live index, in every suite it serves:

```
$ curl -s https://packages.cloud.google.com/apt/dists/cloud-sdk/main/binary-amd64/Packages \
    | awk '/^Package: /{print $2}' | sort -u
google-cloud-cli
google-cloud-cli-anthos-auth
... (28 more google-cloud-cli-* components)
kubectl

# google-cloud-sdk stanzas per suite (amd64 / arm64):
cloud-sdk           0    cloud-sdk-jammy  0    cloud-sdk-bullseye  0
# google-cloud-cli stanzas: 49 in each
```

The rename happened at 467.0.0 — `google-cloud-cli` still carries
`Replaces: google-cloud-sdk (<< 467.0.0-0)`, which is the metadata apt
is reading when it suggests the replacement. A `Replaces` relationship
is not an installation candidate, so the install fails anyway. The old
name kept resolving only while some version providing it remained in the
repo's retention window; the oldest version now retained is `536.0.1-0`,
so that window has rolled past.

## Why this surfaced now, not at the rename

The layer is normally an ECR cache hit, so the apt step never executes.
It only runs on a cache miss:

```
cache image miss: GET .../rayproject/citemp/manifests/z-ac0c9dae...: MANIFEST_UNKNOWN: Requested image not found
```

The same commit and the same Dockerfile therefore built green on
2026-08-24 (`cache hit: sha256:09ec1be3...`) and failed on 2026-08-27. A
green older build is not evidence the Dockerfile still builds — every
image layering on `base-extra` (ray, ray-ml, ray-torch, all Python
versions) hits this once its cache entry is gone.

## Precedent

`ci/docker/forge.Dockerfile:64` already installs `google-cloud-cli` from
the same repo, same key, same apt source line. This only brings
`base-extra` in line with it; the source list and key handling are
unchanged.

## Testing

Reproduced the CI failure and verified the fix in `ubuntu:22.04` (the
image's base), using the same apt source and key as the Dockerfile:

```
--- OLD NAME (expected to fail) ---
However the following packages replace it:
  google-cloud-cli
E: Package 'google-cloud-sdk' has no installation candidate

--- NEW NAME (expected to resolve) ---
Inst google-cloud-cli (582.0.0-0 cloud-sdk:cloud-sdk [amd64])
Conf google-cloud-cli (582.0.0-0 cloud-sdk:cloud-sdk [amd64])
Google Cloud SDK 582.0.0
```

No loss of tooling — the CLI entry points are all still provided:

```
gcloud   -> /usr/bin/gcloud
gsutil   -> /usr/bin/gsutil      (gsutil version: 5.37)
bq       -> /usr/bin/bq
```

Both architectures the image builds are covered: `google-cloud-cli` has
49 versions in the `binary-amd64` index and 49 in `binary-arm64`.

Real verification is CI building `base-extra` on this PR.

## Not a duplicate

`gh pr list --state open --search "google-cloud-cli"` returns nothing,
and no open PR touches `docker/base-extra/Dockerfile`. Its last three
commits (#61497, #60878, #60687) are unrelated.

## AI assistance

AI assistance was used: diagnosing the failing Buildkite job, confirming
the package's absence against the live apt index, and running the
container reproduction above. Every changed line was reviewed and every
command shown was run and its output confirmed before requesting review.

Signed-off-by: elliot-barn <[email protected]>
AarryaSaraf pushed a commit to AarryaSaraf/ray that referenced this pull request Aug 31, 2026
## What

`docker/base-extra/Dockerfile` installs the apt package
`google-cloud-sdk`, which no longer exists. Renames it to
`google-cloud-cli`. One word, one line.

## Why

Any `base-extra` build that misses the layer cache fails outright:

```
Package google-cloud-sdk is not available, but is referred to by another package.
However the following packages replace it:
  google-cloud-cli
E: Package 'google-cloud-sdk' has no installation candidate
=> ERROR: process "/bin/bash -c /dev/pipes/EOF" ... exit code: 100
```

The package name is simply gone from Google's repo — confirmed against
the live index, in every suite it serves:

```
$ curl -s https://packages.cloud.google.com/apt/dists/cloud-sdk/main/binary-amd64/Packages \
    | awk '/^Package: /{print $2}' | sort -u
google-cloud-cli
google-cloud-cli-anthos-auth
... (28 more google-cloud-cli-* components)
kubectl

# google-cloud-sdk stanzas per suite (amd64 / arm64):
cloud-sdk           0    cloud-sdk-jammy  0    cloud-sdk-bullseye  0
# google-cloud-cli stanzas: 49 in each
```

The rename happened at 467.0.0 — `google-cloud-cli` still carries
`Replaces: google-cloud-sdk (<< 467.0.0-0)`, which is the metadata apt
is reading when it suggests the replacement. A `Replaces` relationship
is not an installation candidate, so the install fails anyway. The old
name kept resolving only while some version providing it remained in the
repo's retention window; the oldest version now retained is `536.0.1-0`,
so that window has rolled past.

## Why this surfaced now, not at the rename

The layer is normally an ECR cache hit, so the apt step never executes.
It only runs on a cache miss:

```
cache image miss: GET .../rayproject/citemp/manifests/z-ac0c9dae...: MANIFEST_UNKNOWN: Requested image not found
```

The same commit and the same Dockerfile therefore built green on
2026-08-24 (`cache hit: sha256:09ec1be3...`) and failed on 2026-08-27. A
green older build is not evidence the Dockerfile still builds — every
image layering on `base-extra` (ray, ray-ml, ray-torch, all Python
versions) hits this once its cache entry is gone.

## Precedent

`ci/docker/forge.Dockerfile:64` already installs `google-cloud-cli` from
the same repo, same key, same apt source line. This only brings
`base-extra` in line with it; the source list and key handling are
unchanged.

## Testing

Reproduced the CI failure and verified the fix in `ubuntu:22.04` (the
image's base), using the same apt source and key as the Dockerfile:

```
--- OLD NAME (expected to fail) ---
However the following packages replace it:
  google-cloud-cli
E: Package 'google-cloud-sdk' has no installation candidate

--- NEW NAME (expected to resolve) ---
Inst google-cloud-cli (582.0.0-0 cloud-sdk:cloud-sdk [amd64])
Conf google-cloud-cli (582.0.0-0 cloud-sdk:cloud-sdk [amd64])
Google Cloud SDK 582.0.0
```

No loss of tooling — the CLI entry points are all still provided:

```
gcloud   -> /usr/bin/gcloud
gsutil   -> /usr/bin/gsutil      (gsutil version: 5.37)
bq       -> /usr/bin/bq
```

Both architectures the image builds are covered: `google-cloud-cli` has
49 versions in the `binary-amd64` index and 49 in `binary-arm64`.

Real verification is CI building `base-extra` on this PR.

## Not a duplicate

`gh pr list --state open --search "google-cloud-cli"` returns nothing,
and no open PR touches `docker/base-extra/Dockerfile`. Its last three
commits (ray-project#61497, ray-project#60878, ray-project#60687) are unrelated.

## AI assistance

AI assistance was used: diagnosing the failing Buildkite job, confirming
the package's absence against the live apt index, and running the
container reproduction above. Every changed line was reviewed and every
command shown was run and its output confirmed before requesting review.

Signed-off-by: elliot-barn <[email protected]>
Signed-off-by: Aarrya <[email protected]>
AarryaSaraf pushed a commit to AarryaSaraf/ray that referenced this pull request Aug 31, 2026
## What

`docker/base-extra/Dockerfile` installs the apt package
`google-cloud-sdk`, which no longer exists. Renames it to
`google-cloud-cli`. One word, one line.

## Why

Any `base-extra` build that misses the layer cache fails outright:

```
Package google-cloud-sdk is not available, but is referred to by another package.
However the following packages replace it:
  google-cloud-cli
E: Package 'google-cloud-sdk' has no installation candidate
=> ERROR: process "/bin/bash -c /dev/pipes/EOF" ... exit code: 100
```

The package name is simply gone from Google's repo — confirmed against
the live index, in every suite it serves:

```
$ curl -s https://packages.cloud.google.com/apt/dists/cloud-sdk/main/binary-amd64/Packages \
    | awk '/^Package: /{print $2}' | sort -u
google-cloud-cli
google-cloud-cli-anthos-auth
... (28 more google-cloud-cli-* components)
kubectl

# google-cloud-sdk stanzas per suite (amd64 / arm64):
cloud-sdk           0    cloud-sdk-jammy  0    cloud-sdk-bullseye  0
# google-cloud-cli stanzas: 49 in each
```

The rename happened at 467.0.0 — `google-cloud-cli` still carries
`Replaces: google-cloud-sdk (<< 467.0.0-0)`, which is the metadata apt
is reading when it suggests the replacement. A `Replaces` relationship
is not an installation candidate, so the install fails anyway. The old
name kept resolving only while some version providing it remained in the
repo's retention window; the oldest version now retained is `536.0.1-0`,
so that window has rolled past.

## Why this surfaced now, not at the rename

The layer is normally an ECR cache hit, so the apt step never executes.
It only runs on a cache miss:

```
cache image miss: GET .../rayproject/citemp/manifests/z-ac0c9dae...: MANIFEST_UNKNOWN: Requested image not found
```

The same commit and the same Dockerfile therefore built green on
2026-08-24 (`cache hit: sha256:09ec1be3...`) and failed on 2026-08-27. A
green older build is not evidence the Dockerfile still builds — every
image layering on `base-extra` (ray, ray-ml, ray-torch, all Python
versions) hits this once its cache entry is gone.

## Precedent

`ci/docker/forge.Dockerfile:64` already installs `google-cloud-cli` from
the same repo, same key, same apt source line. This only brings
`base-extra` in line with it; the source list and key handling are
unchanged.

## Testing

Reproduced the CI failure and verified the fix in `ubuntu:22.04` (the
image's base), using the same apt source and key as the Dockerfile:

```
--- OLD NAME (expected to fail) ---
However the following packages replace it:
  google-cloud-cli
E: Package 'google-cloud-sdk' has no installation candidate

--- NEW NAME (expected to resolve) ---
Inst google-cloud-cli (582.0.0-0 cloud-sdk:cloud-sdk [amd64])
Conf google-cloud-cli (582.0.0-0 cloud-sdk:cloud-sdk [amd64])
Google Cloud SDK 582.0.0
```

No loss of tooling — the CLI entry points are all still provided:

```
gcloud   -> /usr/bin/gcloud
gsutil   -> /usr/bin/gsutil      (gsutil version: 5.37)
bq       -> /usr/bin/bq
```

Both architectures the image builds are covered: `google-cloud-cli` has
49 versions in the `binary-amd64` index and 49 in `binary-arm64`.

Real verification is CI building `base-extra` on this PR.

## Not a duplicate

`gh pr list --state open --search "google-cloud-cli"` returns nothing,
and no open PR touches `docker/base-extra/Dockerfile`. Its last three
commits (ray-project#61497, ray-project#60878, ray-project#60687) are unrelated.

## AI assistance

AI assistance was used: diagnosing the failing Buildkite job, confirming
the package's absence against the live apt index, and running the
container reproduction above. Every changed line was reviewed and every
command shown was run and its output confirmed before requesting review.

Signed-off-by: elliot-barn <[email protected]>
Signed-off-by: Aarrya <[email protected]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
## What

`docker/base-extra/Dockerfile` installs the apt package
`google-cloud-sdk`, which no longer exists. Renames it to
`google-cloud-cli`. One word, one line.

## Why

Any `base-extra` build that misses the layer cache fails outright:

```
Package google-cloud-sdk is not available, but is referred to by another package.
However the following packages replace it:
  google-cloud-cli
E: Package 'google-cloud-sdk' has no installation candidate
=> ERROR: process "/bin/bash -c /dev/pipes/EOF" ... exit code: 100
```

The package name is simply gone from Google's repo — confirmed against
the live index, in every suite it serves:

```
$ curl -s https://packages.cloud.google.com/apt/dists/cloud-sdk/main/binary-amd64/Packages \
    | awk '/^Package: /{print $2}' | sort -u
google-cloud-cli
google-cloud-cli-anthos-auth
... (28 more google-cloud-cli-* components)
kubectl

# google-cloud-sdk stanzas per suite (amd64 / arm64):
cloud-sdk           0    cloud-sdk-jammy  0    cloud-sdk-bullseye  0
# google-cloud-cli stanzas: 49 in each
```

The rename happened at 467.0.0 — `google-cloud-cli` still carries
`Replaces: google-cloud-sdk (<< 467.0.0-0)`, which is the metadata apt
is reading when it suggests the replacement. A `Replaces` relationship
is not an installation candidate, so the install fails anyway. The old
name kept resolving only while some version providing it remained in the
repo's retention window; the oldest version now retained is `536.0.1-0`,
so that window has rolled past.

## Why this surfaced now, not at the rename

The layer is normally an ECR cache hit, so the apt step never executes.
It only runs on a cache miss:

```
cache image miss: GET .../rayproject/citemp/manifests/z-ac0c9dae...: MANIFEST_UNKNOWN: Requested image not found
```

The same commit and the same Dockerfile therefore built green on
2026-08-24 (`cache hit: sha256:09ec1be3...`) and failed on 2026-08-27. A
green older build is not evidence the Dockerfile still builds — every
image layering on `base-extra` (ray, ray-ml, ray-torch, all Python
versions) hits this once its cache entry is gone.

## Precedent

`ci/docker/forge.Dockerfile:64` already installs `google-cloud-cli` from
the same repo, same key, same apt source line. This only brings
`base-extra` in line with it; the source list and key handling are
unchanged.

## Testing

Reproduced the CI failure and verified the fix in `ubuntu:22.04` (the
image's base), using the same apt source and key as the Dockerfile:

```
--- OLD NAME (expected to fail) ---
However the following packages replace it:
  google-cloud-cli
E: Package 'google-cloud-sdk' has no installation candidate

--- NEW NAME (expected to resolve) ---
Inst google-cloud-cli (582.0.0-0 cloud-sdk:cloud-sdk [amd64])
Conf google-cloud-cli (582.0.0-0 cloud-sdk:cloud-sdk [amd64])
Google Cloud SDK 582.0.0
```

No loss of tooling — the CLI entry points are all still provided:

```
gcloud   -> /usr/bin/gcloud
gsutil   -> /usr/bin/gsutil      (gsutil version: 5.37)
bq       -> /usr/bin/bq
```

Both architectures the image builds are covered: `google-cloud-cli` has
49 versions in the `binary-amd64` index and 49 in `binary-arm64`.

Real verification is CI building `base-extra` on this PR.

## Not a duplicate

`gh pr list --state open --search "google-cloud-cli"` returns nothing,
and no open PR touches `docker/base-extra/Dockerfile`. Its last three
commits (ray-project#61497, ray-project#60878, ray-project#60687) are unrelated.

## AI assistance

AI assistance was used: diagnosing the failing Buildkite job, confirming
the package's absence against the live apt index, and running the
container reproduction above. Every changed line was reviewed and every
command shown was run and its output confirmed before requesting review.

Signed-off-by: elliot-barn <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core devprod go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants