Skip to content

fix(cli): reject project files clashing with generated package metadata - #1848

Merged
radu-mocanu merged 1 commit into
mainfrom
fix/pack-duplicate-metadata-files
Aug 6, 2026
Merged

fix(cli): reject project files clashing with generated package metadata#1848
radu-mocanu merged 1 commit into
mainfrom
fix/pack-duplicate-metadata-files

Conversation

@radu-mocanu

@radu-mocanu radu-mocanu commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • uipath pack now fails when a project file would be packaged at the same path as a metadata file the packer generates (operate.json, package-descriptor.json, bindings_v2.json), naming every offending file and linking the packOptions spec
  • the check runs before the archive is opened, so a rejected pack leaves no partial .nupkg behind
  • same file name inside a subdirectory is still packaged normally, and packOptions.filesExcluded resolves the conflict

Why

the zip format allows two entries to share a name, so a leftover operate.json at the project root was silently packaged alongside the generated one. orchestrator accepts such a package but the serverless executor fails at extraction with PackageDownloadError, which gives no hint about the actual cause.

Copilot AI review requested due to automatic review settings August 6, 2026 11:52
@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-runtime test:uipath-integrations labels Aug 6, 2026

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

This PR hardens the uipath pack CLI in packages/uipath by detecting and rejecting projects whose files would be packaged at the same archive path as generated package metadata (avoiding duplicate zip entries that break extraction). It also adds CLI tests to validate the behavior and bumps the package version.

Changes:

  • Add pre-archive conflict detection for generated metadata filenames and surface a targeted error message with a spec link.
  • Refactor pack metadata writing into a single metadata_files map and ensure conflict checks happen before opening the .nupkg.
  • Add pytest coverage for conflict detection (case-insensitive, multiple conflicts, subdirectory allowance, and exclusion behavior).

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/uipath/src/uipath/_cli/cli_pack.py Adds metadata conflict detection before writing the archive and refactors metadata writes.
packages/uipath/tests/cli/test_pack.py Adds regression tests for metadata filename conflicts and exclusion behavior.
packages/uipath/pyproject.toml Bumps uipath version to 2.13.23.
packages/uipath/uv.lock Updates the locked version for the editable uipath package.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/uipath/src/uipath/_cli/cli_pack.py
Comment thread packages/uipath/src/uipath/_cli/cli_pack.py
@radu-mocanu
radu-mocanu force-pushed the fix/pack-duplicate-metadata-files branch from 5277fea to a41e647 Compare August 6, 2026 12:11
@radu-mocanu
radu-mocanu force-pushed the fix/pack-duplicate-metadata-files branch from a41e647 to 4a96536 Compare August 6, 2026 12:12
@sonarqubecloud

sonarqubecloud Bot commented Aug 6, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

🚨 Heads up: uipath-langchain cross-tests are FAILING 🚨

Your changes may break the uipath-langchain-python integration.

⚠️ These checks are NOT enforced by branch protection rules. Please review the failures before merging.

🔍 Inspect the failed run →

@radu-mocanu
radu-mocanu merged commit 2e39d8a into main Aug 6, 2026
219 of 225 checks passed
@radu-mocanu
radu-mocanu deleted the fix/pack-duplicate-metadata-files branch August 6, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-integrations test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants