add 'serverless: true' to pipeline

This commit is contained in:
Denis Bilenko 2025-02-14 17:11:22 +01:00
parent 5d29d84441
commit 71b6394ccd
3 changed files with 16 additions and 0 deletions

View File

@ -37,3 +37,11 @@
+ autoscale:
+ min_workers: 1
+ max_workers: 4
--- [TESTROOT]/bundle/templates/default-python/classic/../serverless/output/my_default_python/resources/my_default_python.pipeline.yml
+++ output/my_default_python/resources/my_default_python.pipeline.yml
@@ -6,5 +6,4 @@
catalog: main
target: my_default_python_${bundle.target}
- serverless: true
libraries:
- notebook:

View File

@ -5,6 +5,7 @@ resources:
name: my_default_python_pipeline
catalog: main
target: my_default_python_${bundle.target}
serverless: true
libraries:
- notebook:
path: ../src/dlt_pipeline.ipynb

View File

@ -1,3 +1,7 @@
{{$with_serverless := (eq .serverless "yes") -}}
{{if (eq .serverless "auto") -}}
{{$with_serverless = is_serverless_supported -}}
{{end -}}
# The main pipeline for {{.project_name}}
resources:
pipelines:
@ -10,6 +14,9 @@ resources:
catalog: {{default_catalog}}
{{- end}}
target: {{.project_name}}_${bundle.target}
{{- if $with_serverless }}
serverless: true
{{- end}}
libraries:
- notebook:
path: ../src/dlt_pipeline.ipynb