-
-
Notifications
You must be signed in to change notification settings - Fork 142
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
Versioned guides #2
Comments
@dfreeman wrote
I haven't thought much about this yet. Mirage has versioned docs, and I do this by literally copy-pasting the guides directory for each version. It's a Jekyll app, but you could imagine doing something similar in the Ember dummy app. Now on the flip side, we will be needing to solve the versioned API docs problem as well. And the source for the API docs will certainly live in different versions of the project - since they'll be pulled from the actual tagged releases of the source code. Seems we can either make everything static, or put things on a server somewhere. I started to write more but I need more time to think about this. Back later. If anyone has thoughts here drop a line. |
Sounds good. I'll let this rattle around in the back of my head while I work on other stuff and post back if anything occurs to me. |
For example I will use this to rewrite Mirage's docs site. Want to port over the old versions and probably put them in a static place, public? Have to think about this. |
So I just took some time to page the long conversation we had back in April back into my brain. It spans a bunch of topics, but I think has some relevance here. My biggest takeaway was that in order to support interactive guides across different versions of the addon in question, our only real option was going to be multiple deployed Ember apps. If we were to go with that approach and treat Just spitballing on a directory structure, I could imagine something like:
To your point way back, you probably want API data published per-release, but guides are likely getting overhauled less frequently. Exactly how you'd want to configure that behavior and the affinity between API versions and guide versions would be a fun bikeshedding exercise for the future 😉 |
Let's think through using Mirage as a real-world case. Current URLs: ember-cli-mirage.com # homepage
ember-cli-mirage.com/docs/v0.3.x # 0.3 docs
ember-cli-mirage.com/docs/v0.2.x # 0.2 docs
ember-cli-mirage.com/blog # blog
ember-cli-mirage.com/about # about When I migrate the site I want to be able to deploy the old site somewhere, more or less.
I basically just want the old guides ported over somewhere. New structure could be ember-cli-mirage.com # new homepage
ember-cli-mirage.com/#/blog # new blog
ember-cli-mirage.com/#/about # new about
ember-cli-mirage.com/#/docs/v0.3.x # new 0.3 docs (migrated)
ember-cli-mirage.com/docs/v0.2.x # old 0.2 docs Since we use the hash Router config for Ember apps served on github pages, this actually seems like it would work well. The One issue is that if |
Where do you imagine future Mirage is maybe a tricky example to illustrate this particular piece with, but if you think of an addon like From a "how do we keep deployed versions isolated" perspective, I could see a layout like this working, but it raises some questions:
While it's not ideal, it seems like it wouldn't be the end of the world for things like One option would be for the app hosted under
My take is that some amount of complexity around managing the versions is unavoidable, and if we try to make the full I'm happy to take on the work of managing the deployment of different versions, once we tackle the layout questions above and know what we're aiming for 🙂 |
(Yikes. Sorry for the wall of text.) |
You're absolutely right, conflicting global Ember versions/CSS sheets and more was one of the original reasons we wanted to go with isolated apps. I'm thinking, what if we just start with an easy way to deploy the current version of the site, in a way that doesn't clobber the entire gh-pages branch? That way, for a project like Mirage, I could just decide where I wanted to put the old site and move it there. There should also be an option to where you'd want to put your current Ember dummy app in the gh-pages directory. So |
Thinking we should start with something like this, then try it out in some projects and iterate from there |
Seems like a straightforward path to MVP, and we can deal with automating the version management process down the line.
We'll have to be careful about how we reference assets and the docs JSON data to have a given deploy of the app work at different root URLs without rebuilding, but I think that should be doable. |
Step 1: ef4/ember-cli-deploy-git#14 |
@dfreeman check with @sivakumar-kailasam because I had this installed and he removed it to change the deploy story |
Ah, I missed that this was using Travis's built-in support for @sivakumar-kailasam is the motivator for having Travis do the push that it's simpler to set up? |
Yep couldn't get the deploy git plugin to work on Travis. |
I just got a dummy repo publishing to The setup wasn't especially pretty, but I think we can probably abstract most of it away. I'll keep playing around and see what I can come up with. |
sweet. I started with |
I packaged up my learnings into a companion ember-cli-deploy plugin that works alongside The None of this directly moves us toward versioned guides, but it puts us back in control of how the build is happening and where it goes, which is a step in the right direction. |
Awesome @dfreeman ✨ |
Nice work man |
@dfreeman what does an MVP for this feature look like? I feel like it's the biggest open issue for v1 |
I think there are two threads that have been discussed here (my fault for conflating the two) that complicate one another:
To be able to deploy to the root of the With that in place, one super-minimal version of an MVP would basically be continuous deployment for I think there's a small step up from that, though, that may bring enough extra value to justify trying to roll it out up front. To be able to do automated versioned releases, we basically need to be able to answer two questions at the end of a build:
I could imagine defining a couple of hooks (maybe in |
I imagine eventually we would provide opinionated default implementations for those hooks, as well as being able to ask more sophisticated questions around potential things like one-to-many guides version to API docs version rollout ("is this a new guides version or a refresh of the existing one?"), rather than the more blunt "deploy yes/no?" and "deploy where?". |
Here's what I'd consider a common workflow:
I think these are the scenarios to solve. (1) and (2) seem straightforward and are taken care of with our current workflow. (3) would be taken care of with "documentation for doing manual deploys to subdirs" as you stated. (4) is similar to 3 but (5) is where things get tricky, and what the steps are for (5) will affect the actual strategy we take for the ultimate API for this thing. Let's talk through it. Given
Thoughts? |
My ideal for (5) would be for it to be as simple as checking out a branch, making a commit, and pushing. If the 1.x line is still active enough to warrant documentation edits, nudging authors toward having something like a While it should always be possible to do a manual deploy, I hope that we can land in a place where things mostly "just work" based on e.g. a tag/branch naming scheme (which itself is the manifestation of a default implementation of documented hooks that can be customized). Do you think that's a pipe dream? (3) to me is maybe the most interesting scenario, because it's the most complex with respect to the actual mechanics of the deploy. We want to update the current version of the Guides in place and add a new tagged data set for the API Reference, while keeping the previous API data in available as well. This comes back to some of the discussion earlier in this thread—depending on the exact layout we're talking about for the app(s) vs the API data, (3) doesn't seem like it will be a straightforward "deploy to a subdir" situation. I suspect if we can get crisp on how this should behave and how authors ought to work with the functionality, most of the rest of the scenarios fall out from there. |
You're correct, I hadn't thought through this. In (3) we'd want to preserve 1.0 API Reference while publishing 1.1. So we'd need two sites. That means when (3) comes around, author would need to
In that case the Guides thing isn't a huge issue, since the author would just mostly reuse the existing guides (most of her Dummy app would stay the same). But the API reference would be updated based on new comments from source. |
Because the API Reference is driven off JSON data that's potentially independent of the deployed app, we could land in a place where there's a single most-recent version of the 1.x Guides at any time, and that deployed application could fetch API Reference data for multiple different 1.x versions. The question, to my mind, is whether that's MVP or something we should punt on for now. It may be useful to think the scenario through to see how it impacts other decisions we're making regardless of whether we fully implement it up front or not. Thoughts? |
No description provided.
The text was updated successfully, but these errors were encountered: