Skip to content
This repository has been archived by the owner on Dec 16, 2020. It is now read-only.

Annotation prefix is not removed #29

Closed
ivanayov opened this issue Aug 8, 2018 · 3 comments · Fixed by #30
Closed

Annotation prefix is not removed #29

ivanayov opened this issue Aug 8, 2018 · 3 comments · Fixed by #30
Assignees

Comments

@ivanayov
Copy link
Contributor

ivanayov commented Aug 8, 2018

This is the function configuration:

provider:
  name: faas
  gateway: http://127.0.0.1:8080

functions:
  kafka-test:
    lang: python
    handler: ./kafka-test
    image: kafka-test
    annotations:
      topic: faas-request
    basic_auth: false

curl -X GET http://127.0.0.1:8080/system/function/kafka-test should return

{  
   "name":"kafka-test",
   "image":"kafka-test:latest",
   "invocationCount":0,
   "replicas":1,
   "envProcess":"python index.py",
   "availableReplicas":1,
   "labels":{  
      "com.openfaas.function":"kafka-test",
      "com.openfaas.uid":"92309200",
      "function":"true"
   },
   "annotations":{  
      "topic":"faas-request"
   }
}

but instead the annotations are prefixed:

 "annotations":{  
      "com.openfaas.annotations.topic":"faas-request"
   }

Possible Solution

The bug is on reader.go#L95.
The prefix is not removed.

Context

Found while testing pull #6
Follows #28

Some integration tests are good to have.

@ewilde Could you please have a look?

@ivanayov
Copy link
Contributor Author

ivanayov commented Aug 8, 2018

Derek assign: ewilde

@derek derek bot assigned ewilde Aug 8, 2018
@ewilde
Copy link
Contributor

ewilde commented Aug 8, 2018

@ivanayov will do

ewilde added a commit to ewilde/faas-swarm that referenced this issue Aug 8, 2018
Resolves: openfaas#29

Signed-off-by: Edward Wilde <ewilde@gmail.com>
alexellis pushed a commit that referenced this issue Aug 8, 2018
Resolves: #29

Signed-off-by: Edward Wilde <ewilde@gmail.com>
@ivanayov
Copy link
Contributor Author

ivanayov commented Aug 8, 2018

Thanks @ewilde

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants