Skip to content

Add customer ZIP packaging scripts for each Function language - #12

Merged
Hou (SciencePotato) merged 3 commits into
mainfrom
feature/epp-function-zip-packaging
Sep 15, 2026
Merged

Hou (SciencePotato) merged 3 commits into
mainfrom
feature/epp-function-zip-packaging

Conversation

@SciencePotato

Copy link
Copy Markdown
Collaborator

Summary

  • Add three standalone PowerShell 7 scripts at the repository root: package-javascript.ps1, package-dotnet.ps1, and package-python.ps1.
  • JavaScript stages application source and installs production dependencies from its lockfile, without copying the working node_modules directory.
  • .NET packages fresh Release publish output, including hidden .azurefunctions files, and rejects local configuration, credential, and test files in publish output.
  • Python creates a source ZIP for Azure remote build on Linux. It deliberately excludes local virtual environments and dependencies and is not a direct run-from-package artifact.
  • All scripts place host.json at the ZIP root, use temporary staging, refuse existing output paths, support -OutputPath, and clean up staging.
  • Document customer commands, prerequisites, output names, deployment boundaries, and Python remote-build requirements. ZIPs go to ignored artifacts/ and are not committed.

Validation

  • Ran all three scripts successfully from outside the repository root.
  • Inspected all archives for required files, correct root layout, hidden .NET extensions, and absence of local settings, credential files, and first-party tests.
  • Loaded the extracted JavaScript engine and all providers using the packaged dependencies.
  • Compiled extracted Python source; verified the extracted .NET SendOtp HTTP-trigger metadata.
  • Re-ran each script against its existing output and confirmed rejection with unchanged SHA256.
  • Editor diagnostics and git diff --check passed.

Scope and limitations

  • Independent branch based on main; no Telesign/Soprano feature history or runtime changes included.
  • No Azure deployment, configuration changes, or live provider requests performed.
  • Python remote build and cloud execution have not been exercised. Node dependency lifecycle scripts are intentionally disabled for the current sample; native dependency additions require target-OS build review.

@SciencePotato

Copy link
Copy Markdown
Collaborator Author

Direct ZIP downloads and CI automation added

Customer ZIPs are published now: https://github.com/Azure-Samples/ExternalPhoneProvider-AzureFunction-Sample/releases/tag/epp-packages-preview-20260914

Assets: epp-javascript.zip, epp-dotnet.zip, epp-python-source.zip, and SHA256SUMS.txt. Preview assets were built from commit 4f32003 and their uploaded digests match local checksums. Python remains a source ZIP requiring Azure remote build on Linux. This main-based preview excludes the separate provider feature branches.

The Function ZIPs workflow passed on Linux: https://github.com/Azure-Samples/ExternalPhoneProvider-AzureFunction-Sample/actions/runs/34902091675

It runs all language tests, builds all three archives, verifies contents, generates checksums, and uploads PR artifacts. A separate contents-write job publishes versioned GitHub Releases only after successful main builds; PR builds cannot publish. This release automation becomes active on main after this PR is merged. No Azure deployment or live provider calls performed.

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

Moderate issues remain with cross-volume output paths and CI coverage of the no-overwrite guarantee.

Pull request overview

Adds customer-facing PowerShell ZIP packaging scripts for JavaScript, .NET, and Python Azure Functions, plus documentation and CI automation.

Changes:

  • Added language-specific packaging scripts with staging and safety checks.
  • Added CI validation, checksums, artifact uploads, and releases.
  • Documented prerequisites, deployment boundaries, and Python remote-build requirements.
File summaries
File Summary
README.md Documents downloads and local packaging.
package-python.ps1 Creates a Python source ZIP.
package-javascript.ps1 Packages JavaScript source and production dependencies.
package-dotnet.ps1 Publishes and packages .NET Release output.
docs/ONBOARDING.md Adds packaging and deployment guidance.
.github/workflows/packages.yml Builds, validates, checksums, and releases ZIPs.
Review details

Suppressed comments (4)

.github/workflows/packages.yml:46

  • The new workflow only invokes each packager once into a clean artifacts/ directory, so it does not regression-test the documented no-overwrite guarantee. A future change could replace an existing ZIP while all current checks still pass; add a CI step that seeds each output, reruns the corresponding script, expects failure, and verifies the original SHA256 is unchanged.
      - name: Build ZIPs
        shell: pwsh
        run: |
          ./package-javascript.ps1
          ./package-dotnet.ps1

package-dotnet.ps1:30

  • $zip is created under the system temp directory, but File.Move does not support moving across volumes. A caller using -OutputPath on another drive or mounted filesystem will get an IOException after the package has been built, so the advertised output-path option is not portable. Copy the archive to the destination instead (or create it in a destination-local temporary directory).
    [IO.File]::Move($zip, $archive)

package-javascript.ps1:39

  • $zip is created under the system temp directory, but File.Move does not support moving across volumes. A caller using -OutputPath on another drive or mounted filesystem will get an IOException after the package has been built, so the advertised output-path option is not portable. Copy the archive to the destination instead (or create it in a destination-local temporary directory).
    [IO.File]::Move($zip, $archive)

package-python.ps1:30

  • $zip is created under the system temp directory, but File.Move does not support moving across volumes. A caller using -OutputPath on another drive or mounted filesystem will get an IOException after the package has been built, so the advertised output-path option is not portable. Copy the archive to the destination instead (or create it in a destination-local temporary directory).
    [IO.File]::Move($zip, $archive)
  • Files reviewed: 6/6 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@SciencePotato
Hou (SciencePotato) requested a balanced review from Copilot September 15, 2026 16:41

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@SciencePotato
Hou (SciencePotato) merged commit fa76b11 into main Sep 15, 2026
7 checks passed
@SciencePotato
Hou (SciencePotato) deleted the feature/epp-function-zip-packaging branch September 15, 2026 18:25
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