Skip to content

fix: release workspace gateway before indexing on publish - #6579

Merged
baszalmstra merged 1 commit into
prefix-dev:mainfrom
hunger:push-oxynzyowokvr
Jul 15, 2026
Merged

fix: release workspace gateway before indexing on publish#6579
baszalmstra merged 1 commit into
prefix-dev:mainfrom
hunger:push-oxynzyowokvr

Conversation

@hunger

@hunger hunger commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

The repodata gateway memory-maps a local/network channel's repodata.json when that channel is also a source channel. On Windows the open mapping blocks rattler-index from replacing the file: os error 1224 when it truncated in place, and os error 5 now that it renames over the target.

Dropping the command dispatcher only released its Arc clone of the gateway; the workspace held another copy in its OnceCell, keeping the mapping alive. Drop the workspace as well so the file is unmapped before indexing runs.

Fixes #6362

How Has This Been Tested?

Not at all: It needs windows and a SMB share. I have neither of these.

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.

Tools: Claude

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added sufficient tests to cover my changes.
  • I have verified that changes that would impact the JSON schema have been made in schema/model.py.

The repodata gateway memory-maps a local/network channel's repodata.json
when that channel is also a source channel. On Windows the open mapping
blocks rattler-index from replacing the file: os error 1224 when it
truncated in place, and os error 5 now that it renames over the target.

Dropping the command dispatcher only released its Arc clone of the
gateway; the workspace held another copy in its OnceCell, keeping the
mapping alive. Drop the workspace as well so the file is unmapped before
indexing runs.

Fixes prefix-dev#6362
@baszalmstra

Copy link
Copy Markdown
Contributor

But in rattler the file is openened in a way that allows deletion of the file I believe. So this should not be needed. I think there is another root cause.

hunger commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

Claude claims the fix is only effective for some filesystems and e.g. not on SMB But I am no windows expert, so that might be wrong.

This felt like something maybe worthwhile having as it fixes up Wolf's PR. We should remove that again if rattler has this issue covered. I had to re-open the original issue, so it apparently has not been fixed yet.

@kaiserls

Copy link
Copy Markdown

@hunger @baszalmstra I tested the fix locally using a local shared folder:

  • With pixi, version 0.73.0, I receive the os error 5
  • With pixi, pr feature branch, the package is published successfully.

I would be very happy, if this temporary bug fix gets accepted.

@baszalmstra
baszalmstra merged commit 74ecfbc into prefix-dev:main Jul 15, 2026
35 checks passed
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.

Pixi failing to index channel after publishing to channel

3 participants