Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unfreezing the spec #3055

Closed
5 tasks done
anoadragon453 opened this issue Mar 9, 2021 · 2 comments
Closed
5 tasks done

Unfreezing the spec #3055

anoadragon453 opened this issue Mar 9, 2021 · 2 comments

Comments

@anoadragon453
Copy link
Member

anoadragon453 commented Mar 9, 2021

While shipping the new spec, we've "frozen" the spec by preventing any spec PRs from landing while schema data was transformed to be hugo-compatible. Now that we've shipped an unstable build of the new spec, we need to figure out:

  1. How to get out of the spec freeze (this issue).
  2. How to transfer old spec versions to the new site and drop the old site completely (a future issue).

Turns out this is actually quite simple. The steps are:

  • Stop serving the unstable spec on matrix.org/docs/spec, and redirect to the new site.
  • Remove all traces of the old spec from matrix-doc and the legacy CI builds.
    • Details on which directories/files are no longer used are in Add WIP meta-docs for the new spec #3025.
    • We need to move swagger somewhere. Perhaps it's own deployment on try.matrix.org? This isn't really a blocker.
  • Allow spec PRs and "unfreeze".
@anoadragon453
Copy link
Member Author

On redirecting from the old unstable spec to the new...

We want to redirect the API documents, as well as the proposals page. We don't want to redirect the appendices however, as there aren't any versions of the document, it's always just been unstable. Thus viewing old versions of the spec, which link to the appendices, would show the new spec site - which doesn't make too much sense.

The appendices is built from the unstable spec. The idea is to copy one of the latest builds of the page's HTML into the matrix.org repo and put a big "you're viewing the old version btw!" box at the top, which would have a link to https://spec.matrix.org/unstable/appendices.

In terms of automatic redirection for the other pages, we can either just blankly redirect at the HAProxy level, which wouldn't translate or preserve any permalinks, or do something fancy with some client-side JavaScript. This is due to the client being the only one that can read anchors (#get-r0-login). Since this is unstable... I'm leaning towards just redirecting via HAProxy for now, but we'll need something more robust when redirecting the old stable spec versions.

anoadragon453 added a commit to matrix-org/matrix.org that referenced this issue Mar 16, 2021
This PR is part of unfreezing the spec as a whole after the spec redesign has launched: matrix-org/matrix-spec-proposals#3055

Essentially we'd like to redirect the unstable versions of the old spec to the new spec site (https://spec.matrix.org). Unfortunately, we can't do that for the appendices page as there is no stable vs. unstable appendices page. It's never been versioned. As such, if we redirected it then any links to the appendices in the stable versions of the legacy spec would take you to the appendices page on the new spec - which would be very weird.

Thus, this PR freezes the appendices page in time. We'll be setting up redirects for all of the `/unstable` spec pages, as well as the `/proposals` page, as with the former the user consciously chooses to view the unstable spec, and in the latter the proposals page is a living document which isn't deep-linked into by the spec.
@anoadragon453
Copy link
Member Author

We've now removed much of the old build tooling from the matrix-doc repo in #3094, leaving us open to accept new spec PRs!

The spec is now officially unfrozen! 🎉

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

No branches or pull requests

1 participant