Skip to content
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

GitHub Actions で PostgreSQL がエラーになるのを修正 #1018

Merged
merged 2 commits into from
Oct 4, 2024

Conversation

nanasess
Copy link
Contributor

@nanasess nanasess commented Oct 2, 2024

PostgreSQL17 がリリースされたタイミングで GitHub Actions にエラーが発生している

PostgreSQL17 サーバーへ PostgreSQL17未満の psql で \l を実行すると以 下のエラーが発生する

psql --version
psql (PostgreSQL) 16.4
psql -h 127.0.0.1 -p 15432 -U eccube_db_user eccube_db
eccube_db=# \l
ERROR:  column d.daticulocale does not exist
行 8:   d.daticulocale as "ICU Locale",
        ^
HINT:  Perhaps you meant to reference the column "d.datlocale".

wait-for-pgsql.sh で \l を使用していたため、副作用の少ない SELECT 1 に変更する.
また、 docker compose のヘルスチェックが有効になるよう condition: service_healthy を追加する

PostgreSQL17 サーバーへ PostgreSQL17未満の psql で `\l` を実行すると以
下のエラーが発生する

```
psql --version
psql (PostgreSQL) 16.4
psql -h 127.0.0.1 -p 15432 -U eccube_db_user eccube_db
eccube_db=# \l
ERROR:  column d.daticulocale does not exist
行 8:   d.daticulocale as "ICU Locale",
        ^
HINT:  Perhaps you meant to reference the column "d.datlocale".
```

副作用の少ない `SELECT 1` に変更する.
また、 docker compose のヘルえスチェックが有効になるよう `condition: service_healthy` を追加する
@nanasess
Copy link
Contributor Author

nanasess commented Oct 2, 2024

個人アカウントで確認するかぎりは PostgreSQL17 でも問題なさそう
https://github.com/nanasess/ec-cube2/actions/runs/11146968321

Copy link

codecov bot commented Oct 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.29%. Comparing base (74eaa0a) to head (566278f).
Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1018   +/-   ##
=======================================
  Coverage   56.29%   56.29%           
=======================================
  Files          75       75           
  Lines        8917     8917           
=======================================
  Hits         5020     5020           
  Misses       3897     3897           
Flag Coverage Δ
tests 56.29% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nanasess
Copy link
Contributor Author

nanasess commented Oct 3, 2024

個人アカウントで確認するかぎりは PostgreSQL17 でも問題なさそう

なぜかこちらのレポジトリでは改善しない🤔

@nanasess nanasess force-pushed the fix-ci branch 2 times, most recently from 606bfdb to 2ae3d2a Compare October 3, 2024 02:18
@nanasess
Copy link
Contributor Author

nanasess commented Oct 3, 2024

なぜかこちらのレポジトリでは改善しない🤔
master ブランチのイメージを取得してしまうのが原因の模様。
#1019

一旦、postgres:16 を指定。master にマージ後、別PRで PostgreSQL17 を指定する

Copy link
Contributor

@seasoftjapan seasoftjapan left a comment

Choose a reason for hiding this comment

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

ローカルで PostgreSQL 16.4 で起動し、EC-CUBE フロント画面が表示されることを確認した。

@nanasess nanasess merged commit 928021e into EC-CUBE:master Oct 4, 2024
90 checks passed
@nanasess nanasess deleted the fix-ci branch October 4, 2024 13:18
nanasess added a commit to nanasess/ec-cube2 that referenced this pull request Oct 17, 2024
see EC-CUBE#1018 (comment)
PostgreSQL の下位互換性は優れているため、 `postgres:latest` を指定して
もほぼ問題ない。
latest とすることで、メジャーバージョンアップで何か問題が発生した場合
に迅速に検知可能。
@nanasess nanasess mentioned this pull request Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants