Skip to content

fix: normalize dev version in static notebook asset URL#9592

Merged
mscolnick merged 1 commit into
mainfrom
ms/normalize-version
May 20, 2026
Merged

fix: normalize dev version in static notebook asset URL#9592
mscolnick merged 1 commit into
mainfrom
ms/normalize-version

Conversation

@mscolnick
Copy link
Copy Markdown
Contributor

jsdelivr treats .dev as a separate path segment, so dev versions
need to be rewritten to use -dev for the CDN URL to resolve.

jsdelivr treats `.dev` as a separate path segment, so dev versions
need to be rewritten to use `-dev` for the CDN URL to resolve.
Copilot AI review requested due to automatic review settings May 18, 2026 22:43
@vercel
Copy link
Copy Markdown

vercel Bot commented May 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment May 18, 2026 10:44pm

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 fixes static notebook exports so dev-versioned frontend assets resolve correctly from jsDelivr by converting Python dev version formatting to the npm package version format.

Changes:

  • Normalizes .dev to -dev when constructing the default static notebook CDN asset URL.
  • Adds tests covering dev and release version asset URLs.

Reviewed changes

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

File Description
marimo/_server/templates/templates.py Normalizes dev versions before building the jsDelivr frontend asset URL.
tests/_server/templates/test_templates.py Adds regression tests for dev and release static notebook asset URLs.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

Architecture diagram
sequenceDiagram
    participant Server as Marimo Server
    participant CDN as jsDelivr CDN
    participant Static as Static Notebook Export

    Note over Server,Static: Static Notebook Asset URL Construction

    Server->>Server: Read __version__ (e.g., "0.16.5.dev6+gabc")
    Server->>Server: NEW: Replace ".dev" with "-dev" in version string
    Note over Server: "0.16.5.dev6+gabc" → "0.16.5-dev6+gabc"
    
    alt Dev version (".dev" present)
        Server->>Server: version = "0.16.5-dev6+gabc"
    else Release version (no ".dev")
        Server->>Server: version = "0.16.5" (unchanged)
    end
    
    Server->>Server: Construct CDN URL with normalized version
    Note over Server: "https://cdn.jsdelivr.net/npm/@marimo-team/frontend@{version}/dist"
    
    Server->>CDN: Request frontend assets from CDN
    alt Dev version
        Note over CDN: jsDelivr resolves "0.16.5-dev6"<br/>as path segment (works)
    else Release version
        Note over CDN: Standard version resolution (unchanged)
    end
    
    CDN-->>Server: Serve frontend assets
    Server-->>Static: Generate notebook HTML with correct CDN URL
Loading

Re-trigger cubic

@mscolnick mscolnick requested a review from Light2Dark May 20, 2026 02:37
@Light2Dark Light2Dark added the bug Something isn't working label May 20, 2026
@mscolnick mscolnick merged commit 7fb4b9b into main May 20, 2026
46 of 47 checks passed
@mscolnick mscolnick deleted the ms/normalize-version branch May 20, 2026 15:25
@github-actions
Copy link
Copy Markdown

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.23.7-dev59

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants