momocus / sakazuki

自宅の酒を管理するアプリケーション
https://sakazuki.fly.dev/
MIT License
13 stars 4 forks source link

🪰Fly Deployがライブラリインストール失敗で落ちる #719

Closed yonta closed 3 months ago

yonta commented 4 months ago

落ちたActions

https://github.com/momocus/sakazuki/actions/runs/9233787614/job/25406635668

ログ

#16 [build_deps 1/1] RUN --mount=type=cache,id=dev-apt-cache,sharing=locked,target=/var/cache/apt     --mount=type=cache,id=dev-apt-lib,sharing=locked,target=/var/lib/apt     apt-get update -qq &&     apt-get install --no-install-recommends -y build-essential=12.9 libpq-dev=13.*     && rm -rf /var/lib/apt/lists /var/cache/apt/archives
#16 1.075 Reading package lists...
#16 1.630 Building dependency tree...
#16 1.817 Package libpq-dev is not available, but is referred to by another package.
#16 1.817 This may mean that the package is missing, has been obsoleted, or
#16 1.817 is only available from another source
#16 1.817 
#16 1.821 E: Version '13.*' for 'libpq-dev' was not found
#16 ERROR: process "/bin/bash -o pipefail -c apt-get update -qq &&     apt-get install --no-install-recommends -y ${BUILD_PACKAGES}     && rm -rf /var/lib/apt/lists /var/cache/apt/archives" did not complete successfully: exit code: 100
------
 > [build_deps 1/1] RUN --mount=type=cache,id=dev-apt-cache,sharing=locked,target=/var/cache/apt     --mount=type=cache,id=dev-apt-lib,sharing=locked,target=/var/lib/apt     apt-get update -qq &&     apt-get install --no-install-recommends -y build-essential=12.9 libpq-dev=13.*     && rm -rf /var/lib/apt/lists /var/cache/apt/archives:
1.075 Reading package lists...
1.630 Building dependency tree...
1.817 Package libpq-dev is not available, but is referred to by another package.
1.817 This may mean that the package is missing, has been obsoleted, or
1.817 is only available from another source
1.817 
1.821 E: Version '13.*' for 'libpq-dev' was not found
------
Error: failed to fetch an image or build from source: error building: failed to solve: process "/bin/bash -o pipefail -c apt-get update -qq &&     apt-get install --no-install-recommends -y ${BUILD_PACKAGES}     && rm -rf /var/lib/apt/lists /var/cache/apt/archives" did not complete successfully: exit code: 100
Error: Process completed with exit code 1.
yonta commented 4 months ago

fly.Dockerのイメージはここで見れる

https://quay.io/repository/evl.ms/fullstaq-ruby?tab=tags&tag=latest

yonta commented 4 months ago

使用しているのはこれ。 イメージ名は3.3.1-jemalloc-slim、実体は3.3.1-jemalloc-bookwarm-slim

jemallocとmalloctrimがあり、アロケータの違い。 jemallocのほうがRubyに向いているらしいので、そのためかな。

https://quay.io/repository/evl.ms/fullstaq-ruby/manifest/sha256:528cc520f70ae9374639c6f00815b3695bbf0168ef5713f9c5772e21f32ccf3c

yonta commented 4 months ago

Debianを使っているということを明示するのと、どのバージョンのOSを使っているか明示するためにも、bookwormって指 定いれておいたほうがよさそう。

yonta commented 4 months ago

Debian bookwormのパッケージを覗いてみると、今は15.6か15.5しかないようだ

root@8397bb9b06f5:/# apt show -a libpq-dev
Package: libpq-dev
Version: 15.6-0+deb12u1
Priority: optional
Section: libdevel
Source: postgresql-15
Maintainer: Debian PostgreSQL Maintainers <team+postgresql@tracker.debian.org>
Installed-Size: 590 kB
Depends: libpq5 (= 15.6-0+deb12u1), libssl-dev
Suggests: postgresql-doc-15
Homepage: http://www.postgresql.org/
Download-Size: 142 kB
APT-Sources: http://deb.debian.org/debian-security bookworm-security/main amd64 Packages
Description: header files for libpq5 (PostgreSQL library)

Package: libpq-dev
Version: 15.5-0+deb12u1
Priority: optional
Section: libdevel
Source: postgresql-15
Maintainer: Debian PostgreSQL Maintainers <team+postgresql@tracker.debian.org>
Installed-Size: 591 kB
Depends: libpq5 (= 15.5-0+deb12u1), libssl-dev
Suggests: postgresql-doc-15
Homepage: http://www.postgresql.org/
Tag: devel::library, role::devel-lib
Download-Size: 142 kB
APT-Sources: http://deb.debian.org/debian bookworm/main amd64 Packages
Description: header files for libpq5 (PostgreSQL library)
yonta commented 4 months ago

ちなみに3.2.2-jemalloc-slimはやはり3.2.2-jemalloc-bullseye-slimとなっており、やはりOSバージョンが変わってた。

yonta commented 4 months ago

dev.Dockerfileでもbullseyeを使っている。 bullseyeのサポート期間は2026 年 6 月 30 日までの予定らしい。

https://wiki.debian.org/LTS

とりあえずbullseyeのままで、別IssueでOSバージョンあげよう。