Azure / Azure/azure-cli

az containerapp job start --image <image> voids environment variables

Open
#27,521 9 comments 3 reactions 0 assignees View on GitHub
act-observability-squad Auto-Assign Auto-Resolve bug ContainerApp customer-reported Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 22h
Merged PRs (30d)
64

Description

### Describe the bug

When running `az containerapp job start` with the image tag specified, my job env vars are not retained, but when I simply name the job they are.

The reason I even care is that when I update the job and trigger it the previous container is often run.

### Related command

az containerapp job start

### Errors

The error is that my environment variables are voided when using the --image flag

### Issue script & Debug output

The error is that my environment variables are voided when using the --image flag

### Expected behavior

That my environment variables are only voided when I deliberately void them

### Environment Summary

azure-cli 2.52.0 *

core 2.52.0 *
telemetry 1.1.0

Extensions:
azure-devops 0.26.0
containerapp 0.3.41

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

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start at the `az containerapp job start` command entry point and reproduce the difference between naming the job and passing `--image`. Trace how environment variables are handled in each path, then add regression coverage showing that existing variables remain when an image is specified.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
cli, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.