Skip to content

fix: make workspace attachment linking idempotent - #160

Open
andreitava-uip wants to merge 1 commit into
mainfrom
fix/idempotent-workspace-attachment-link
Open

fix: make workspace attachment linking idempotent#160
andreitava-uip wants to merge 1 commit into
mainfrom
fix/idempotent-workspace-attachment-link

Conversation

@andreitava-uip

@andreitava-uip andreitava-uip commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • query the current job's attachment associations once per workspace dehydration
  • skip attachments that are already linked while linking new workspace attachments in deterministic order
  • add a regression test covering dehydration after resume in a fresh hydrator process
  • bump uipath-runtime to 0.13.2

Testing

  • Manual E2E
  • uv run pytest -q
  • uv run ruff check .
  • uv run ruff format --check .
  • uv run mypy src
  • uv build

Copilot AI lite review requested due to automatic review settings August 13, 2026 11:29
@andreitava-uip
andreitava-uip requested review from a team and cristipufu as code owners August 13, 2026 11:29
@andreitava-uip andreitava-uip changed the title Make workspace attachment linking idempotent feat: make workspace attachment linking idempotent Aug 13, 2026
@andreitava-uip andreitava-uip changed the title feat: make workspace attachment linking idempotent fix: make workspace attachment linking idempotent Aug 13, 2026

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.

Pull request overview

This PR makes workspace attachment linking idempotent during dehydration by querying existing job attachment associations once and skipping already-linked attachments, preventing duplicate association errors—especially across resume scenarios in a new hydrator process.

Changes:

  • Link attachments in one deterministic pass after dehydration, skipping already-associated attachments.
  • Add a regression test covering dehydration after resume with an already-linked attachment.
  • Bump the package version to 0.13.2 (and lockfile update).

Reviewed changes

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

File Description
src/uipath/runtime/workspace/hydrator.py Centralizes attachment linking into an idempotent batch flow by listing current associations once and linking only missing keys.
tests/workspace/test_workspace_hydration.py Extends the fake jobs API to track existing associations and adds a regression test ensuring resumed dehydration doesn’t re-link.
pyproject.toml Bumps project version to 0.13.2.
uv.lock Updates lockfile metadata to reflect version 0.13.2.

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

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
85.7% Coverage on New Code (required ≥ 90%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants