-
Notifications
You must be signed in to change notification settings - Fork 123
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
Move package API docs from docs
to this repo to facilitate a single-place of ownership
#237
Comments
As part of this, we should update the README in a couple of ways:
|
@cnunciato and I started working on this. One thing we've discovered is that there doesn't seem to be a way to tell Hugo to exclude certain dirs from its "watch" (livereload) feature. We were able to use the |
Last week, @cnunciato and I tried to pull in updates, from our PR branch related to this, into a We would not generate API docs AOT and check them into a repository anymore since they don't serve any other purpose than to include them in a build. Instead, we think we can defer the generation of the API docs to just-in-time by simply relying on the metadata files as the source artifact as to which packages the API docs would need to be built for. To be precise at the time of site build we could invoke The work to be done with the new proposal would be:
As part of this, I suggest that we don't move the tools from BenefitsThe above suggestions would still maintain the benefit of not having several push builds queue up every time a new provider is released. We would still be drastically decreasing the amount of builds running at any given time since we would batch up all changes made to the registry and pick them up in a scheduled workflow in We would be able to close #105 with the above suggestion. That means anytime we want to rebuild API docs we no longer need to rely on static lists in our scripts. We would use the registry's package listing as the source of truth for which packages we need to regenerate API docs. Potential downsidesChristian brought up a point about a potential issue with this approach. It's that we would be adding ~15 mins to a site deployment because of the API docs generation. We would still be net-green in terms of the number of PR builds enqueued for deployment compared to today. It'll be far fewer builds but each build would be slower by ~15 mins compared to today. |
Thanks for writing all this up, Praneet! And yep, that's right -- it'll add ~15 minutes to each deployment and PR build, which means folks writing content in repos like pulumi-hugo will need to wait an additional 30 minutes or so for those changes to be published. The local-dev experience will also be affected in that devs working on registry won't be able to pull in some already-built docs from a local clone of pulumi/docs, but have to run This is definitely a step in the right direction, though, and I'm sure we'll be able to iron out these wrinkles as we go. |
Another benefit to the approach if I'm understanding it correctly is that it would remove the current confusion that exists today where someone tries to submit a PR against the auto-generated content. |
@praneetloke do we have any outstanding work here? |
Nope, not in this issue. I do want to track some follow-up work for later. Feel free to close this. In fact, as a bonus we can close #105 as well :) I'll link to this issue when I get those follow-up ones created. |
We want to move all API docs and how-to guides from the
docs
repo toregistry
to their respective folders. We are looking at ways to allow us to still runmake serve
(for development within the repo) and not have Hugo kill our dev machines. For that @cnunciato will look into excluding theapi-docs
specifically from Hugo processing those in dev mode. We would add an alternatemake
target for devs who wish to see the API docs locally that would involve doing abuild
. So there would still be a way for devs to “see” the API docs locally which in today's world one can't unless they copy theapi-docs
folder over for a package fromdocs
to here just to see something work end-to-end. This would be an improvement over what we have today.Then we would open a PR in
docs
repo to delete all API/how-to guides related folders. That is,content/registry/**/*
as well asstatic/registry
. We would also move some of thetools/
over to theregistry
repo as well. This means we’ll need to update the existing docs generation workflow in that repo to do a “redirect” of therepository_dispatch
event to theregistry
repo where we will have the same exact workflow. This will buy us time to be able to update all of our providers to post arepository_dispatch
, when we release new versions, to theregistry
repo instead. This is so we don’t break the mechanism that is in-place today.This helps the self-service contribution story (#206) immensely as everything related to packages would be housed in the same repository. It would also make it easy for us to author automation that does the right things.
UPDATE: We eventually ended up doing something entirely different from the above. See #237 (comment).
The text was updated successfully, but these errors were encountered: