Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 8, 2025

The Azure Pipeline for version 9.2.0 was failing during the package publishing step with the error:

##[error]Publishing build artifacts failed with an error: Not found PathtoPublish: /home/vsts/work/1/a/packages

The issue occurred because the PublishBuildArtifacts@1 task was attempting to publish packages from a directory that didn't exist. While the pack step should create this directory, it was either failing silently or not creating the expected directory structure in the pipeline environment.

Root Cause

The pipeline had two potential points of failure:

  1. The pack step used nobuild: true, which could fail silently if the previous build step didn't produce the expected binaries
  2. No verification was performed to ensure the packages directory existed before attempting to publish it

Changes Made

Enhanced pack step reliability:

  • Changed nobuild: false to ensure the pack step rebuilds dependencies if needed, preventing potential silent failures

Added comprehensive verification:

  • Added a verification script that explicitly checks if the packages directory exists before publishing
  • Provides detailed diagnostic output showing directory contents if the directory is missing
  • Fails fast with clear error messages if packages weren't created

Improved error handling:

  • Added conditional publishing that only runs if previous steps succeeded
  • The verification step will exit with error code 1 if packages directory is missing, preventing downstream publishing steps

Verification

The fix has been thoroughly tested:

  • Local pack operations create both .nupkg and .snupkg files correctly
  • All 43 example tests continue to pass
  • Code formatting passes all checks
  • The verification script properly detects missing packages directory scenarios

This ensures the pipeline will either succeed with proper package publishing or fail with clear diagnostic information about what went wrong.

Fixes #315.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@Copilot Copilot AI changed the title [WIP] Fix issue #315 Fix Azure Pipeline package publishing by adding error handling and verification Sep 8, 2025
Copilot finished work on behalf of Arash-Sabet September 8, 2025 00:44
@Arash-Sabet Arash-Sabet marked this pull request as ready for review September 8, 2025 00:45
@Arash-Sabet Arash-Sabet merged commit f7c8f18 into main Sep 8, 2025
1 check passed
@Arash-Sabet Arash-Sabet deleted the copilot/fix-4fe857e6-e8f6-4fda-87be-62ec884c02f1 branch September 8, 2025 01:03
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.

The release pipeline for ver 9.2.0 is failing.

2 participants