Skip to content

Helper script to find the Weave version in a Server version#2142

Closed
mdlinville wants to merge 6 commits intomainfrom
weave_version_script
Closed

Helper script to find the Weave version in a Server version#2142
mdlinville wants to merge 6 commits intomainfrom
weave_version_script

Conversation

@mdlinville
Copy link
Contributor

@mdlinville mdlinville commented Feb 10, 2026

Description

Add a helper script to find the Weave version in a Server version.

  1. The wandb/core repo uses a git submodule at services/weave-python/weave-public that points to a specific commit in the Weave repo.
  2. Each release branch (e.g., server-release-0.77.x) pins a submodule commit.
  3. The Weave version is determined by:
    1. Reading weave/version.py from that commit
    2. Finding the nearest Weave release tags (fetching the 30 nearest tags by date)
    3. Calculating the commit offset from those tags

The helper script uses the gh CLI or the GitHub API to read these details remotely and produce a simple or verbose report. You can pass it a version string for a released Server version, or the name of awandb/core branch for a version in development. See full details in the README.md.

Example output

Short output is appropriate for scripting. This example checks wandb/core master, which will become the next major version at branch cut.

$ python3 weave_version_mapping/map_core_to_weave_version.py master --short

0.52.27

Normal output shows more details. This example checks server-release-0.78.x, a development branch after branch cut.

$ python3 weave_version_mapping/map_core_to_weave_version.py server-release-0.78.x

Info: Fetching Weave version information (this may take 10-20 seconds)...
Info: Fetching Weave version from commit: 126f6206feb29b8d29236c158c6b221c02d659c4
==========================================
Summary:
  Branch server-release-0.78.x includes Weave version: 0.52.27
==========================================

Verbose output shows even more details. This example checks against the branch for a released version, which happens to be a patch (0.77.1).

$ python3 weave_version_mapping/map_core_to_weave_version.py server-release-0.77.x --verbose

Info: Checking branch: server-release-0.77.x
Info: Fetching submodule info from GitHub for branch: server-release-0.77.x
✓ Found Weave submodule commit: 4c83976027041e61e7689e816c5a1fafca7d0ee8
Info: Fetching Weave version from commit: 4c83976027041e61e7689e816c5a1fafca7d0ee8
Info: Fetching Weave version from commit: 4c83976027041e61e7689e816c5a1fafca7d0ee8

==========================================
Branch: server-release-0.77.x
Release Branch: server-release-0.77.x
==========================================

Weave Submodule Commit: 4c83976027041e61e7689e816c5a1fafca7d0ee8
Weave Version (from version.py): 0.52.23-dev0
Weave Version (PyPI equivalent): 0.52.23
Git Describe: v0.52.22-12-g4c8397602704
Commit Info: 4c8397602704 chore(weave): Add ty type checker (#5853)

Weave Release Tags containing this commit:
  (Note: Only the earliest tag in this list represents the Weave version
   included in this Core release. Later tags also contain this commit
   because they are descendants of it.)
  - v0.52.23
  - v0.52.24
  - v0.52.25
  - v0.52.26

Latest Weave release tag: v0.52.26

==========================================
Summary:
  Branch server-release-0.77.x includes Weave version: 0.52.23
  (Based on Weave commit at: v0.52.26)
==========================================

Detailed info:
  - version.py shows: 0.52.23-dev0
  - Git describe: v0.52.22-12-g4c8397602704
  - Commit: 4c8397602704 chore(weave): Add ty type checker (#5853)
  - Earliest containing tag: v0.52.23
  - Latest containing tag: v0.52.26

Testing

  • Ran the script locally
  • N/A: Local build succeeds without errors (mint dev)
  • N/A: Local link check succeeds without errors (mint broken-links)
  • PR tests succeed

@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2026

📚 Mintlify Preview Links

🔗 View Full Preview

✨ Added (1 total)

📄 Pages (1)

File Preview
scripts/weave_version_mapping/README.md README

🤖 Generated automatically when Mintlify deployment succeeds
📍 Deployment: 839c70e at 2026-02-12 21:07:26 UTC

@mdlinville mdlinville marked this pull request as ready for review February 10, 2026 21:26
@mdlinville mdlinville requested a review from a team as a code owner February 10, 2026 21:26
@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2026

🔗 Link Checker Results

All links are valid!

No broken links were detected.

Checked against: https://wb-21fd5541-weave-version-script.mintlify.app

Copy link

@theishshah theishshah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this could be handy for us to sync w the weave team on versions/support, thank you!

@mdlinville
Copy link
Contributor Author

This was an interesting exercise but it was based on misunderstanding on my part, and it turns out we don't need it.

@mdlinville mdlinville closed this Feb 14, 2026
@mdlinville mdlinville deleted the weave_version_script branch February 14, 2026 00:28
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

Comments