Skip to content

Comments

Remove LinuxImageDemand and WindowsImageDemand variables, replace hardcoded ubuntu-24.04 with $(LINUXVMIMAGE)#41735

Closed
Copilot wants to merge 1 commit intomainfrom
copilot/fix-cab30530-1982-495b-9f44-b3696cabfbd4
Closed

Remove LinuxImageDemand and WindowsImageDemand variables, replace hardcoded ubuntu-24.04 with $(LINUXVMIMAGE)#41735
Copilot wants to merge 1 commit intomainfrom
copilot/fix-cab30530-1982-495b-9f44-b3696cabfbd4

Conversation

Copy link
Contributor

Copilot AI commented Jun 24, 2025

Summary

This PR aligns the Azure SDK for Python repository with the infrastructure changes made in Azure/azure-sdk-for-net#50802 by removing deprecated image demand variables and standardizing on centralized image variable references.

Changes Made

1. Variable Removal

  • Removed LinuxImageDemand variable definition from /eng/pipelines/templates/variables/image.yml
  • No WindowsImageDemand variable was found in the codebase (already compliant)

2. Usage Pattern Updates

  • Updated docindex.yml to use demands: ImageOverride -equals $(LINUXVMIMAGE) instead of demands: $(LinuxImageDemand)

3. Hardcoded Value Standardization

Replaced all hardcoded ubuntu-24.04 references with $(LINUXVMIMAGE) variable in 14 pipeline files:

  • eng/pipelines/tsp-spec-sync.yml
  • eng/pipelines/trigger-ml-sample-pipeline.yml
  • eng/pipelines/generate-all-docs.yml
  • eng/pipelines/templates/stages/archetype-sdk-tests.yml
  • eng/pipelines/templates/stages/archetype-conda-release.yml
  • eng/pipelines/templates/stages/archetype-python-release.yml (7 occurrences)
  • eng/pipelines/templates/stages/partner-release.yml
  • eng/pipelines/templates/stages/conda-sdk-client.yml
  • eng/pipelines/templates/jobs/run-cli-tests.yml
  • eng/pipelines/templates/jobs/build-conda-dependencies.yml
  • eng/pipelines/templates/jobs/ci.yml (2 occurrences)
  • eng/pipelines/templates/jobs/tests-nightly-python.yml (2 occurrences)

Before and After Examples

Before:

# In image.yml
- name: LinuxImageDemand
  value: ImageOverride -equals $(LINUXVMIMAGE)

# In pipeline files
demands: $(LinuxImageDemand)
image: ubuntu-24.04

After:

# LinuxImageDemand variable removed from image.yml

# In pipeline files  
demands: ImageOverride -equals $(LINUXVMIMAGE)
image: $(LINUXVMIMAGE)

Benefits

  • 🎯 Consistency: Aligns with latest Azure SDK infrastructure requirements across all language repositories
  • 🔧 Maintainability: Centralized image version management through $(LINUXVMIMAGE) variable
  • 🚀 Flexibility: Ubuntu version updates now require changing only one variable definition instead of multiple hardcoded values
  • 📋 Standardization: Follows the established pattern from the .NET repository changes

Validation

  • ✅ All YAML files validated for syntax correctness
  • ✅ No remaining LinuxImageDemand or WindowsImageDemand references in codebase
  • ✅ All $(LINUXVMIMAGE) variable references use proper Azure DevOps syntax
  • ✅ The LINUXVMIMAGE variable remains properly defined as ubuntu-24.04 in image.yml

This change ensures the Python SDK repository infrastructure remains aligned with the broader Azure SDK ecosystem while maintaining backward compatibility and improving maintainability.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@weshaggard weshaggard closed this Jun 24, 2025
Copilot AI changed the title [WIP] Remove LinuxImageDemand and WindowsImageDemand from image.yml, use $(LINUXVMIMAGE) instead of hardcoded ubuntu-24.04 Remove LinuxImageDemand and WindowsImageDemand variables, replace hardcoded ubuntu-24.04 with $(LINUXVMIMAGE) Jun 24, 2025
Copilot AI requested a review from weshaggard June 24, 2025 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants