Skip to content

fix(embedded): isolate cached binaries for custom URLs - #2213

Open
VedanthB wants to merge 1 commit into
weaviate:mainfrom
VedanthB:fix/embedded-custom-url-cache
Open

VedanthB wants to merge 1 commit into
weaviate:mainfrom
VedanthB:fix/embedded-custom-url-cache

Conversation

@VedanthB

Copy link
Copy Markdown

Problem

Custom embedded archive URLs leave _parsed_weaviate_version empty, so distinct URLs share the same binary-cache filename. After downloading build A, requesting build B with the same cache directory silently selects A without downloading B.

Change

Use the download URL as the hash input only when no version was parsed. Explicit versions, official GitHub release URLs and resolved latest tags keep their existing cache names, preserving #1681's advancing-latest behavior. Old anonymous cache files are left untouched but no longer selected.

Add 12 regression/compatibility cases using tiny ZIP/tar archives and mocked downloads. They check selected file bytes, repeat reuse, host/path differences, legacy-cache isolation and existing official caches. Six cases fail on unchanged upstream; all 12 pass with this fix. No public API or documentation change is needed.

Validation

  • Unit suite: 552 passed, 1 skipped. Serial mock suite: 70 passed.
  • Ruff check/format and Flake8 pass across the workflow's source/test scope.
  • Pyright 1.1.399: zero errors with the Python 3.12 environment selected explicitly.
  • sdist/wheel build and twine check pass.

Live server, Docker/Pyodide and other Python/platform matrices were not run locally. The existing authlib==1.6.12 development pin conflicts with the runtime's >=1.7.1; validation used the runtime-compatible dependency without changing requirement files.

AI assistance: Codex implementation/testing and independent Codex and Claude Opus code review.

@orca-security-eu orca-security-eu Bot 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.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

@weaviate-git-bot

Copy link
Copy Markdown

To avoid any confusion in the future about your contribution to Weaviate, we work with a Contributor License Agreement. If you agree, you can simply add a comment to this PR that you agree with the CLA so that we can merge.

beep boop - the Weaviate bot 👋🤖

PS:
Are you already a member of the Weaviate Forum?

@VedanthB

Copy link
Copy Markdown
Author

I agree to the Weaviate Contributor License Agreement.

This branch has not been deployed

No deployments
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