Skip to content

ref(spin.toml): update with spinframework redirects#1497

Merged
vdice merged 1 commit intomainfrom
ref/spin-toml-spinframework-redirects
Apr 10, 2025
Merged

ref(spin.toml): update with spinframework redirects#1497
vdice merged 1 commit intomainfrom
ref/spin-toml-spinframework-redirects

Conversation

@vdice
Copy link
Copy Markdown
Member

@vdice vdice commented Mar 27, 2025

Needs:

Closes #1490

@vdice vdice force-pushed the ref/spin-toml-spinframework-redirects branch from eff91d9 to e1c6eb6 Compare March 27, 2025 21:58
@github-actions
Copy link
Copy Markdown

🚀 preview deployed successfully to Fermyon Cloud and available at https://fermyon-developer-pr-1497-fdkgobkn.fermyon.app

@vdice vdice force-pushed the ref/spin-toml-spinframework-redirects branch from e1c6eb6 to b93a73e Compare March 28, 2025 16:50
@vdice vdice marked this pull request as ready for review March 28, 2025 16:50
@vdice
Copy link
Copy Markdown
Member Author

vdice commented Mar 28, 2025

Opening up for review, but again needs spinframework/spin-docs#11 before merging.

Copy link
Copy Markdown
Member

@adamreese adamreese left a comment

Choose a reason for hiding this comment

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

Manually checked

@vdice vdice force-pushed the ref/spin-toml-spinframework-redirects branch from b93a73e to 0f16377 Compare April 1, 2025 22:01
@vdice
Copy link
Copy Markdown
Member Author

vdice commented Apr 1, 2025

(pushed rebase commit to get broken links fixes; no other changes)

@vdice
Copy link
Copy Markdown
Member Author

vdice commented Apr 2, 2025

I do want to mention that the catch-all /spin/... redirector isn't smart... it will always redirect to spinframework.dev and does not persist any path information that may to be provided (eg the /... bit). We'd need to look into updating the spin-redirect module to support wildcard redirects -- but even then, we'd also need something on the spin-docs side to redirect any inbound spin/... request to /... (i.e. removing the spin/ path prefix).

Still, I don't think this is an issue - or at least not a major one - since there shouldn't be any local /spin references after #1503 (and #1513).

@itowlson
Copy link
Copy Markdown
Contributor

itowlson commented Apr 2, 2025

there shouldn't be any local /spin references

There will likely be external /spin references, though, on sites we don't control (or don't want to spend ages updating). Will they redirect correctly?

@vdice
Copy link
Copy Markdown
Member Author

vdice commented Apr 2, 2025

There will likely be external /spin references, though, on sites we don't control (or don't want to spend ages updating). Will they redirect correctly?

Ah, yes, good reminder Ivan.

Another option came to mind: we could add redirects for each of the single-path, top-level sections (eg all of the paths in the left-hand ToC section at https://developer.fermyon.com/spin/v3/index) to their appropriate destinations at spinframework.dev.

Or, we could look into adding wildcard support to the spin-redirect module (again, I believe it would need a corresponding redirect on the spin-docs side to remove the inbound spin/ path prefix).

WDYT?

@itowlson
Copy link
Copy Markdown
Contributor

itowlson commented Apr 3, 2025

We already kerjiggered the redirect module on the spinframework.dev side, we can totally kerjigger it here!

I think we'd looking at something like /spin/... -> sf.dev/${wildcard) which doesn't sound unreasonably onerous? That seems like it would avoid the need for a further redirect on the destination side when the path is already versioned (and the destination already handles redirects if the path is unversioned). Does that sound right?

Signed-off-by: Vaughn Dice <vaughn.dice@fermyon.com>
@vdice vdice force-pushed the ref/spin-toml-spinframework-redirects branch from 0f16377 to 4262067 Compare April 9, 2025 00:03
@vdice
Copy link
Copy Markdown
Member Author

vdice commented Apr 9, 2025

Added a note above re: needing finalized wildcard redirect functionality (ref spinframework/spin-redirect#12). Once that is merged, I'll update the wasm module to the one built from main of that project.

@vdice vdice merged commit 9781628 into main Apr 10, 2025
3 checks passed
@vdice vdice deleted the ref/spin-toml-spinframework-redirects branch April 10, 2025 21:38
@vdice vdice restored the ref/spin-toml-spinframework-redirects branch April 10, 2025 21:48
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.

spin.toml: update spin-related redirects

3 participants