apache / apache/openwhisk-runtime-nodejs

Knative implementation returns init response on non-stem cell first runs

Đang mở
#163 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
65
Fork
72
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

On the first run of non-stem cell (environmentally initialized containers), return the initialization response rather than the return of the run.

Replication steps:
service.yaml:
```yaml
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: greetings-builtin-code
namespace: default
spec:
template:
spec:
containers:
- image: openwhisk/action-nodejs-v12
env:
- name: __OW_RUNTIME_PLATFORM
value: knative
- name: __OW_ACTION_NAME
value: greetings-builtin-code
- name: __OW_ACTION_CODE
value: "function main(params) {return {payload: 'Hello ' + params.name + ' from ' + params.place + '!'};}"
```
After deployment,
```bash
kubectl apply -f service.yaml
```
```bash
service.serving.knative.dev/greetings-builtin-code configured
```
```bash
kubectl get ksvc
```
```bash
NAME URL LATESTCREATED LATESTREADY READY REASON
greetings-builtin-code http://greetings-builtin-code.default.example.com greetings-builtin-code-fv6cv greetings-builtin-code-fv6cv True
```
value-data.json
```json
{
"value": {
"name" : "Will",
"place" : "Austin"
}
}
```
Now when curl'ing the endpoint, we expect to see the function run
```bash
curl -d @value-data.json http://greetings-builtin-code.default.example.com
```
instead we see
```json
{"OK":true}
```
I can potentially look into the fix, but I definitely wanted to write down the replication steps before I forgot.

## Environment details:

* local deployment, vagrant, native ubuntu, Mac OS, Bluemix, ...
* version of docker, vagrant, ubuntu, ...

## Steps to reproduce the issue:

1.
2.
3.

## Provide the expected results and outputs:

```
output comes here
```

## Provide the actual results and outputs:

```
output comes here
```

## Additional information you deem important:
* issue happens only occasionally or under certain circumstances
* changes you did or observed in the environment

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.