You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/09/24 15:06:12 UTC

[GitHub] [camel-k] MaciekLeks opened a new issue #1713: Salesforce Integration as Knative Serverless Service fails

MaciekLeks opened a new issue #1713:
URL: https://github.com/apache/camel-k/issues/1713


   I wrote some simple integration in CamelSource to emit a Platform Event, like so:
   ```yaml
   apiVersion: sources.knative.dev/v1alpha1
   kind: CamelSource
   metadata:
     name: camel-timer-source
   spec:
     source:
       integration:
         configuration:
           - type: secret
             value: salesforce
         dependencies:
           - camel:log
           - camel:salesforce
           - camel:bean
       flow:
         from:
           uri: timer:tick
           parameters:
             period: 3s
           steps:
             - set-header:
                 name: Content-Type
                 constant: application/json
            - transform:
                 simple: '{ "Field1__c": "${exchangeProperty.CamelTimerCounter}" }'
             - to: "log:received?showAll=true&multiline=true"
             - to:
                 uri: "salesforce:createSObject?sObjectName=Test__e"
     sink:
       ref:
         apiVersion: messaging.knative.dev/v1alpha1
         kind: KafkaChannel
         name: salesforce-out
   ```
   run as: 
   ```bash 
   kubectl apply -f 02-camel-ticker.yaml
   ```
   
   My salesforce.properties:
   ```properties
   camel.component.salesforce.config.raw-payload=true
   camel.component.salesforce.config.api-version=42.0
   camel.component.salesforce.login-config.type=USERNAME_PASSWORD
   camel.component.salesforce.login-config.login-url=...
   camel.component.salesforce.login-config.instance-url=...
   camel.component.salesforce.login-config.client-id=...
   camel.component.salesforce.login-config.client-secret=...
   camel.component.salesforce.login-config.user-name=...
   camel.component.salesforce.login-config.password=...
   ``` 
   is saved in a secret:
   ```bash
   kubectl create secret generic salesforce --from-file=salesforce.properties
   ```
   
   It works!
   
   Now I'm trying to make it Knative Serverless Service:
   ```yaml
   - from:
       uri: timer:tick
       parameters:
         period: 3s
       steps:
         - set-header:
             name: Content-Type
             constant: application/json
         - set-body:
             constant: '{ "Field1__c": "test" }'
         - to:
             uri: "salesforce:createSObject?sObjectName=Test__e"
   ```
   so I run it as follows:
   ```kamel run --secret=salesforce --dependency camel:salesforce --dependency came:log --dependency camel:bean  03-camel-ticker.yaml --dev```
   
   The results given by camel-k-operator says there is no matching credentials.
   ```log
   camel-k-operator-74c76d7478-65v9q camel-k-operator [INFO] Building camel-k-integration 1.1.1
   camel-k-operator-74c76d7478-65v9q camel-k-operator [INFO] --------------------------------[ jar ]---------------------------------
   camel-k-operator-74c76d7478-65v9q camel-k-operator [INFO]
   camel-k-operator-74c76d7478-65v9q camel-k-operator [INFO] --- camel-k-maven-plugin:1.4.1:generate-dependency-list (default-cli) @ camel-k-integration ---
   camel-k-operator-74c76d7478-65v9q camel-k-operator [INFO] ------------------------------------------------------------------------
   camel-k-operator-74c76d7478-65v9q camel-k-operator [INFO] BUILD SUCCESS
   camel-k-operator-74c76d7478-65v9q camel-k-operator [INFO] ------------------------------------------------------------------------
   camel-k-operator-74c76d7478-65v9q camel-k-operator [INFO] Total time:  2.283 s
   camel-k-operator-74c76d7478-65v9q camel-k-operator [INFO] Finished at: 2020-09-24T14:38:53Z
   camel-k-operator-74c76d7478-65v9q camel-k-operator [INFO] ------------------------------------------------------------------------
   camel-k-operator-74c76d7478-65v9q camel-k-operator {"level":"info","ts":1600958333.4652996,"logger":"camel-k.builder","msg":"step done in 4.428595 seconds","step":"github.com/apache/camel-k/pkg/builder/runtime/ComputeDependencies","phase":20,"name":"kit-btmatq5mqpm5ihe80gqg","task":"builder"}
   camel-k-operator-74c76d7478-65v9q camel-k-operator {"level":"info","ts":1600958333.4653776,"logger":"camel-k.builder","msg":"executing step","step":"github.com/apache/camel-k/pkg/builder/IncrementalImageContext","phase":30,"name":"kit-btmatq5mqpm5ihe80gqg","task":"builder"}
   camel-k-operator-74c76d7478-65v9q camel-k-operator {"level":"info","ts":1600958333.4736035,"logger":"camel-k.builder","msg":"step done in 0.008197 seconds","step":"github.com/apache/camel-k/pkg/builder/IncrementalImageContext","phase":30,"name":"kit-btmatq5mqpm5ihe80gqg","task":"builder"}
   camel-k-operator-74c76d7478-65v9q camel-k-operator {"level":"info","ts":1600958333.4736774,"logger":"camel-k.builder","msg":"executing step","step":"github.com/apache/camel-k/pkg/builder/spectrum/Publisher","phase":40,"name":"kit-btmatq5mqpm5ihe80gqg","task":"builder"}
   camel-k-operator-74c76d7478-65v9q camel-k-operator spectrum - 2020/09/24 14:38:53 No matching credentials were found, falling back on anonymous
   camel-k-operator-74c76d7478-65v9q camel-k-operator spectrum - 2020/09/24 14:38:53 Pulling base image 10.109.211.188/a/camel-k-kit-btln5pdmqpmaptfa8qi0@sha256:b30531f85fdc89c0f2a120110a2af2811d3017ffa2e2c0bca572f8b80b8c5d3d (insecure=true)...
   camel-k-operator-74c76d7478-65v9q camel-k-operator {"level":"info","ts":1600958333.4922576,"logger":"camel-k.builder","msg":"step failed with error: could not pull base image image 10.109.211.188/a/camel-k-kit-btln5pdmqpmaptfa8qi0@sha256:b30531f85fdc89c0f2a120110a2af2811d3017ffa2e2c0bca572f8b80b8c5d3d: GET http://10.109.211.188/v2/a/camel-k-kit-btln5pdmqpmaptfa8qi0/manifests/sha256:b30531f85fdc89c0f2a120110a2af2811d3017ffa2e2c0bca572f8b80b8c5d3d: MANIFEST_UNKNOWN: manifest unknown; map[Name:a/camel-k-kit-btln5pdmqpmaptfa8qi0 Revision:sha256:b30531f85fdc89c0f2a120110a2af2811d3017ffa2e2c0bca572f8b80b8c5d3d]","step":"github.com/apache/camel-k/pkg/builder/spectrum/Publisher","phase":40,"name":"kit-btmatq5mqpm5ihe80gqg","task":"builder"}
   camel-k-operator-74c76d7478-65v9q camel-k-operator {"level":"info","ts":1600958333.4923496,"logger":"camel-k.builder","msg":"dependencies: [camel:bean camel:core-languages camel:log camel:salesforce camel:timer mvn:org.apache.camel.k/camel-k-loader-yaml mvn:org.apache.camel.k/camel-k-runtime-main]"}
   ```
   ...and the whole play stops.
   
   Any ideas?
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] nicolaferraro commented on issue #1713: Salesforce Integration as Knative Serverless Service fails

Posted by GitBox <gi...@apache.org>.
nicolaferraro commented on issue #1713:
URL: https://github.com/apache/camel-k/issues/1713#issuecomment-698427986


   I think the relevant problem is here: ` MANIFEST_UNKNOWN: manifest unknown`
   This is an issue that happened more in the past. There are some incompatibilities between the registry and the client...
   
   I think that doing a `kamel reset` will trigger a new build from scratch, so you'd see the integration running again.
   
   This is independent from what you write in the DSL.
   
   P.s. to make a serverless service, you probably need to start from something scalable, e.g. from: uri: knative:endpoint/service
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] nicolaferraro commented on issue #1713: Salesforce Integration as Knative Serverless Service fails

Posted by GitBox <gi...@apache.org>.
nicolaferraro commented on issue #1713:
URL: https://github.com/apache/camel-k/issues/1713#issuecomment-698427986


   I think the relevant problem is here: ` MANIFEST_UNKNOWN: manifest unknown`
   This is an issue that happened more in the past. There are some incompatibilities between the registry and the client...
   
   I think that doing a `kamel reset` will trigger a new build from scratch, so you'd see the integration running again.
   
   This is independent from what you write in the DSL.
   
   P.s. to make a serverless service, you probably need to start from something scalable, e.g. from: uri: knative:endpoint/service
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] MaciekLeks closed issue #1713: Salesforce Integration as Knative Serverless Service fails

Posted by GitBox <gi...@apache.org>.
MaciekLeks closed issue #1713:
URL: https://github.com/apache/camel-k/issues/1713


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] MaciekLeks commented on issue #1713: Salesforce Integration as Knative Serverless Service fails

Posted by GitBox <gi...@apache.org>.
MaciekLeks commented on issue #1713:
URL: https://github.com/apache/camel-k/issues/1713#issuecomment-698461086


   @nicolaferraro What can I say. You are the boss, that is, ```kamel reset``` did the job.
   
   As far to serverless service you are right. I forgot to mention that it's not a serverless version of code. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] MaciekLeks closed issue #1713: Salesforce Integration as Knative Serverless Service fails

Posted by GitBox <gi...@apache.org>.
MaciekLeks closed issue #1713:
URL: https://github.com/apache/camel-k/issues/1713


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] MaciekLeks commented on issue #1713: Salesforce Integration as Knative Serverless Service fails

Posted by GitBox <gi...@apache.org>.
MaciekLeks commented on issue #1713:
URL: https://github.com/apache/camel-k/issues/1713#issuecomment-698461086


   @nicolaferraro What can I say. You are the boss, that is, ```kamel reset``` did the job.
   
   As far to serverless service you are right. I forgot to mention that it's not a serverless version of code. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org