Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Behavior mismatch when using scale command between pipeline and regular powershell terminal #19040

Open
1 of 4 tasks
ricardomomm opened this issue Sep 28, 2023 · 5 comments

Comments

@ricardomomm
Copy link

Task name

Kubernetes

Task version

1

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

Windows 10

Task log

Starting: Resume XYZ Service
==============================================================================
Task         : Kubectl
Description  : Deploy, configure, update a Kubernetes cluster in Azure Container Service by running kubectl commands
Version      : 1.227.0
Author       : Microsoft Corporation
Help         : https://aka.ms/azpipes-kubectl-tsg
==============================================================================
==============================================================================
			Kubectl Client Version: v1.27.2
			Kubectl Server Version: v1.24.15
==============================================================================
"F:\AzureAgents\Agent 2\_work\_tool\kubectl\1.27.2\x64\kubectl.exe" scale -n mynamespace --replicas='1' deployment/mydeployment -o json
error: invalid argument "'1'" for "--replicas" flag: strconv.ParseInt: parsing "'1'": invalid syntax
See 'kubectl scale --help' for usage.
commandOutput
##[error]The process 'F:\AzureAgents\Agent 2\_work\_tool\kubectl\1.27.2\x64\kubectl.exe' failed with exit code 1
Finishing: Resume XYZ Service

Relevant log output

error: invalid argument "'1'" for "--replicas" flag: strconv.ParseInt: parsing "'1'": invalid syntax

Aditional info

When executing locally, same kubectl version against the same aks cluster it works as expected with either '1' (single quotes), "1" (double quotes) or 1 (no quotes):

PS C:\Users\RM> kubectl version --short
Flag --short has been deprecated, and will be removed in the future. The --short output will become the default.
Client Version: v1.27.2
Kustomize Version: v5.0.1
Server Version: v1.24.15
PS C:\Users\RM> kubectl scale -n mynamespace --replicas="1" deployment/mydeployment
deployment.apps/mydeployment scaled
PS C:\Users\RM> kubectl scale -n mynamespace --replicas='1' deployment/mydeployment
deployment.apps/mydeployment scaled

Local environment:
Windows 11
PSVersion 5.1.22621.1778
@ricardomomm ricardomomm changed the title [BUG]: Behavior miss match when using scale command between pipeline and regular powershell terminal [BUG]: Behavior mismatch when using scale command between pipeline and regular powershell terminal Sep 28, 2023
Copy link

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

@github-actions github-actions bot added the stale label Mar 26, 2024
@ricardomomm
Copy link
Author

Bump

@github-actions github-actions bot removed the stale label Mar 26, 2024
@ricardomomm
Copy link
Author

Bump

Copy link

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

@github-actions github-actions bot added the stale label Nov 10, 2024
@ricardomomm
Copy link
Author

bump

@github-actions github-actions bot removed the stale label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant