Skip to content

Safeguard durable-functions v4 preview publishing - #349

Closed
wangbill (YunchuWang) wants to merge 1 commit into
mainfrom
yunchuwang/functions-preview-v4
Closed

Safeguard durable-functions v4 preview publishing#349
wangbill (YunchuWang) wants to merge 1 commit into
mainfrom
yunchuwang/functions-preview-v4

Conversation

@YunchuWang

Copy link
Copy Markdown
Member

Summary

What changed?

  • Upgrade only the durable-functions ESRP release job to v12 so it can infer the npm dist-tag from the package's publishConfig.tag metadata.
  • Keep future durable-functions prereleases on a major-specific preview-v<major> channel and remove that channel metadata for stable releases.
  • Add package-scoped release documentation and a regression test for the prerelease/GA metadata lifecycle.

Why is this change needed?

durable-functions@4.0.0-beta.1 must be opt-in. Publishing it without an explicit non-latest dist-tag would make an unqualified npm install durable-functions resolve v4 instead of the stable v3 line. The existing generic preview tag already points to a v3 alpha, so v4 uses preview-v4.

Current EngHub ESRP guidance says the current EsrpRelease@12 task infers npm tags from publishConfig.tag: https://eng.ms/docs/microsoft-security/identity/trust-and-security-services/tss-release-distribute/tss-release-esrp-parent/oss-publishing/releasing-open-source/npmjs

Issues / work items


Project checklist

  • Release notes are not required for the next release
    • Otherwise: Notes added to CHANGELOG.md
  • Backport is not required
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • All required tests have been added/updated (unit tests, E2E tests)
  • Breaking change?
    • If yes:
      • Impact: v4 remains an explicit opt-in preview; the stable v3 latest channel is unchanged.
      • Migration guidance: Install durable-functions@preview-v4 or pin durable-functions@4.0.0-beta.1.

AI-assisted code disclosure (required)

Was an AI tool used? (select one)

  • No
  • Yes, AI helped write parts of this PR (e.g., GitHub Copilot)
  • Yes, an AI agent generated most of this PR

If AI was used:

  • Tool(s): GitHub Copilot
  • AI-assisted areas/files: release workflow, ESRP task update, regression test, and release documentation
  • What you changed after AI output: Reviewed the implementation, narrowed it to durable-functions, and selected the major-specific preview-v4 policy.

AI verification (required if AI was used):

  • I understand the code and can explain it
  • I verified referenced APIs/types exist and are correct
  • I reviewed edge cases/failure paths (timeouts, retries, cancellation, exceptions)
  • I reviewed concurrency/async behavior
  • I checked for unintended breaking or behavior changes

Testing

Automated tests

  • Result: Passed. durable-functions: 19 suites, 153 tests. Repository ESLint also passed.

Manual validation (only if runtime/behavior changed)

  • Environment: Windows, local npm workspace
  • Steps + observed results:
    1. Packed the durable-functions workspace.
    2. Inspected package/package.json inside durable-functions-4.0.0-beta.1.tgz.
    3. Confirmed name=durable-functions, version=4.0.0-beta.1, and publishConfig.tag=preview-v4.

Notes for reviewers

  • This policy and the ESRP v12 upgrade apply only to durable-functions; the two @microsoft release jobs remain on ESRP v9.
  • Before the official build, ensure the durable-functions-v4.0.0-beta.1 Git tag points to the final merged release commit. ESRP v12 publishes immediately, so inspect the signed .tgz before queueing the release.

Use ESRP Release v12 for the durable-functions job, preserve preview-v<major> across prerelease preparation, remove it for GA, and document and test the Functions-only release flow.
Copilot AI review requested due to automatic review settings August 3, 2026 15:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the durable-functions (Azure Functions Durable provider) release tooling and docs to ensure v4 prereleases publish to a major-specific npm dist-tag (e.g., preview-v4) without moving npm’s latest tag away from the stable v3 line.

Changes:

  • Upgrades the durable-functions ESRP release job to EsrpRelease@12 to support inferring the npm dist-tag from publishConfig.tag.
  • Updates the Prepare Release workflow to set/clear publishConfig.tag for durable-functions and to emit the correct manual fallback npm publish --tag ... command.
  • Adds package-scoped documentation and a unit test to enforce the prerelease/GA metadata lifecycle.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/azure-functions-durable/test/unit/release-metadata.spec.ts Adds a regression test to enforce publishConfig.tag usage for prerelease vs GA.
packages/azure-functions-durable/README.md Documents installing v4 prereleases via preview-v4.
packages/azure-functions-durable/CHANGELOG.md Notes the new prerelease channel policy for v4.
eng/ci/release.yml Upgrades only the durable-functions ESRP task version to v12.
doc/release_process.md Updates release guidance to reflect major-specific preview tags and ESRP v12 behavior.
.github/workflows/prepare-release.yaml Sets/removes publishConfig.tag for durable-functions and adjusts fallback dist-tag output.

Comment on lines +1 to +2
import { readFileSync } from "node:fs";
import { join } from "node:path";
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