Skip to content

Conversation

@mykiwi
Copy link
Contributor

@mykiwi mykiwi commented Jul 29, 2021

This pull request adds PHP 8.1 runtimes (PHP 8.1.0beta3)
Heavily inspired from #678

To test it:

Name Version Compatible runtimes Version ARN
php-81 3 provided.al2 arn:aws:lambda:us-east-1:670541007614:layer:php-81:3
php-81-fpm 3 provided.al2 arn:aws:lambda:us-east-1:670541007614:layer:php-81-fpm:3

@deleugpn
Copy link
Member

Thanks! We'll likely combine this with our plan on automating the build next week. Did you test if this build is working as expected?

@mykiwi
Copy link
Contributor Author

mykiwi commented Jul 29, 2021

Not yet, it is currently in the build process

@mykiwi
Copy link
Contributor Author

mykiwi commented Jul 30, 2021

When I run php runtime/layers/tests.php this does not works, but also on older images too 🤔
Example of what it does with an older image:

$ docker run --rm --entrypoint pwd bref/php-80-fpm
docker: Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:385: applying cgroup configuration for process caused: error while starting unit "docker-64bc0017cb977edbda42ec78b30267ac5258c278ff15baf1912c37090d9de2a5.scope" with properties [{Name:Description Value:"libcontainer container 64bc0017cb977edbda42ec78b30267ac5258c278ff15baf1912c37090d9de2a5"} {Name:Slice Value:"system.slice"} {Name:PIDs Value:@au [775108]} {Name:Delegate Value:true} {Name:MemoryAccounting Value:true} {Name:CPUAccounting Value:true} {Name:IOAccounting Value:true} {Name:TasksAccounting Value:true} {Name:DefaultDependencies Value:false}]: Failed to activate service 'org.freedesktop.systemd1': timed out (service_start_timeout=25000ms): unknown.

How can I ensure this works correctly?

@mykiwi mykiwi marked this pull request as ready for review July 30, 2021 11:46
@mnapoli
Copy link
Member

mnapoli commented Aug 2, 2021

OK we went over these changes, but we're afraid of a long feedback loop of:

  1. we merge these changes
  2. we release new layers
  3. someone tests the layers and figures out something's not working
  4. new PR with the changes
  5. back to step 1

Such a feedback loop is very long and takes a lot of time. What would be best instead, before merging, is knowing that the layers do indeed work.

One way to do that is to build the layers locally and publish them to your own AWS account (make runtimes). Feel free to disable some regions (e.g. only publish to us-east-1), that will be faster to publish and simpler to cleanup after.

Then share the layers ARN here, so that people can test it out. Once we are confident the layers are working, we can merge them and publish them.

@mykiwi
Copy link
Contributor Author

mykiwi commented Aug 2, 2021

👌

Then share the layers ARN here, so that people can test it out.

Name Version Compatible runtimes Version ARN
php-81 1 provided.al2 arn:aws:lambda:us-east-1:670541007614:layer:php-81:1
php-81-fpm 1 provided.al2 arn:aws:lambda:us-east-1:670541007614:layer:php-81-fpm:1

@mnapoli
Copy link
Member

mnapoli commented Aug 2, 2021

Thanks! I shared on twitter too (I won't have time to test today personally): https://twitter.com/brefphp/status/1422185768978681859

@mykiwi
Copy link
Contributor Author

mykiwi commented Aug 6, 2021

PHP 8.1.0beta2

Name Version Compatible runtimes Version ARN
php-81 2 provided.al2 arn:aws:lambda:us-east-1:670541007614:layer:php-81:2
php-81-fpm 2 provided.al2 arn:aws:lambda:us-east-1:670541007614:layer:php-81-fpm:2

@mykiwi
Copy link
Contributor Author

mykiwi commented Aug 20, 2021

PHP 8.1.0beta3

Name Version Compatible runtimes Version ARN
php-81 3 provided.al2 arn:aws:lambda:us-east-1:670541007614:layer:php-81:3
php-81-fpm 3 provided.al2 arn:aws:lambda:us-east-1:670541007614:layer:php-81-fpm:3

@shouze
Copy link
Contributor

shouze commented Aug 20, 2021

@mykiwi I'm ok to test it but prior to test lambda layers, I would prefer to make that gradually against our apps:

  1. Test locally on our docker containers, but for that I would prefer of course to pull bref preview containers for php 8.1
  2. Then test on AWS with the preview published layers.

Do you think it's possible to publish at least bref/php-81-fpm-dev? (BTW I've seen that this is the one you have commented at the moment ^^).

Also, as I use some extra php extensions (in fact just one: redis) in many of our apps do you think it's also possible to publish the bref/build-php-81 docker image too?

And @Nyholm... this would imply then to build and publish first docker preview images & layers too 👼

@Nyholm
Copy link
Contributor

Nyholm commented Aug 20, 2021

As soon as bref/build-php-81 is on dockerhub, we can start publishing all/most extensions.

@mnapoli
Copy link
Member

mnapoli commented Aug 24, 2021

👍 cool!

Just to be transparent, the current status of this PR is basically waiting for someone telling us that these layers work 😄

@mnapoli
Copy link
Member

mnapoli commented Aug 25, 2021

Actually now that we have the build pipeline fully automated, let's give this a try!

Thank you @mykiwi!

@mnapoli mnapoli merged commit 2d6c7de into brefphp:master Aug 25, 2021
@mykiwi mykiwi deleted the php81 branch August 25, 2021 08:25
cd layers/fpm-dev ; docker build -t bref/php-73-fpm-dev --build-arg PHP_VERSION=73 .
cd layers/fpm-dev ; docker build -t bref/php-74-fpm-dev --build-arg PHP_VERSION=74 .
cd layers/fpm-dev ; docker build -t bref/php-80-fpm-dev --build-arg PHP_VERSION=80 .
#cd layers/fpm-dev ; docker build -t bref/php-81-fpm-dev --build-arg PHP_VERSION=81 . # xdebug not ok
Copy link
Contributor

Choose a reason for hiding this comment

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

Would have been nice to enabling it but without xdebug ATM, WDYT? I can try a PR if 🆗

Copy link
Member

Choose a reason for hiding this comment

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

👍 sounds good to me

Copy link
Contributor Author

@mykiwi mykiwi Aug 25, 2021

Choose a reason for hiding this comment

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

I will try to rework on it if my free time allows me, 👍 for trying on your side

Copy link
Member

Choose a reason for hiding this comment

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

Whoever picks this up, consider taking a quick look at https://github.com/brefphp/bref/blob/master/Makefile#L18 to see if it's easy to start publishing php-81 images on Docker Hub, that would help me test PHP 8.1!

Copy link
Contributor

Choose a reason for hiding this comment

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

@deleugpn @mykiwi @mnapoli the PR is here 😉
#1007

@Nyholm I also have started some changes in extra extensions repository so will make a PR once php-81 docker images are published on docker hub.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry #1008 as an upfix of #1007... but I've also prepared the extra extensions PR brefphp/extra-php-extensions#261

mnapoli added a commit that referenced this pull request Dec 7, 2021
Re-enable xdebug in the PHP 8.1 dev container following #980 and #1007
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants