Skip to content

[server] Fix inconsistent handling of base path in studio #1782#1788

Merged
michaelvlach merged 5 commits intomainfrom
1782-server-fix-inconsistent-handling-of-base-path-in-studio
May 1, 2026
Merged

[server] Fix inconsistent handling of base path in studio #1782#1788
michaelvlach merged 5 commits intomainfrom
1782-server-fix-inconsistent-handling-of-base-path-in-studio

Conversation

@michaelvlach
Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings May 1, 2026 14:02
@michaelvlach michaelvlach linked an issue May 1, 2026 that may be closed by this pull request
@vercel
Copy link
Copy Markdown

vercel Bot commented May 1, 2026

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

Project Deployment Actions Updated (UTC)
agdb Ready Ready Preview, Comment May 1, 2026 2:35pm

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

Fixes inconsistent base-path handling by centralizing server URL construction and applying it consistently across Studio asset rewriting, OpenAPI server metadata, logging, and cluster node identification.

Changes:

  • Introduce ConfigImpl::server_url() and use it for Studio URL replacement and OpenAPI server configuration.
  • Normalize basepath input (ensure leading /) and strip any path component from address (with a warning).
  • Initialize tracing earlier with an Info default and reload to configured log level after config is read.

Reviewed changes

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

Show a summary per file
File Description
agdb_server/src/routes/studio.rs Use config.server_url() when rewriting Studio’s localhost URL.
agdb_server/src/main.rs Initialize tracing before config load; log server URL via server_url().
agdb_server/src/config.rs Add server_url(), normalize basepath, strip path from address, and use server URL for cluster node id selection.
agdb_server/src/cluster.rs Determine local cluster index using config.server_url().
agdb_server/src/app.rs Use server_url() for OpenAPI server URL (avoid manual concatenation).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread agdb_server/src/cluster.rs
Comment thread agdb_server/src/config.rs
Comment thread agdb_server/src/config.rs
Comment thread agdb_server/src/config.rs Outdated
@michaelvlach michaelvlach merged commit 3d07205 into main May 1, 2026
8 checks passed
@michaelvlach michaelvlach deleted the 1782-server-fix-inconsistent-handling-of-base-path-in-studio branch May 1, 2026 14:40
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.

[server] Fix inconsistent handling of base path in studio

3 participants