Scheduled test pipelines fail at the Analyze_Test stage due to date formatting

Open Beginner friendly
#49,614 1 comment 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

A pull request for this has already been merged.

  • #49642 by @l0lawrence — merged

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
ci-cd, testing

Research direction

Start with the two conditions named in the issue: eng/pipelines/templates/stages/archetype-sdk-tests.yml around line 178 and eng/pipelines/templates/stages/python-analyze-weekly-standalone.yml around line 22. Check Azure Pipelines expression support for date formatting, then queue a scheduled test pipeline to verify the Analyze_Test stage completes. Done means scheduled Python service and storage test runs no longer fail on the date format expression.

Written by the indexing model from the issue text.

Description

EngSys

Describe the bug
Since around 2026-10-10, scheduled python - <service> - tests runs fail before any tests run. Azure DevOps reports: Stage Analyze_Test abandoned: The format specifiers 'ddd' are not valid for objects of type 'DateTime'. Example: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6970519&view=results

This affects more than one service. python - healthdataaiservices - tests (def 7098) and -tests-weekly (def 7099) fail every scheduled run, and the storage tests pipeline fails the same way.

To Reproduce
Steps to reproduce the behavior:

  1. Queue any python - <service> - tests pipeline with Build.Reason = Schedule (or wait for the nightly). Analyze_Test is abandoned with the error above. Example: python - healthdataaiservices - tests (def 7098), https://dev.azure.com/azure-sdk/internal/_build?definitionId=7098

Expected behavior
Build succeeds.

Screenshots
N/A

Additional context
Introduced in #48391 ("Update test templates to check weekly runs based on run start time", merged 2026-08-12):

  • eng/pipelines/templates/stages/archetype-sdk-tests.yml:178
    Condition: and(succeeded(), in(format('{0:ddd}', pipeline.startTime), 'Sat', 'Sun'))
    
  • eng/pipelines/templates/stages/python-analyze-weekly-standalone.yml:22
    Condition: and(succeeded(), eq(variables['Build.Reason'], 'Schedule'), in(format('{0:ddd}', pipeline.startTime), 'Sat', 'Sun'))
    

The Azure Pipelines format() expression uses .NET custom date and time format specifiers, but documents only a subset of them: yyyy, yy, MM, M, dd, d, HH, H, m, mm, ss, s, f, ff, ffff, K. Day-of-week (ddd / dddd) isn't in that list, even though .NET itself supports it, and ADO's own error confirms the runtime rejects it. So the condition can't be evaluated and the stage is abandoned. Because the stage sits inside ${{ if eq(variables['Build.Reason'], 'Schedule') }}, only scheduled runs are affected. Manual and PR runs still pass, which may be why this wasn't caught.

Dominant language
Python
Stars
5.6k
Forks
3.4k
Avg merge
1d 22h
Merged PRs (30d)
189

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure/azure-sdk-for-python

All issues in Azure/azure-sdk-for-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.