Azure / service-fabric-mesh-preview

Service Fabric Mesh is the Service Fabric's serverless offering to enable developers to deploy containerized applications without managing infrastructure. Service Fabric Mesh , aka project “SeaBreeze” is currently available in private preview. This repository will be used for tracking bugs/feature requests as GitHub issues and for maintaining the latest documentation.
MIT License
82 stars 12 forks source link

Bug: Service Fabric tools - Service.yaml - Must be aware of regional settings (decimal operator) #265

Closed RonnyA closed 5 years ago

RonnyA commented 6 years ago

Reproduce: This quickstart https://docs.microsoft.com/en-us/azure/service-fabric-mesh/service-fabric-mesh-quickstart-dotnet-core Regional settings: Set decimal separator to "," (not ".")

My regional settings are Norway, and here we use "," not "." for decimal separator

In Services.yaml the default value was 0.5 for cpu. Changing this to 0,5 or 1 (no decimal) made the solution to compile.

Also tested to set regional settings, separator to "." and then cpu value with "0.5" compiles ok.

Solution: Fix the tools to allow for different locale but still work with "." in the .yaml files

-------Service.yaml-----------

Service definition

application: schemaVersion: 1.0.0-preview1 name: MySFMeshApp properties: services:

---- compile error log --- The container runtime settings for Service MyWebApp, CodePackage MyWebApp have changed. The application must be deployed. Preparing Service Fabric application in local Service Fabric cluster... C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Mesh\SfSbzYamlMerge\SfSbzYamlMerge.exe /i:"C:\Users\Ronny\Documents\Visual Studio 2017\Projects\MySFMeshApp\MyWebApp\Service Resources\service.yaml" /i:"C:\Users\Ronny\Documents\Visual Studio 2017\Projects\MySFMeshApp\MySFMeshApp\App Resources\app.yaml" /i:"C:\Users\Ronny\Documents\Visual Studio 2017\Projects\MySFMeshApp\MySFMeshApp\obj\SFApp\App.debug.yaml" /o:"C:\Users\Ronny\Documents\Visual Studio 2017\Projects\MySFMeshApp\MySFMeshApp\obj\SFApp" /of:"SF_SBZ_JSON" at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) Input string was not in a correct format. at Microsoft.ServiceFabric.Yaml2Json.Yaml2Json.FixProperty(JToken container, IList1 pathComponents, PrimitiveType type, Int32 level) at Microsoft.ServiceFabric.Yaml2Json.Yaml2Json.FixProperty(JToken container, IList1 pathComponents, PrimitiveType type, Int32 level) at Microsoft.ServiceFabric.Yaml2Json.Yaml2Json.FixProperty(JToken container, IList1 pathComponents, PrimitiveType type, Int32 level) System.FormatException: Input string was not in a correct format. at Microsoft.ServiceFabric.Yaml2Json.Yaml2Json.FixProperty(JToken container, IList1 pathComponents, PrimitiveType type, Int32 level) at CallSite.Target(Closure , CallSite , Type , Object , IList1 ) at Microsoft.ServiceFabric.Yaml2Json.Yaml2Json.FixProperties(JToken container, IList1 primitiveProperties) at Microsoft.ServiceFabric.Yaml2Json.Yaml2Json.FixProperty(JToken container, IList1 pathComponents, PrimitiveType type, Int32 level) at SfSbzYamlMerge.Program.Main(String[] args) at Microsoft.ServiceFabric.Yaml2Json.Yaml2Json.FixProperty(JToken container, IList1 pathComponents, PrimitiveType type, Int32 level) at Microsoft.ServiceFabric.Yaml2Json.Yaml2Json.FixProperty(JToken container, IList1 pathComponents, PrimitiveType type, Int32 level) at Microsoft.ServiceFabric.Yaml2Json.Yaml2Json.FixProperty(JToken container, IList1 pathComponents, PrimitiveType type, Int32 level) at Microsoft.ServiceFabric.Yaml2Json.Yaml2Json.FixProperty(JToken container, IList1 pathComponents, PrimitiveType type, Int32 level) at Microsoft.ServiceFabric.Yaml2Json.Yaml2Json.FixProperty(JToken container, IList1 pathComponents, PrimitiveType type, Int32 level) at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid3[T0,T1,T2](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.ServiceFabric.Yaml2Json.Yaml2Json.FixProperty(JToken container, String propertyName, PrimitiveType type) at Microsoft.ServiceFabric.Yaml2Json.Yaml2Json.ToJson(YamlMappingNode yamlNode, String outputPropertyFilter, IList1 primitiveProperties) at SfSbzYamlMerge.Program.SaveMergedJsonDocument(YamlDocument mergedDocument, KeyValuePair2 resourceKindNamePair) Deployment of Service Fabric application to local Service Fabric cluster failed. ========== Finished ==========

mikkelhegn commented 5 years ago

Thanks for reporting this, it's a known issue being tracked here: https://github.com/Azure/service-fabric-mesh-preview/issues/131