Skip to content

Add DevDiv stable release pipeline - #26329

Open
Eduardo Villalpando Mello (edvilme) wants to merge 5 commits into
mainfrom
devdiv-stable-pipeline
Open

Eduardo Villalpando Mello (edvilme) wants to merge 5 commits into
mainfrom
devdiv-stable-pipeline

Conversation

@edvilme

@edvilme Eduardo Villalpando Mello (edvilme) commented Dec 4, 2026 •

Copy link
Copy Markdown

Adds build/azure-devdiv-pipeline.stable.yml for vscode-python using the shared microsoft/pylance-eng stable template.

  • Triggers on release/* and publishes by default after validation.
  • Keeps the existing 10 build targets and build steps.
  • Downloads PET artifacts from DevDiv definition 29005, selecting the newest successful run tagged pet-stable-release. Companion PR Tag official PET stable release runs python-environment-tools#593 adds that Azure DevOps run tag only for release-tag runs, excluding branch dry runs.
  • Uses the Windows EO SDL pool and AGENT_RESTRICT_EOL_NODE_VERSIONS=true.
  • Temporarily imports Python handbacks from microsoft/vscode-extensions-loc until the new localization drop contains them.
  • Preserves LF in Windows handbacks so multiline translation keys match.
  • Enables stable GitHub tag/release creation.

Validation: YAML parses and Azure previews with publishing disabled. A local pinned-CLI round trip verifies 14 locales, 28 tables, and Windows CRLF handling. Non-publishing DevDiv runs: full matrix and Windows regression.

Add the DevDiv stable release pipeline for vscode-python. It uses pylance-eng's stable template, runs on release/* branches, publishes by default after validation, downloads per-target PET binaries from DevDiv pipeline 29005 using the selected stable release tag, and uses the Windows EO SDL pool. The PET tag is a queue-time parameter (default release/2026.12).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b8367f08-e59f-49d2-8861-d378314bc4f6
Eduardo Villalpando Mello (edvilme) added a commit to microsoft/python-environment-tools that referenced this pull request Dec 4, 2026
Tag PET pipeline runs only when the shared stable template accepts a real release tag. The vscode-python stable consumer can then select the latest successful run with this Azure DevOps build tag, excluding the temporary branch dry run.

Related: microsoft/vscode-python#26329

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b8367f08-e59f-49d2-8861-d378314bc4f6
Select latest official PET stable run

Remove the date-pinned PET ref. Filter DevDiv definition 29005 by the build tag added only to valid release-tag runs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b8367f08-e59f-49d2-8861-d378314bc4f6
@rchiodo

Rich Chiodo (rchiodo) commented Dec 4, 2026 •

Copy link
Copy Markdown

🔒 Automated review in progress — Rich Chiodo (@rchiodo) is auto-reviewing this PR.

@rchiodo

Rich Chiodo (rchiodo) commented Dec 4, 2026 •

Copy link
Copy Markdown

Reviewed commit: e9758c4464a2df0d2fe6b7c87a8a6e3f9d66f444

Result: ⚠️ partially-verified

Verification details

Verification: Automated verification is best effort. The PR author remains responsible for testing.

Summary: Local checks passed for YAML parsing, release settings, the preserved 10-target matrix, PET download configuration, and template parameter forwarding. All 10 target-selection branches executed successfully, and an isolated Git test confirmed the LF-preservation setting. The PR adds no tests; no directly applicable existing pipeline tests were found. Azure template expansion, artifact selection, actual localization conversion, and Windows execution remain unverified, so confidence is limited to local checks.

Test runs: 4 passed, 2 not run

  • ⚠️ Not run | Azure preview and non-publishing pipeline integration
  • ⚠️ Not run | Native Windows localization regression
  • ✅ Passed | Environment and test discovery | printf 'Sandbox profile: %s\n' "${AUTOMATION_SANDBOX_PROFILE:-unset}"; uname -s; python - <<'PY'
    import importlib.util, sys
    from pathlib import Path
    print('Interpreter:', sys.executable)
    for name in ('yaml', 'pytest', 'freezegun'):
    spec = importlib.util.find_spec(name)
    print(name + ':', spec.origin if spec else 'unavailable')
    print('node_modules present:', Path('node_modules').is_dir())
    print('Shared stable template present:', Path('azure-pipelines/extension/stable.yml').exists())
    PY
    node --version; git diff HEAD^ HEAD --name-status; git ls-files 'build/test' 'build//test' '.github/*' '.github//*' | head -60; git grep -n -E 'azure-devdiv-pipeline|pet-stable-release|handback|localization' -- build src/test .github | head -60
  • ✅ Passed | Stable pipeline configuration assertions | python - <<'PY'
    from pathlib import Path
    import yaml

class UniqueLoader(yaml.SafeLoader):
pass

def unique_mapping(loader, node, deep=False):
result = {}
for key_node, value_node in node.value:
key = loader.construct_object(key_node, deep=deep)
assert key not in result, f'Duplicate YAML key: {key}'
result[key] = loader.construct_object(value_node, deep=deep)
return result

UniqueLoader.add_constructor(yaml.resolver.BaseResolver.DEFAULT_MAPPING_TAG, unique_mapping)
def load(name):
return yaml.load(Path('build', name).read_text(), Loader=UniqueLoader)

stable = load('azure-devdiv-pipeline.stable.yml')
pre = load('azure-devdiv-pipeline.pre-release.yml')
legacy = load('azure-pipeline.stable.yml')
params = {p['name']: p for p in stable['parameters']}
pre_params = {p['name']: p for p in pre['parameters']}
assert stable['trigger'] == legacy['trigger'] == {'branches': {'include': ['release/*']}}
assert stable['pr'] == 'none'
assert params['publishExtension']['type'] == 'boolean'
assert params['publishExtension']['default'] is True
platforms = params['buildPlatforms']['default']
assert platforms == pre_params['buildPlatforms']['default']
assert len(platforms) == 10
assert [p['vsceTarget'] for p in platforms] == [p['vsceTarget'] for p in legacy['extends']['parameters']['buildPlatforms']]
steps = params['buildSteps']['default']
old_steps = pre_params['buildSteps']['default']
assert len(steps) == len(old_steps) + 1
for actual, expected in zip(steps[:-1], old_steps):
if actual.get('task') == 'DownloadPipelineArtifact@2':
for key in ('targetPath', 'artifactName', 'itemPattern', 'buildType', 'project'):
assert actual['inputs'][key] == expected['inputs'][key], key
else:
assert actual == expected, actual.get('displayName')
pet = next(s['inputs'] for s in steps if s.get('task') == 'DownloadPipelineArtifact@2')
assert pet['definition'] == 29005
assert pet['buildVersionToDownload'] == 'latest'
assert pet['tags'] == 'pet-stable-release'
assert not pet.get('allowPartiallySucceededBuilds', False)
assert not pet.get('allowFailedBuilds', False)
assert 'branchName' not in pet
assert pet['itemPattern'].split() == ['pet.exe', 'pet', 'ThirdPartyNotices.txt']
repos = {r['repository']: r for r in stable['resources']['repositories']}
assert repos['templates']['name'] == 'microsoft/pylance-eng'
assert repos['translations']['name'] == 'microsoft/vscode-extensions-loc'
assert repos['localizationTools']['name'] == 'microsoft/vscode-python-ci'
assert repos['localizationTools']['ref'] == 'f078b68e968b56e0a22d6cf803bb241a6b094994'
variables = {v['name']: v['value'] for v in stable['variables']}
assert variables['AGENT_RESTRICT_EOL_NODE_VERSIONS'] == 'true'
assert variables['NodeVersion'] == Path('.nvmrc').read_text().strip().lstrip('v')
assert steps[-1]['script'] == 'git config --global core.autocrlf input'
assert steps[-1]['condition'] == "and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))"
ext = stable['extends']
assert ext['template'] == 'azure-pipelines/extension/stable.yml@templates'
ep = ext['parameters']
for key in ('buildPlatforms', 'buildSteps', 'publishExtension'):
assert ep[key] == '${{ parameters.' + key + ' }}'
for key in ('standardizedVersioning', 'ghCreateTag', 'ghCreateRelease', 'ghReleaseAddChangeLog', 'pullLocalization'):
assert ep[key] is True, key
assert ep['sourceAnalysisPool'] == {'name': 'AzurePipelines-EO', 'image': '1ESPT-Windows2022', 'os': 'windows'}
print('PASS: duplicate-free YAML, release trigger/default publishing, 10-target matrix and preserved build steps')
print('PASS: PET stable definition/tag/latest configuration, pinned localization resources, Windows-only LF setting')
print('PASS: template parameter forwarding, GitHub release flags, Node version, SDL pool and EOL restriction')
print('LIMIT: configuration assertions do not expand the external Azure template or execute Azure tasks')
PY

  • ✅ Passed | Embedded Bash syntax and complete target mapping | python - <<'PY'
    import subprocess
    from pathlib import Path
    import yaml

pipeline = yaml.safe_load(Path('build/azure-devdiv-pipeline.stable.yml').read_text())
params = {p['name']: p for p in pipeline['parameters']}
steps = params['buildSteps']['default']
for step in steps:
if 'bash' in step:
subprocess.run(['bash', '-n'], input=step['bash'], text=True, check=True)
expected = {
'web': 'x86_64-unknown-linux-musl',
'linux-arm64': 'aarch64-unknown-linux-gnu',
'linux-armhf': 'armv7-unknown-linux-gnueabihf',
'linux-x64': 'x86_64-unknown-linux-musl',
'alpine-arm64': 'aarch64-unknown-linux-gnu',
'alpine-x64': 'x86_64-unknown-linux-musl',
'darwin-arm64': 'aarch64-apple-darwin',
'darwin-x64': 'x86_64-apple-darwin',
'win32-arm64': 'aarch64-pc-windows-msvc',
'win32-x64': 'x86_64-pc-windows-msvc',
}
script = next(s['bash'] for s in steps if s['displayName'] == 'Set buildTarget variable')
assert {p['vsceTarget'] for p in params['buildPlatforms']['default']} == set(expected)
for target, triple in expected.items():
result = subprocess.run(['bash', '-c', script.replace('$(vsceTarget)', target)], text=True, capture_output=True, check=True, timeout=10)
assert result.stdout.strip() == '##vso[task.setvariable variable=buildTarget]' + triple, (target, result.stdout)
print(f'PASS: {target} -> bin-{triple}')
print('PASS: all embedded Bash steps pass bash -n; all 10 buildTarget branches executed')
PY

  • ✅ Passed | Isolated Git handback line-ending regression | python - <<'PY'
    import os
    import subprocess
    import tempfile
    from pathlib import Path
    import yaml

pipeline = yaml.safe_load(Path('build/azure-devdiv-pipeline.stable.yml').read_text())
steps = next(p['default'] for p in pipeline['parameters'] if p['name'] == 'buildSteps')
step = next(s for s in steps if s['displayName'] == 'Preserve localization handback line endings')
with tempfile.TemporaryDirectory(prefix='stable-handback-') as tmp:
root = Path(tmp)
home = root / 'home'
home.mkdir()
env = dict(os.environ, HOME=str(home), XDG_CONFIG_HOME=str(home / '.config'), GIT_CONFIG_GLOBAL=str(home / '.gitconfig'), GIT_CONFIG_NOSYSTEM='1', GIT_TERMINAL_PROMPT='0')
def git(*args, cwd=root):
return subprocess.run(['git', *args], cwd=cwd, env=env, text=True, capture_output=True, check=True, timeout=10)
source = root / 'source'
git('init', '-q', str(source))
git('config', 'user.name', 'Verification', cwd=source)
git('config', 'user.email', 'verification@example.invalid', cwd=source)
fixture = b'<?xml version="1.0"?>\n<xliff><file><body><trans-unit id="multiline"><source>first line\nsecond line</source><target>translated first\ntranslated second</target></trans-unit></body></file></xliff>\n'
(source / 'handback.xlf').write_bytes(fixture)
git('add', 'handback.xlf', cwd=source)
git('-c', 'core.hooksPath=/dev/null', 'commit', '-qm', 'LF handback fixture', cwd=source)
git('config', '--global', 'core.autocrlf', 'true')
git('clone', '-q', '--no-local', str(source), str(root / 'before'))
before = (root / 'before' / 'handback.xlf').read_bytes()
assert before == fixture.replace(b'\n', b'\r\n'), before
subprocess.run(['sh', '-c', step['script']], cwd=source, env=env, check=True, timeout=10)
assert git('config', '--global', '--get', 'core.autocrlf').stdout.strip() == 'input'
git('clone', '-q', '--no-local', str(source), str(root / 'after'))
after = (root / 'after' / 'handback.xlf').read_bytes()
assert after == fixture
assert b'first line\nsecond line' in after
assert b'\r\n' not in after
print('PASS: fresh checkout under core.autocrlf=true reproduces CRLF handbacks')
print('PASS: exact pipeline git-config script changes isolated global setting to input')
print('PASS: subsequent checkout preserves original LF bytes and multiline source/translation text')
print('LIMIT: Linux Git simulation only; Windows agents, real 14-locale handbacks and pinned localization CLI not exercised')
PY

⚠️ Azure preview and non-publishing pipeline integration diagnostic output
The credential-free offline container lacks the external shared stable template, translation repository, and pinned localization-tools repository. Azure template expansion, newest-successful tagged PET selection, validation/publishing sequencing, GitHub release creation, and the real localization round trip were not executed. The PR's linked DevDiv runs were not independently inspected.
⚠️ Native Windows localization regression diagnostic output
The handback-setting step requires Agent.OS == Windows_NT; the pipeline also specifies a Windows source-analysis pool. Actual verification platform: Linux, reported by uname -s. The passing Git simulation does not verify native Windows checkout behavior.

@rchiodo Rich Chiodo (rchiodo) left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved via Review Center.

@rchiodo Rich Chiodo (rchiodo) added the review-auto:approved Automated review: no blocking findings (approval posted). label Dec 4, 2026
Eduardo Villalpando Mello (edvilme) added a commit to microsoft/python-environment-tools that referenced this pull request Dec 4, 2026
Tag PET pipeline runs only when the shared stable template accepts a
real release tag. The vscode-python stable consumer can then select the
latest successful run with this Azure DevOps build tag, excluding the
temporary branch dry run.

Related: microsoft/vscode-python#26329

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b8367f08-e59f-49d2-8861-d378314bc4f6

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b8367f08-e59f-49d2-8861-d378314bc4f6
@edvilme

Copy link
Copy Markdown
Author

Registered the DevDiv stable definition successfully:

  • Definition 29024: vscode-python-stable
  • Folder: \Python\VSCode Python Extensions\vscode-python
  • YAML: build/azure-devdiv-pipeline.stable.yml
  • Default branch is temporarily devdiv-stable-pipeline, since this PR is not merged. Switch it to main after merging.
  • Both publishExtension=false and publishExtension=true Azure DevOps previews succeed against head b4a4f64f335684410dceb272ed8da894eab97d88.
  • The first run was skipped; no stable build or publication was queued.

A full stable run still requires microsoft/python-environment-tools#593 and a successful PET release-tag run carrying pet-stable-release. No branch dry-run artifacts were relabeled as an official release.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b8367f08-e59f-49d2-8861-d378314bc4f6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b8367f08-e59f-49d2-8861-d378314bc4f6

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The stable pipeline publishes by default, but inaccessible shared dependencies leave its contracts and release gates unverified, with Azure DevOps preview and official tagged PET artifact validation still pending.

No open issues 🎉

What changed in this PR

Adds a DevDiv stable-release pipeline for the Python extension using the shared microsoft/pylance-eng template.

Changes:

  • Triggers on release/* and enables publishing after validation, plus GitHub tags and releases.
  • Preserves all 10 build targets and downloads PET artifacts from successful runs tagged pet-stable-release.
  • Enables localization and configures the Windows source-analysis pool.

Azure DevOps preview/run validation remains pending.

File Description
build/​azure-devdiv-pipeline.stable.yml Defines stable builds, PET artifact selection, localization, and release publishing.

Review effort: Balanced

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b8367f08-e59f-49d2-8861-d378314bc4f6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog No news entry required review-auto:approved Automated review: no blocking findings (approval posted). skip-issue-check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants