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

experimental buildx.yml #312

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Conversation

ImreSamu
Copy link
Member

@ImreSamu ImreSamu commented Sep 4, 2022

PROPOSAL ( updated at 2022-10-16 )

new workflow github/workflows/buildx.yml

  • for using a docker buildx ( qemu emulation ) for the non-AMD64 platforms
  • AMD64 is staying on the matured github/workflows/main.yml workflow.
  • minimal change in the template and the testing code.

The proposed buildx.yml matrix :

Experimental linux/arm64 images

  • buildx/qemu based images
  • the arm64 - alpine version tested with JIT=OFF ( BUILDX/QEMU7.0 problem ! )
  • generated from the default Dockerfile just added an -experimental tag postfix!
Platform DockerHub image PG PostGIS OS
linux/arm64 postgis/postgis:10-3.2-experimental 10 3.2 debian:bullseye
linux/arm64 postgis/postgis:11-3.3-experimental 11 3.3 debian:bullseye
linux/arm64 postgis/postgis:12-3.3-experimental 12 3.3 debian:bullseye
linux/arm64 postgis/postgis:13-3.3-experimental 13 3.3 debian:bullseye
linux/arm64 postgis/postgis:14-3.3-experimental 14 3.3 debian:bullseye
linux/arm64 postgis/postgis:15-3.3-experimental 15 3.3 debian:bullseye
linux/arm64 postgis/postgis:15-3.3-alpine-experimental 15 3.3 alpine:3.16

Other Experimental images

  • buildx/qemu based images
  • the ppc64le - alpine version tested with JIT=OFF ( BUILDX/QEMU7.0 problem ! )
  • generated from the default Dockerfile just added an -experimental tag postfix!
Platform DockerHub image PG PostGIS OS
linux/arm/v7 postgis/postgis:15-3.3-alpine-experimental 15 3.3 alpine:3.16
linux/arm/v6 postgis/postgis:15-3.3-alpine-experimental 15 3.3 alpine:3.16
linux/386 postgis/postgis:15-3.3-alpine-experimental 15 3.3 alpine:3.16
linux/ppc64le postgis/postgis:15-3.3-alpine-experimental 15 3.3 alpine:3.16
linux/ppc64le postgis/postgis:15-3.3-experimental 15 3.3 debian:bullseye

minimal post-tests:

The default $POSTGRES_TEST_TRIES; $POSTGRES_TEST_SLEEP is not enough for the emulation
so I added a higher value for the buildx.yml

          POSTGRES_TEST_TRIES: 42
          POSTGRES_TEST_SLEEP: 2

Lesson learned / improvements:

  • under the QEMU7.0 ( ~emulation) the regress testing sometimes failed ( "aarch64"; "ppc64le" )
    • example: LOG: server process (PID 28990) was terminated by signal 7: Bus error
    • setting the JIT=OFF solved the problems in the alpine regression test. ( so added to workaround to the alpine.template )
  • we can use the current Makefile and make test
    • with setting the correct DOCKER_DEFAULT_PLATFORM= , PLATFORM= environment variables!
      • see github/workflows/buildx.yml
  • the uname -a ; uname -m ; lscpu ; cat /proc/cpuinfo - useful for the buildx/qemu debugging.

NOW: using different tagging for the "buildx build" !

  • -experimental tag postfix has been added to the image names in the buildx.yml!
    • like 15-3.3-experimental / 15-3.3-alpine-experimental

NEW environment variables: ( Makefile, workflow )

  • WORKFLOW: main,buildx ( workflow id )
  • TAG_POSTFIX: <>,'-experimental' ( Docker image tag postfix )

IMPORTANT:

  • I have minimal knowledge of the Makefile syntax; so please double-check!
  • no problem if some part of my implementation is not accepted/refactored.
  • docker push not tested!

@ImreSamu ImreSamu mentioned this pull request Sep 5, 2022
@ImreSamu ImreSamu changed the title [testing] experimental buildx experimental buildx.yml Sep 7, 2022
@ImreSamu
Copy link
Member Author

ImreSamu commented Sep 7, 2022

imho review ready
( cc @phillipross )

@ImreSamu ImreSamu marked this pull request as ready for review September 7, 2022 03:45
@ImreSamu
Copy link
Member Author

A lot of changes have been made( Postgis 3.3; Postgres 15 Beta4 )
and will have to be implemented here.
( so the current PR is not yet ready )

@phillipross
Copy link
Contributor

I agree that a separate tagging scheme should be used for images produced by this alternate workflow for the time being. It looks like there's still a bunch of things to figure out, but this is a great start!

If it's possible to still have CI runs occur for PRs in draft mode, maybe you can switch this PR to draft mode so that it doesn't get accidentally merged?

@ImreSamu ImreSamu marked this pull request as draft September 10, 2022 18:53
@ImreSamu
Copy link
Member Author

PR converted to "draft"

I agree that a separate tagging scheme should be used for images produced by this alternate workflow for the time being.

ok . . I will add an experimental postfix .. ( example 14-3.3-experimental )
and I am open to any other suggestions.

@ImreSamu
Copy link
Member Author

A lot of improvements / changes :

  • the PR first post has been updated with the relevant changes, and the proposed matrix is included.
  • ready to review ( merge ) ( cc @phillipross )

important: the docker push part is not tested!

Copy link
Contributor

@phillipross phillipross left a comment

Choose a reason for hiding this comment

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

This is great work so far! I added some comments for potential changes to reduce some hardcoding, but I'm also testing all of this in a VM in my local environment to see how portable it is.

.github/workflows/buildx.yml Outdated Show resolved Hide resolved
.github/workflows/buildx.yml Outdated Show resolved Hide resolved
@ImreSamu
Copy link
Member Author

Added some new ENV vars + other small improvements;

example;

 env:
   ALPINE_VERSION: 3.16
   WORKFLOW: buildx
   REPO_NAME: postgis
   IMAGE_NAME: postgis
   VERSION: 15-3.3
   VARIANT: alpine
   TAG_POSTFIX: -experimental

Ready to review ...

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