owncloud-ci / php Goto Github PK
View Code? Open in Web Editor NEW:wrench: Docker images for PHP
License: MIT License
:wrench: Docker images for PHP
License: MIT License
Blocked by https://github.com/owncloud/client-updater-server/issues/97
And what else still uses PHP 5.6 in CI?
PHP 8.0
https://drone.owncloud.com/owncloud-ci/php/516/25/2
PHP Warning: foreach() argument must be of type array|object, null given in /usr/share/php/PEAR/Command.php on line 249
Warning: foreach() argument must be of type array|object, null given in PEAR/Command.php on line 249
Warning: foreach() argument must be of type array|object, null given in PEAR/Command.php on line 249
XML Extension not found
The command '/bin/sh -c ln -s /usr/include/oracle/12.2/client64 /usr/lib/oracle/12.2/client64/include && echo "instantclient,/usr/lib/oracle/12.2/client64/lib" | pecl install oci8-3.0.0' returned a non-zero code: 1
exit status 1
PHP 5.6
https://drone.owncloud.com/owncloud-ci/php/516/4/2
PHP Warning: Invalid argument supplied for foreach() in /usr/share/php/PEAR/Command.php on line 249
Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 249
PHP Warning: Invalid argument supplied for foreach() in /usr/share/php/PEAR/Command.php on line 249
XML Extension not found
The command '/bin/sh -c ln -s /usr/include/oracle/12.2/client64 /usr/lib/oracle/12.2/client64/include && echo "instantclient,/usr/lib/oracle/12.2/client64/lib" | pecl install oci8-2.0.12' returned a non-zero code: 1
exit status 1
I restarted the latest merge drone CI: https://drone.owncloud.com/owncloud-ci/php/565/19/2
It mentions PHP 7.4.32 - good.
Get:6 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 php7.4-common amd64 1:7.4.32-1+ubuntu18.04.1+deb.sury.org+2 [642 kB]
So we will now be running PHP 7.4.32 in CI.
Looks like some old-version PHP has "gone away" in conjunction with whatever Ubuntu we are trying to install it on...
We should be able to just remove all that. We do not need PHP 7.3 or earlier in any CI any more.
And I think that if we remove the old PHP build pipelines, the existing docker images for those versions will remain being published as-they-are. Is that correct @xoxys ?
Originally posted by @phil-davis in #164 (comment)
Recent Ubuntu disabled ghostscript .. we need to adopt ..
@tboerger simply overwrite this file - or what is the most resonable approach? THX
Today PHP 7.4.0 was released.
It will be easy to test with PHP 7.4 if there is an image here with PHP 7.4
php-imagick is meanwhile available via sury.
THX
Some time ago, we (oc engineers) agreed that our apps/core should be built with Node8 LTS
currently we use node6
Ref: https://github.com/owncloud-ci/php/blob/master/Dockerfile#L14
We've seen in some PRs in owncloud/core that php7.2 + memcached can cause segmentation faults.
For now in #32 memcached has been removed.
While debugging @crrodriguez has shared, that this issue happens when php shuts down and unloads the module - this might be circumvented by setting
export ZEND_DONT_UNLOAD_MODULES=1
latest
is usefulProbably we can just get rid of it.
Do docker images have to have a latest
?
the containers provide a great environment for running ownCloud - however, it limits the possibility for debugging currently.
XDEBUG is a great extension for debugging php code - I would like to add it again, and provide instructions on how to easily use the containers + xdebug + phpstorm for debugging
As we also run these containers in our ci pipeline - I can imagine, that we provide drone exec
with some helpers to ease the debugging of some parts
It was failing recently on the public drone. It has been just moved to https://drone.owncloud.com/owncloud-ci/php/438/1/2 but that is also failing.
Need to investigate.
The PHP 7.4 image is based on:
FROM owncloud/ubuntu:18.04-amd64
It looks like that was last updated-published on 2022-06-21 https://drone.owncloud.com/owncloud-docker/ubuntu/244/14/4
I tried to re-run the current CI for owncloud-ci/php : https://drone.owncloud.com/owncloud-ci/php/555/19/2
That gets the recently-released PHP 7.4.30, which is what I hoped to see - good.
But we are back to the Oracle client errors that we have had in the past:
Step 13/19 : RUN ln -s /usr/include/oracle/12.2/client64 /usr/lib/oracle/12.2/client64/include && echo "instantclient,/usr/lib/oracle/12.2/client64/lib" | pecl install oci8-2.2.0
---> Running in 8e8930250951
PHP Warning: foreach() argument must be of type array|object, null given in /usr/share/php/PEAR/Command.php on line 249
PHP Warning: foreach() argument must be of type array|object, null given in /usr/share/php/PEAR/Command.php on line 249
...
Warning: Trying to access array offset on value of type null in Role.php on line 250
Warning: Trying to access array offset on value of type null in Role.php on line 251
...
PHP Warning: Undefined array key "installable" in /usr/share/php/PEAR/Installer/Role.php on line 139
...
XML Extension not found
PHP Warning: foreach() argument must be of type array|object, null given in /usr/share/php/PEAR/Command.php on line 249
The command '/bin/sh -c ln -s /usr/include/oracle/12.2/client64 /usr/lib/oracle/12.2/client64/include && echo "instantclient,/usr/lib/oracle/12.2/client64/lib" | pecl install oci8-2.2.0' returned a non-zero code: 1
exit status 1
Needs investigation of each pipeline (Ubuntu+PHP combination) to see what is failing, and what needs to be tweaked.
To be able to use this image for running WND tests we need some dependencies included.
https://github.com/owncloud/windows_network_drive/blob/master/.travis.yml#L49-L54
The recent release of bamarni/composer-bin-plugin
https://github.com/bamarni/composer-bin-plugin/releases/tag/1.7.0 needs a later version of composer - something recent in the 2.3.* releases. The current release of composer is 2.3.9.
It will be easier all-round if composer is completely up-to-date, particularly in the PHP 7.3 and 7.4 images, which are the ones used in real-life every day in CI.
PHP-AST from the sury packages in the containers is still 0.1.6
- and no new version will soon be available.
This causes issues with phan and moving phan forward to the 2.x branch, as it requires later versions
[phan:19] php -d zend.enable_gc=0 vendor-bin/phan/vendor/bin/phan --config-file .phan/config.php --require-config-exists
[phan:20] ERROR: Phan 2.x requires php-ast 1.0.1+ because it depends on AST version 70. php-ast 0.1.6 is installed.
As per https://github.com/nikic/php-ast#installation - recommendation would be to use pecl and built ast for the installed version in the containers directly
In the WND CI improvements we can see:
In app.php line 1172:
App "External Storage: Windows Network Drives" cannot be installed because
the following dependencies are not fulfilled: The library libsmbclient is n
ot available.
owncloud-ci/php:7.1 has this modules:
$php -m
[PHP Modules]
apc
apcu
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
igbinary
imagick
intl
json
ldap
libsmbclient
libxml
mbstring
memcached
msgpack
mysqli
mysqlnd
oci8
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
pgsql
Phar
posix
readline
redis
Reflection
session
shmop
SimpleXML
smbclient
soap
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib
[Zend Modules]
Zend OPcache
owncloud-ci/php:7.2 has these ones:
$php -m
[PHP Modules]
apc
apcu
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
igbinary
imagick
intl
json
ldap
libxml
mbstring
mysqli
mysqlnd
oci8
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
pgsql
Phar
posix
readline
redis
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib
[Zend Modules]
Zend OPcache
Module smbclient is present in 7.1 but missing in 7.2.
When building the image locally I see the module included so perhaps it just needs to rebuild the docker hub image.
Not sure if this can be related: oerdnj/deb.sury.org#815
Following on from issue #89
https://drone.owncloud.com/owncloud/core/14078/97
https://drone.owncloud.com/owncloud/core/14078/103
------ -----------------------------------------------------------------------
Line lib/private/Memcache/Memcached.php
------ -----------------------------------------------------------------------
41 Property OC\Memcache\Memcached::$cache has unknown class Memcached as
its type.
48 Instantiated class Memcached not found.
51 Access to constant OPT_CONNECT_TIMEOUT on an unknown class Memcached.
from PR to test phan
and phpstan
on PHP 7.3 owncloud/core#33987
@DeepDiver1975 I guess it wants a memcached extension also.
PHP7.3 is in RC phase - it would be great to add it as soon as possible to be out with ownCloud 11
First try is in branch 7.3 - however the following extensions still triggers installation of 7.2
base packages
Thus they have been removed for the time being
we could extend the apachectl
wrapper to provide self-signed certs:
https://github.com/owncloud-ci/php/blob/master/rootfs/usr/local/bin/apachectl
phan
needs the ast
extension
phpstan
needs the apcu
extension
See test/trial PHP 7.3 core PR owncloud/core#33987 for the typical errors generated.
This morning I restarted the drone merge CI: https://drone.owncloud.com/owncloud-ci/php/466
It passed, which is a good thing.
I restarted it because new patch releases of PHP 8.0.1 and 7.4.x were released on 2021-01-07. The re-run of the merge CI docker publishes new releases of the docker images https://registry.hub.docker.com/r/owncloudci/php/tags?page=1&ordering=last_updated - those should now have PHP 8.0.1, but I just pulled docker pull owncloudci/php:8.0
and it seems to only have
# php --version
PHP 8.0.0 (cli) (built: Nov 27 2020 12:26:05) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.0-dev, Copyright (c) Zend Technologies
with Zend OPcache v8.0.0, Copyright (c), by Zend Technologies
Similarly, there is PHP 7.4.13 only in the rebuilt docker. But I see that my local Ubuntu 18.04 and 20.04 only have that patch release also - so maybe something upstream has not become available yet.
Anyway, the point of this issue is that I think we should "regularly" rebuild the PHP images to have the latest patch releases of PHP.
If we setup drone to automatically run a "monthly" job, then it will happen automatically. But then if the CI publishes the release, but something is broken in it (that the CI did not detect), other CI that uses it will suddenly break, and people will find it difficult to remember "last night was the monthly docker PHP update". They will fluff around looking for why the CI suddenly broke.
But if we run it manually, like I did this morning, then we will forget to do it.
Catch-22.
Line 15 in b10c068
It seems we use an old node version in all of those images (beginning with php 7.0 - before we used node 6 than we switched to 8 2 years ago) - this is a big mess - as this node version is no longer supported by nodejs
See here: https://en.wikipedia.org/wiki/Node.js#Releases
Line 17 in b10c068
Furthermore we use an old version of yarn (called yarn classic now) which is still supported, but regarding their webpage shall be decommissioned at any point in future and they "kindly" ask to migrate to yarn2.
See here: https://yarnpkg.com/getting-started/migration#why-should-you-migrate
How to address those issues? Where do we have dependencies from this container in our builds, that use node 8 (explicitly) and don't work with e.g. node 14 (LTS)?
Furthermore where is yarn used and can we migrate the yarn files to yarn2?
We should generally think of dropping every image not using php 7.4 or newer as all other PHP versions are outdated. Regarding this, we would get rid of Ubuntu 16.04 (outdated) and Ubuntu 18.04 (soon outdated) as well and could move to the new base image 20.04(LTS) everywhere.
Furthermore, we tried (should try) to stop using ondrej-repos for php, as they are fully managed by a single-point-of-failure and lead to several real-world-problems in the past, like ondrej starting to build his own version of openssl inside the php repo. That lead to a big mindboggling on our instances - and we should not implement the same in our docker images.
Line 20 in b10c068
I know this is a big issue - there might be an outcome of multiple PRs but I guess this is a general maintenance issue here - not just a single versioning problem. We should start a workforce to address those problems.
I don't know, but to me it looks like we should have a monthly maintenance round where things like this are addressed, issues opened and tasks are generated and distributed, to get rid of those issues. This affects most of the other repos in owncloud-ci as well - where versioning seems to be a bit off.
(this topic was brought up by @mmattel during depend-a-bot checks for our repos)
in a lot of build we are not interested in the access-log so it should be possible to set CustomLog /dev/stdout combined
to /dev/null
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.