Question, Bug, or Feature?
Type: Bug
Enter Task Name: KubernetesManifestV0
Server - Azure Pipelines:
Agent - Hosted:
We're building Docker image, pushing it to ACR and on the last step deploying to the AKS with KubernetesManifestV0 step.
When we're trying to update older pipelines, getting an error: The pipeline is not valid. Job Job_1: Step input 'baselineAndCanaryReplicas' with value '0' does not satisfy 'isMatch(value, '(^[1-9]\d*$)','Multiline')': Enter valid value greater than 0.. The deployment strategy is None in our definitions. But the step is trying to validate Canary parameters. When we defined them we didn't face the exception. I think this change doesn't have backward compatibility. New definitions have the default value but older ones don't have. For example (it's exporting from another pipeline);
"inputs": {
"action": "deploy",
"namespace": "default",
"strategy": "none",
"trafficSplitMethod": "pod",
"percentage": "0",
"baselineAndCanaryReplicas": "0",
"manifests": "$(System.DefaultWorkingDirectory)/.kubernetes-manifests/Rasyotek.Services.EmployeeList.yaml",
...
}
To create a workaround (it doesn't make sense) for the problem;
baselineAndCanaryReplicas property from 0 to 1. I'm trying to read execution flow while the task is saving;
Firstly This block is running.
On the after step this line is running and throwing the exception.
This function is getting deploymentStrategy from pipeline settings. On my scenario the value is none. deploymentStrategy.toUpperCase() === canaryDeploymentHelper.CANARY_DEPLOYMENT_STRATEGY statement should return false and execution should be continued, right? But it's throwing!
When I'm removing the task from pipeline and adding again with same parameters, baselineAndCanaryReplicas value is set as 1. Default value is coming from here and it's works like a charm! But the deploymentStrategy property is still none. I couldn't understand what's the difference.
Pipeline cannot be saved, so it's not running and it doesn't have any logs.
Pipeline cannot be saved, so it's not running and it doesn't have any diagnostic logs.
The pipeline is not valid. Job Job_1: Step input 'baselineAndCanaryReplicas' with value '0' does not satisfy 'isMatch(value, '(^[1-9]\d*$)','Multiline')': Enter valid value greater than 0.
Hi @shigupt202, thank you for your quick action. I'm getting the same exception for now. When your changes reflect our pipelines?
@selcukusta The code has been fixed to support back compatibility. However, the deployment with the fixed code will roll out to all the customers within 1 to 2 weeks.
Hello Dears,
I have the same problem with pipelines that have kubernetes deployment tasks. I know the problem already has been fixed and it will be applied till next 1 or 2 weeks, but just tell me know, do we have any short term solutions?
Thank you
Hi @mrvarmazyar, you could use my workaround which is described above.
@selcukusta Thanks mate, It's been fixed with your workaround. You made my day.