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

Move CI images to GHCR #157

Merged
merged 5 commits into from
Jul 11, 2024
Merged

Move CI images to GHCR #157

merged 5 commits into from
Jul 11, 2024

Conversation

thanodnl
Copy link
Member

The main motivation of this patch is to move the images to the github container registry. But as quite often the case, the images were not building, thus some changes needed to be made to get the images to build.

  • Python construct package is bumped. There was a dependency failing to install, which succeeds on a newer version. This change is made by changing the version on the citus repo, and re-export the requirements.txt
  • pin the postgresql-$PG_MAJOR version to the same pgdg version. For pg16.2 new packages have been created. This happens once in a while and to counter that we already pin most of the postgres ecosystem packages to a specific pgdg version. Somehow postgresql-... wasn't part of the pinning, causing some errors during image builds.

The scripts used the old syntax of multi line run blocks, requiring a lot of escaping and chaining of lines with the trailing \ character. Newer versions of docker allow an easier to maintain and readable syntax via

RUN <<'EOF'
# first comment will be shown during build as 'name' of the task
...
EOF

Given I already needed to change the body of many of the RUN blocks I took the liberty to refactor this at the same time. This is all captured in the first commit (barring I squash the fixups, let me know if I forgot :P). For review it might be easiest to review the commits separately.

older versions of docker could only run bigger blocks by writing them as a oneliner for bash. Since newer versions you can use the following syntax

RUN <<'EOF'
...
EOF

Which makes the blocks easier to read and maintain, given that they don't have to have a trailing \ on every line. Only where we write single statements that would span multiple lines we need the trailing \, eg. with long lists of packages to install.
…nt installation of older packages

We already pinned a lot of the postgres packages this way, except we missed the postgresl-$PG_MAJOR pacakges. This has caused unexpected image build failures.
Co-authored-by: Hanefi Onaldi <[email protected]>
@thanodnl thanodnl merged commit 7693016 into master Jul 11, 2024
15 checks passed
@thanodnl thanodnl deleted the fix/image-builds branch July 11, 2024 14:38
hanefi pushed a commit to citusdata/citus that referenced this pull request Jul 12, 2024
We move the CI images to the github container registry.

Given we mostly (if not solely) run these containers on github actions
infra it makes sense to have them hosted closer to where they are
needed.

Image changes: citusdata/the-process#157
hanefi pushed a commit to citusdata/citus that referenced this pull request Jul 17, 2024
We move the CI images to the github container registry.

Given we mostly (if not solely) run these containers on github actions
infra it makes sense to have them hosted closer to where they are
needed.

Image changes: citusdata/the-process#157

(cherry picked from commit e776a7e)
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