apache / openwhisk-runtime-php Goto Github PK
View Code? Open in Web Editor NEWApache OpenWhisk Runtime PHP supports Apache OpenWhisk functions written in PHP
Home Page: https://openwhisk.apache.org/
License: Apache License 2.0
Apache OpenWhisk Runtime PHP supports Apache OpenWhisk functions written in PHP
Home Page: https://openwhisk.apache.org/
License: Apache License 2.0
As of 4 months ago there is no latest
tag on the docker images hosted on https://hub.docker.com.
For example taking the php-v8.2 image. It only contains the short commit tag and the nightly tag, as specified here.
The php-v8.1 image contains a lot more tags, including release tags, but these tags are already 4 months old.
If this is a 'feature' then the readme is wrong and should be updated.
If this is a bug, how can I help?
Following Apache license header guideline, all human-readable Apache-developed files that are included within a distribution must include the header text with few exceptions. You can find few exceptions here: which files do not require a license header.
I used Apache Rat to check this repository after excluding a few files, and I got this report. We need to add Apache licensing header to those files.
Unapproved licenses:
openwhisk-runtime-php/core/php7.1Action/Dockerfile
openwhisk-runtime-php/tests/src/test/resources/application.conf
openwhisk-runtime-php/ansible/environments/local/group_vars/all
openwhisk-runtime-php/ansible/environments/local/hosts
The excluded files are:
**/*.json
**/**.gradle
**/gradlew
**/gradle/**
**/.**
**/templates/**
**/*.j2.*
**/.github/**
**/auth.whisk.system
**/auth.guest
**/i18n_resources.go
create an action from a function with invalid syntax and no logs are produced.
running the container locally will show for example
PHP Parse error: syntax error, unexpected ''...' (T_ENCAPSED_AND_WHITESPACE) in /phpAction/action/1/src/index.php on line 33
there are no sentinels and hence no logs.
pick up latest patch release http://us3.php.net/ChangeLog-7.php#7.2.13
There are some gradle and ansible commands in here that are not relevant - for example, deploying a full openwhisk stack.
Was this because more tests were intended, which run system integration tests using wsk action create && invoke?
As it stands, in this repo, only container unit tests are run which do not need to deploy openwhisk.
There are three references to WHISK_INPUT
such as the one below that I believe are of no consequence/dead code and should be removed if so.
I don't think it's a necessary requirement that the main function in a zip action is located in the file index.php. If we adopt the aws lambda convention of path/to/file.handler
then it's possible to locate the "index" anywhere in the zip and this is an added convenience particularly working with existing php code.
The Java proxy does not permit an action to be re-initialized [1]. This isn't true for the PHP runtime. All the runtimes should behave consistently. The basic action container tests suite will be extended to include a test for re-init, where the first init is expected to succeed but the second should fail. The action proxy will reject the request with status code 403 FORBIDDEN (although any non-20x is acceptable for rejection).
Pick up latest patch release
http://us3.php.net/ChangeLog-7.php#7.1.25
With PHP 7.1. out of active support now, we should deprecate it now as it'll be out of security fixes within a year.
the test directory 4 files, only 1 of which is relevant to testing this runtime; the rest are cloned from openwhisk repo and provide the test harness; we need to remove this duplication since it's a maintenance headache in general.
perhaps using the maven dependences is a way of doing that?
Update the Travis build to push a tag "master" to Docker when the master branch is updated.
This will make it easier to pull the image that aligns with the latest changes on the Master branch.
Reference can be taken from: apache/openwhisk-runtime-java#37
The user expects output to stdout and stderr to always show in logs.
Sentinels always print fine in 7.1, but not in 7.2
Take the following action example
<?php
function main(array $args) : array {
echo 'hello stdout';
file_put_contents("php://stderr",'hello stderr');
return $args;
}
The test action purposely doesn't print a new line, but the sentinel should printed in a new line for the invoker to pick the output to logs correctly
$ docker run -p 8080:8080 whisk/action-php-v7.1:latest
PHP 7.1.18 Development Server started at Mon Nov 12 21:10:55 2018
hello stderr
XXX_THE_END_OF_A_WHISK_ACTIVATION_XXX
hello stdout
XXX_THE_END_OF_A_WHISK_ACTIVATION_XXX
$ docker run -p 8080:8080 whisk/action-php-v7.2:latest
PHP 7.2.6 Development Server started at Mon Nov 12 21:10:32 2018
hello stderrXXX_THE_END_OF_A_WHISK_ACTIVATION_XXX
hello stdoutXXX_THE_END_OF_A_WHISK_ACTIVATION_XXX
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.