Issue: az pipelines list --name fails when name starts with a dot
Summary
The --name parameter in az pipelines list returns an empty array when the pipeline name starts with a dot (e.g., .NET CI Pipeline). Wildcard patterns starting with a dot also fail, but wildcards that don't start with a dot work correctly.
Environment
- Azure CLI: 2.81.0
- Azure DevOps extension: 1.0.2
- OS: macOS (Darwin)
- Python: 3.13.10
Steps to Reproduce
-
Have an existing pipeline named ".NET CI Pipeline" in Azure DevOps
-
List all pipelines (works correctly):
az pipelines list \
--organization https://dev.azure.com/<org> \
--project <project> \
--output json
Result: Returns array with pipeline, confirming it exists:
[
{
"id": 611,
"name": ".NET CI Pipeline",
...
}
]
-
List pipeline by exact name (fails):
az pipelines list \
--name ".NET CI Pipeline" \
--organization https://dev.azure.com/<org> \
--project <project> \
--output json
Result: Returns empty array []
-
List pipeline with wildcard starting with dot (fails):
az pipelines list \
--name ".NET*" \
--organization https://dev.azure.com/<org> \
--project <project> \
--output json
Result: Returns empty array []
-
List pipeline with wildcard NOT starting with dot (works):
az pipelines list \
--name "*NET*" \
--organization https://dev.azure.com/<org> \
--project <project> \
--output json
Result: Returns the pipeline correctly:
[
{
"id": 611,
"name": ".NET CI Pipeline",
...
}
]
Expected Behavior
All of these patterns should find the pipeline:
--name ".NET CI Pipeline" (exact match)
--name ".NET*" (wildcard starting with dot)
--name "*NET*" (wildcard not starting with dot)
Actual Behavior
| Pattern |
Expected |
Actual |
.NET CI Pipeline |
Found |
Not found |
.NET* |
Found |
Not found |
*NET* |
Found |
Found |
The --name filter fails when the pattern starts with a dot (.).
Root Cause Hypothesis
The leading dot in the name appears to be causing the filter to fail. This could be due to:
- The dot being interpreted as a special character (regex or glob)
- Escaping issues in the filter logic
- The API treating names starting with
. differently
Workaround
List all pipelines without the --name filter and filter locally:
az pipelines list \
--organization https://dev.azure.com/<org> \
--project <project> \
--output json \
| jq '.[] | select(.name == ".NET CI Pipeline")'
Or use a wildcard that doesn't start with a dot:
az pipelines list \
--name "*NET*" \
--organization https://dev.azure.com/<org> \
--project <project> \
--output json
Impact
This issue affects tooling that relies on az pipelines list --name to look up pipeline IDs by name. The workaround requires either fetching all pipelines (inefficient for large organizations) or using less precise wildcard patterns.
Related Commands
The --pipeline-name parameter in az pipelines variable list likely has the same issue, as it probably uses similar filtering logic internally.
Issue:
az pipelines list --namefails when name starts with a dotSummary
The
--nameparameter inaz pipelines listreturns an empty array when the pipeline name starts with a dot (e.g.,.NET CI Pipeline). Wildcard patterns starting with a dot also fail, but wildcards that don't start with a dot work correctly.Environment
Steps to Reproduce
Have an existing pipeline named ".NET CI Pipeline" in Azure DevOps
List all pipelines (works correctly):
Result: Returns array with pipeline, confirming it exists:
[ { "id": 611, "name": ".NET CI Pipeline", ... } ]List pipeline by exact name (fails):
Result: Returns empty array
[]List pipeline with wildcard starting with dot (fails):
Result: Returns empty array
[]List pipeline with wildcard NOT starting with dot (works):
Result: Returns the pipeline correctly:
[ { "id": 611, "name": ".NET CI Pipeline", ... } ]Expected Behavior
All of these patterns should find the pipeline:
--name ".NET CI Pipeline"(exact match)--name ".NET*"(wildcard starting with dot)--name "*NET*"(wildcard not starting with dot)Actual Behavior
.NET CI Pipeline.NET**NET*The
--namefilter fails when the pattern starts with a dot (.).Root Cause Hypothesis
The leading dot in the name appears to be causing the filter to fail. This could be due to:
.differentlyWorkaround
List all pipelines without the
--namefilter and filter locally:Or use a wildcard that doesn't start with a dot:
Impact
This issue affects tooling that relies on
az pipelines list --nameto look up pipeline IDs by name. The workaround requires either fetching all pipelines (inefficient for large organizations) or using less precise wildcard patterns.Related Commands
The
--pipeline-nameparameter inaz pipelines variable listlikely has the same issue, as it probably uses similar filtering logic internally.