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

az containerapp job update overwrites all scale rules instead of updating one #28226

Closed
acidbubbles opened this issue Jan 21, 2024 · 4 comments
Closed
Labels
Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. ContainerApp customer-reported Issues that are reported by GitHub users external to the Azure organization. Service Attention This issue is responsible by Azure service team.

Comments

@acidbubbles
Copy link

Describe the bug

Run a command like this one:

az containerapp job update --name $NAME --resource-group $RG --scale-rule-name $SR_NAME --scale-rule-type "azure-queue" --scale-rule-metadata "accountName=$ACCOUNT_NAME" "queueName=$QUEUE_NAME" "queueLength=1" --scale-rule-auth "connection=connection-string-secret"

It will effectively create the desired scale rule. However, it will also delete all other existing scale rules.

I want to keep two scale rules.

Related command

az containerapp job update --name $NAME --resource-group $RG --scale-rule-name $SR_NAME --scale-rule-type "azure-queue" --scale-rule-metadata "accountName=$ACCOUNT_NAME" "queueName=$QUEUE_NAME" "queueLength=1" --scale-rule-auth "connection=connection-string-secret"

Errors

Other scale rules deleted

Issue script & Debug output

N/A

Expected behavior

The scale rule name I set is overwritten, other scale rules are not touched.

Environment Summary

azure-cli 2.56.0

core 2.56.0
telemetry 1.1.0

Extensions:
containerapp 0.3.46

Dependencies:
msal 1.24.0b2
azure-mgmt-resource 23.1.0b2

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\USERNAME.azure\cliextensions'

Python (Windows) 3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:21:31) [MSC v.1936 32 bit (Intel)]

Legal docs and information: aka.ms/AzureCliLegal

Additional context

My objective is two spawn my job if any of the queues have messages to process.

@acidbubbles acidbubbles added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Jan 21, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented Jan 21, 2024

Thank you for opening this issue, we will look into it.

@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. Auto-Assign Auto assign by bot ContainerApp Service Attention This issue is responsible by Azure service team. labels Jan 21, 2024
@Greedygre
Copy link
Contributor

Hi @anandanthony

Can you please have a look for this issue? Thanks.

@Greedygre
Copy link
Contributor

Hi @acidbubbles

Yes, currently with az containerapp job update --name $NAME --resource-group $RG --scale-rule-name $SR_NAME --scale-rule-type "azure-queue" --scale-rule-metadata it will delete other scale rules.

There is a workaround:
use az containerapp job update --yaml to input all existing scale rules and new added scale rules.
You can use command
az containerapp show --name $NAME --resource-group $RG -o yaml to get the existing setting.

@acidbubbles
Copy link
Author

Thank you, that sounds like a reasonable workaround, I appreciate the info! Since there is no UI in the Azure Portal for the azure queue rules metadata yet, this behavior can be quite confusing and hard to spot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. ContainerApp customer-reported Issues that are reported by GitHub users external to the Azure organization. Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

3 participants