1+ import os
2+ from typing import Optional
3+
14from feldera .rest .feldera_client import FelderaClient
25from feldera .rest .pipeline import Pipeline as InnerPipeline
36from feldera .pipeline import Pipeline
@@ -32,6 +35,7 @@ def __init__(
3235 description : str = "" ,
3336 compilation_profile : CompilationProfile = CompilationProfile .OPTIMIZED ,
3437 runtime_config : RuntimeConfig = RuntimeConfig .default (),
38+ runtime_version : Optional [str ] = None ,
3539 ):
3640 self .client : FelderaClient = client
3741 self .name : str | None = name
@@ -41,6 +45,9 @@ def __init__(
4145 self .udf_toml : str = udf_toml
4246 self .compilation_profile : CompilationProfile = compilation_profile
4347 self .runtime_config : RuntimeConfig = runtime_config
48+ self .runtime_version : Optional [str ] = runtime_version or os .environ .get (
49+ "FELDERA_RUNTIME_VERSION"
50+ )
4451
4552 def create (self ) -> Pipeline :
4653 """
@@ -67,6 +74,7 @@ def create(self) -> Pipeline:
6774 udf_toml = self .udf_toml ,
6875 program_config = {
6976 "profile" : self .compilation_profile .value ,
77+ "runtime_version" : self .runtime_version ,
7078 },
7179 runtime_config = self .runtime_config .to_dict (),
7280 )
0 commit comments