Skip to content

Commit

Permalink
Merge 7b3525d into e4fb073
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell committed Jul 26, 2023
2 parents e4fb073 + 7b3525d commit 5d7c613
Show file tree
Hide file tree
Showing 20 changed files with 37 additions and 35 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/integrate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,9 @@ jobs:
key: npm-v16-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }}

# Potentially needed for test/integration/curated-plugins-python.test.js
# (current GA runtime comes with Python 3.8 preinstalled, but that might be subject to changes)
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.11'

- name: Install Node.js and npm
uses: actions/setup-node@v1
Expand Down
2 changes: 1 addition & 1 deletion docs/providers/aws/guide/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ functions:
handler: handler.hello # required, handler set in AWS Lambda
name: ${sls:stage}-lambdaName # optional, Deployed Lambda name
description: Description of what the lambda function does # optional, Description to publish to AWS
runtime: python3.9 # optional overwrite, default is provider runtime
runtime: python3.11 # optional overwrite, default is provider runtime
runtimeManagement:
mode: manual # syntax required for manual, mode property also supports 'auto' or 'onFunctionUpdate' (see provider.runtimeManagement)
arn: <aws runtime arn> # required when mode is manual
Expand Down
4 changes: 2 additions & 2 deletions docs/providers/aws/guide/layers.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ layers:
name: ${sls:stage}-layerName # optional, Deployed Lambda layer name
description: Description of what the lambda layer does # optional, Description to publish to AWS
compatibleRuntimes: # optional, a list of runtimes this layer is compatible with
- python3.8
- python3.11
compatibleArchitectures: # optional, a list of architectures this layer is compatible with
- x86_64
- arm64
Expand Down Expand Up @@ -186,7 +186,7 @@ service: myService

provider:
name: aws
runtime: python3.8
runtime: python3.11
layers:
- arn:aws:lambda:us-east-1:xxxxxxxxxxxxx:layer:xxxxx:mylayer1
- arn:aws:lambda:us-east-1:xxxxxxxxxxxxx:layer:xxxxx:mylayer2
Expand Down
2 changes: 1 addition & 1 deletion docs/providers/aws/guide/serverless.yml.md
Original file line number Diff line number Diff line change
Expand Up @@ -1334,7 +1334,7 @@ layers:
description: Description of what the lambda layer does
# optional, a list of runtimes this layer is compatible with
compatibleRuntimes:
- python3.8
- python3.11
# optional, a list of architectures this layer is compatible with
compatibleArchitectures:
- x86_64
Expand Down
4 changes: 2 additions & 2 deletions docs/providers/kubeless/cli-reference/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ These are the current available templates for Kubeless:
serverless create --template kubeless-python --name my-special-service
```

This example will generate scaffolding for a service with `kubeless` as a provider and `python3.9` as runtime. The scaffolding will be generated in the current working directory.
This example will generate scaffolding for a service with `kubeless` as a provider and `python3.11` as runtime. The scaffolding will be generated in the current working directory.

The provider which is used for deployment later on is Kubeless.

Expand All @@ -75,7 +75,7 @@ The provider which is used for deployment later on is Kubeless.
serverless create --template kubeless-python --path my-new-service
```

This example will generate scaffolding for a service with `kubeless` as a provider and `python3.9` as runtime. The scaffolding will be generated in the `my-new-service` directory. This directory will be created if not present. Otherwise Serverless will use the already present directory.
This example will generate scaffolding for a service with `kubeless` as a provider and `python3.11` as runtime. The scaffolding will be generated in the `my-new-service` directory. This directory will be created if not present. Otherwise Serverless will use the already present directory.

Additionally Serverless will rename the service according to the path you provide. In this example the service will be renamed to `my-new-service`.

Expand Down
2 changes: 1 addition & 1 deletion docs/providers/kubeless/cli-reference/info.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Metadata
Timestamp: 2017-08-25T09:19:24Z
Function Info
Handler: handler.hello
Runtime: python3.9
Runtime: python3.11
Trigger: HTTP
Dependencies:
Metadata:
Expand Down
2 changes: 1 addition & 1 deletion docs/providers/kubeless/events/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ service: testing-pkg

provider:
name: kubeless
runtime: python3.9
runtime: python3.11

plugins:
- serverless-kubeless
Expand Down
2 changes: 1 addition & 1 deletion docs/providers/kubeless/events/pubsub.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ service: hello
provider:
name: kubeless
runtime: python3.9
runtime: python3.11
plugins:
- serverless-kubeless
Expand Down
10 changes: 5 additions & 5 deletions docs/providers/kubeless/guide/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ And its corresponding Serverless YAML file:
service: bikesearch
provider:
name: kubeless
runtime: python3.9
runtime: python3.11

plugins:
- serverless-kubeless
Expand Down Expand Up @@ -120,9 +120,9 @@ Hit Ctrl-C to quit.
172.17.0.1 - - [25/Aug/2017:08:46:04 +0000] "GET /healthz HTTP/1.1" 200 2 "" "Go-http-client/1.1" 0/82
172.17.0.1 - - [25/Aug/2017:08:46:07 +0000] "POST / HTTP/1.1" 200 459 "" "" 1/957186
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/bottle.py", line 862, in _handle
File "/usr/local/lib/python3.11/site-packages/bottle.py", line 862, in _handle
return route.call(**args)
File "/usr/local/lib/python3.9/site-packages/bottle.py", line 1740, in wrapper
File "/usr/local/lib/python3.11/site-packages/bottle.py", line 1740, in wrapper
rv = callback(*a, **ka)
File "/kubeless.py", line 35, in handler
return func(bottle.request)
Expand All @@ -139,9 +139,9 @@ KeyError: 'term'
172.17.0.1 - - [25/Aug/2017:08:49:04 +0000] "GET /healthz HTTP/1.1" 200 2 "" "Go-http-client/1.1" 0/98
172.17.0.1 - - [25/Aug/2017:08:49:23 +0000] "POST / HTTP/1.1" 500 746 "" "" 0/655
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/bottle.py", line 862, in _handle
File "/usr/local/lib/python3.11/site-packages/bottle.py", line 862, in _handle
return route.call(**args)
File "/usr/local/lib/python3.9/site-packages/bottle.py", line 1740, in wrapper
File "/usr/local/lib/python3.11/site-packages/bottle.py", line 1740, in wrapper
rv = callback(*a, **ka)
File "/kubeless.py", line 35, in handler
return func(bottle.request)
Expand Down
4 changes: 2 additions & 2 deletions docs/providers/kubeless/guide/deploying.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ For example, let's take the following example `serverless.yml` file:
service: new-project
provider:
name: kubeless
runtime: python3.9
runtime: python3.11

plugins:
- serverless-kubeless
Expand Down Expand Up @@ -86,7 +86,7 @@ In order to overcome this limitation, function code can be fetched from [externa
```yaml
provider:
name: kubeless
runtime: python3.9
runtime: python3.11
deploy:
strategy: S3ZipContent
options:
Expand Down
10 changes: 5 additions & 5 deletions docs/providers/kubeless/guide/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ service: my-service

provider:
name: kubeless
runtime: python3.9
memorySize: 512M # optional, maximum memory
runtime: python3.11
memorySize: 512 # optional, maximum memory
timeout: 10 # optional, in seconds, default is 180
namespace: funcions # optional, deployment namespace if not specified it uses "default"
ingress: # optional, ingress configuration if not using nginx
Expand All @@ -46,7 +46,7 @@ functions:
# The function to call as a response to the HTTP event
handler: handler.hello # required, handler set
description: Description of what the function does # optional, to set the description as an annotation
memorySize: 512M # optional, maximum memory
memorySize: 512 # optional, maximum memory
timeout: 10 # optional, in seconds, default is 180
namespace: funcions # optional, deployment namespace, if not specified "default" will be used
port: 8081 # optional, deploy http-based function with a custom port, default is 8080
Expand Down Expand Up @@ -80,7 +80,7 @@ service: my-service

provider:
name: kubeless
runtime: python3.9
runtime: python3.11

plugins:
- serverless-kubeless
Expand Down Expand Up @@ -340,7 +340,7 @@ service: hello

provider:
name: kubeless
runtime: python3.9
runtime: python3.11

plugins:
- serverless-kubeless
Expand Down
6 changes: 3 additions & 3 deletions docs/providers/kubeless/guide/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ You can see the name of the service, the provider configuration and the first fu
service: new-project
provider:
name: kubeless
runtime: python3.9
runtime: python3.11

plugins:
- serverless-kubeless
Expand Down Expand Up @@ -151,7 +151,7 @@ service: users

provider:
name: kubeless
runtime: python3.9
runtime: python3.11
```

Expand All @@ -166,7 +166,7 @@ service: users

provider:
name: kubeless
runtime: python3.9
runtime: python3.11

```
2 changes: 1 addition & 1 deletion docs/providers/spotinst/examples/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ serverless invoke --function hello
In your terminal window you should see the response

```bash
'{"hello":"from Python3.9 function"}'
'{"hello":"from Python3.11 function"}'
```

Congrats you have deployed and ran your Hello World function!
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/aws/invoke-local/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ class AwsInvokeLocal {
);
}

if (['python3.7', 'python3.8', 'python3.9', 'python3.10'].includes(runtime)) {
if (['python3.7', 'python3.8', 'python3.9', 'python3.10', 'python3.11'].includes(runtime)) {
const handlerComponents = handler.split(/\./);
const handlerPath = handlerComponents.slice(0, -1).join('.');
const handlerName = handlerComponents.pop();
Expand Down
1 change: 1 addition & 0 deletions lib/plugins/aws/provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,7 @@ class AwsProvider {
'python3.8',
'python3.9',
'python3.10',
'python3.11',
'ruby2.7',
'ruby3.2',
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ frameworkVersion: '*'

provider:
name: aws
runtime: python3.8
runtime: python3.11

functions:
function:
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/programmatic/invocation/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ functions:
handler: remaining-time.handler
timeout: 3
python:
runtime: python3.8
runtime: python3.11
handler: handler.handler
pythonRemainingTime:
runtime: python3.8
runtime: python3.11
handler: remaining_time.handler
timeout: 3
ruby:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const ServerlessSDKMock = class ServerlessSDK {
'python3.8',
'python3.9',
'python3.10',
'python3.11',
],
supportedRegions: [
'us-east-1',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ describe('test/unit/lib/cli/interactive-setup/dashboard-set-org.test.js', functi
'python3.8',
'python3.9',
'python3.10',
'python3.11',
],
supportedRegions: [
'us-east-1',
Expand Down
6 changes: 3 additions & 3 deletions test/unit/lib/plugins/aws/invoke-local/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,11 +440,11 @@ describe('AwsInvokeLocal', () => {
).to.be.equal(true);
});

it('should call invokeLocalPython when python3.9 runtime is set', async () => {
awsInvokeLocal.options.functionObj.runtime = 'python3.9';
it('should call invokeLocalPython when python3.11 runtime is set', async () => {
awsInvokeLocal.options.functionObj.runtime = 'python3.11';
await awsInvokeLocal.invokeLocal();
// NOTE: this is important so that tests on Windows won't fail
const runtime = process.platform === 'win32' ? 'python.exe' : 'python3.9';
const runtime = process.platform === 'win32' ? 'python.exe' : 'python3.11';
expect(invokeLocalPythonStub.calledOnce).to.be.equal(true);
expect(
invokeLocalPythonStub.calledWithExactly(runtime, 'handler', 'hello', {}, undefined)
Expand Down

0 comments on commit 5d7c613

Please sign in to comment.