-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Adjust API reference docs scripts for knative.dev #2054
Adjust API reference docs scripts for knative.dev #2054
Conversation
The API reference docs were failing to generate because they didn't account for the change from github.com/knative/serving to knative.dev/serving and similar for the eventing and eventing-contrib repos.
I believe this fixes #1661 |
@bbrowning does that mean you are able to build the 0.11 ref docs successfully (ie. complete the steps here)? |
Not sure how this fixes that. |
@RichieEscarez Yes - the script works to generate the 0.11 docs, with one minor change due to me having Go 1.13 locally that requires GOPATH to be set for That's an unrelated, different issue either due to something in my environment or Go 1.13. But, either way, the reference API docs do generate successfully for recent Knative releases now. |
@ahmetb yes, the Go import path for all the Knative repos changed to use the vanity knative.dev domain. Verbose output from the docs generation showed me that it was failing to resolve the Knative imports and thus leading to all the invalid type errors. |
@bbrowning can you upload the resulting html somewhere like a gist? let's see if it fixes the issues I saw around type parsing. |
I went ahead and opened a PR with the updated v0.11.0 reference docs in #2055. That PR is against master, but perhaps should be against the release-0.11 branch? Either way you should be able to see the diff as well as the new rendered markdown from that PR to check for anything else that still looks wrong. |
Awesome! Thanks @bbrowning! I just ran your script and it worked for me too. Ill wait for the green light from @ahmetb before moving forward. |
@RichieEscarez were you able to get serving generated correctly as well? |
hack/gen-api-reference-docs.sh
Outdated
KNATIVE_SERVING_COMMIT="${KNATIVE_SERVING_COMMIT:?specify the \$KNATIVE_SERVING_COMMIT variable}" | ||
KNATIVE_SERVING_OUT_FILE="serving.md" | ||
|
||
KNATIVE_EVENTING_REPO="github.com/knative/eventing" | ||
KNATIVE_EVENTING_LOCAL_REPO="knative.dev/eventing" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's rename _LOCAL_REPO
to _IMPORT_PATH
if you don't mind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ahmetb done, PTAL
I'm just surprised it works without fixing anything but that's cool. |
Here are the staging preview build: https://5df41e57527ac4000777c447--knative.netlify.com/docs/reference/serving-api/ @ahmetb yeah, i get the same output |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually i found a broken artifact from using "knative.dev" -> all these links are now 404:
In serving-api
:
https://knative.dev/serving/blob/master/docs/spec/overview.md#revision
("https://knative.dev" should instead point to "github.com")
@RichieEscarez Those broken links need updating in Knative Serving itself. There were erroneously replaced from their github.com URL in knative/serving#4521 |
knative/serving#6225 fixes the root issue in Serving so we won't have these broken links in our 0.12 release. I added a 2nd commit to #2055 to fix the links directly in the docs for 0.11 - the commit message for it includes the sed command I ran to automatically fix all of these, similar to the sed command used to fix this in Serving itself. |
Zero broken links in the new preview build: https://5df42f87a20218f204084c22--knative.netlify.com/docs/reference/ Thanks @bbrowning! @ahmetb any concerns with these changes? Can we merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Staging build looks good!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bbrowning, RichieEscarez The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
The API reference docs were failing to generate because they didn't
account for the change from github.com/knative/serving to
knative.dev/serving and similar for the eventing and eventing-contrib
repos.