Unable to redeploy functions
See original GitHub issueWhen deploying a function, the first time I can deploy it without any issues, but if I try to redeploy it, either with the command sls deploy
or only deploying the function with sls deploy -f ping
, I got an error coming from kubernetes:
$ sls deploy -f ping
Serverless: Packaging function: ping...
Serverless: Excluding development dependencies...
Serverless: Redeploying ping...
Error --------------------------------------------------
Found errors while processing the given functions:
Error: Unable to update the function ping. Received:
Code: 422
Message: Function.kubeless.io "ping" is invalid: apiVersion: Invalid value: "Function": must be kubeless.io/v1beta1
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information -----------------------------
OS: darwin
Node Version: 8.11.1
Serverless Version: 1.27.3
The first time after deploying everything it works perfect, but afterwards I am getting this error.
This is my serverless.yml
file:
service: pingpong
provider:
name: kubeless
runtime: nodejs8
hostname: myhostname.io
plugins:
- serverless-kubeless
functions:
ping:
handler: handler.ping
events:
- http:
path: /ping
And this is the handler:
const _ = require('lodash');
const fetch = require('node-fetch');
const ping = (event, context) => {
const { request, response } = event.extensions;
_.assign(event.data, { date: new Date().toTimeString() });
return fetch('http://pong:8080/pong', {
method: 'GET'
}).then(async (res) => {
const resp = await res.json();
return {
msg: 'called from ping, and response from',
resp
}
});
};
module.exports = {
ping
};
I noticed that if I change the handler file and try to redeploy, then I don’t get any error, even if I only change one space.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Error: Functions did not deploy properly - firebase
In my case firebase deploy failed with the error "Error: Functions did not deploy properly." and no further explanation.
Read more >Not able to redeploy Azure Functions · Issue #279 - GitHub
Investigative information Please provide the following: Timestamp: Function App name: Function name(s) (as appropriate): Invocation ID: ...
Read more >Troubleshooting Cloud Functions - Google Cloud
If you have changed the role for this service account, deployment fails. ... Redeploy your function to allow unauthenticated invocations if this is ......
Read more >How To Fix A Failing Firebase Function Update - Medium
If you suddently can't update an existing Firebase Function, there is an easy fix.
Read more >Manage functions | Cloud Functions for Firebase - Google
Redeploy functions using the Firebase CLI v11.18.0 or later. Control scaling behavior. By default, Cloud Functions for Firebase scales the number of running ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I finally was able to reproduce it forcing the version 1.8.0. Apparently it’s a bug there but I am not able to find any reference to that. I recommend you to upgrade to 1.9 but if for some reason you need to run Kubernetes 1.8 you can still create it as:
Note that you need
hyperkit
for that. Sorry for the inconveniences.Thanks for looking at it! I’m in fact using 1.8.0, using hyperkit. I will move to 1.8.1 or try with 1.9.