-
Notifications
You must be signed in to change notification settings - Fork 98
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
Filter Extension Re-organisation #293
Conversation
This comment has been minimized.
This comment has been minimized.
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.
This sounds good to me and thanks for the detailed PR description. I'm okay with bringing the docs in the code, been pondering trying it out to get rid of the #
rust code we have in our yamls when viewing outside rustdoc/mdbook and glad to see it makes sense!
One part I'm hoping works but not sure of is whether we can link to a particular section in another page/module-doc? e.g being able to link to the ### metrics
section of filter A's documentation from filter B's documentation? I'm hoping its possible since its all markdown but not too sure?
If so this looks good to me and (not for this PR) I think we should also bring in the other docs pages like xds, session, proxy etc too where they make sense so we don't have documentation split between two places.
Curious what @markmandel thinks of this approach overall
Yeah - love it! Moving stuff into rustdoc is great - I figured we would end up there eventually, but likely after release, just because we're in a bit of a limbo at the moment, and it's hard to track and link between both, since we don't have a release in cargo yet. The only downside I see: It's harder to keep improving documentation between releases. If we want to update docs for something that's hosted on https://docs.rs/ we have to cut a whole new release. But we can likely be smart about what we move and what we don't. Reference docs are probably better in rustdoc, whereas guides / tutorials might live better in Github (which is probably the things we'll want to improve incrementally). Thoughts? |
FWIW, the convention in most Rust projects is to use https://github.com/rust-lang/mdbook for guide level information. As it’s a lot more powerful than GitHub rendered markdown, and it’s pretty easy to deploy to GitHub Pages.
Along those same lines, if we want to have rendered API documentation available for the latest main, it’s pretty simple to run cargo doc and deploy that output to GitHub Pages. |
Right this makes sense! having guide/tutorial types docs in something like mdbook and reference as rust docs sounds good to me! |
cffb995
to
2cd8742
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2cd8742
to
6a3b2c3
Compare
This comment has been minimized.
This comment has been minimized.
Alright, I've addressed all the merge conflicts, so this should be in right state for review. I've also added one additional change which is the removal of the |
Sounds good to me! Let's do it. |
6a3b2c3
to
4328551
Compare
This comment has been minimized.
This comment has been minimized.
4328551
to
992051d
Compare
Build Succeeded 🥳 Build Id: 70006958-9c15-4144-b5b1-086f89da0b81 To build this version:
|
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.
Just had a look through - this is a much cleaner implementation surface 👍🏻 love it.
I'm being cognisant of making sure we stay in a state of "release ready" - just because I know releases can turn around pretty fast, once all the approvals line up.
I'm thinking we should we add a todo block, or a broken link to where we think the docs.rs documentation should go in the README.md for now, particularly around Filter configuration - just so we're prepared for when things actually release, and also don't end up losing track of the documentation.
Other than that, this looks great. We should probably write a ticket for moving the other docs to mdbook as well. I particularly love that we won't need nightly to test out the inline documentation 🥳 and can get rid of that as dev tooling entirely.
So it's really just documentation stuff that blocks me from approving this (I'm all about that developer experience 😄). @iffyio anything on your end?
This comment has been minimized.
This comment has been minimized.
d81aeb0
to
3472917
Compare
This comment has been minimized.
This comment has been minimized.
3472917
to
dc75cb4
Compare
This comment has been minimized.
This comment has been minimized.
dc75cb4
to
8eae507
Compare
This comment has been minimized.
This comment has been minimized.
52ea75f
to
9a6d0ea
Compare
This comment has been minimized.
This comment has been minimized.
9a6d0ea
to
aceaf9d
Compare
aceaf9d
to
ec382e1
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Build Succeeded 🥳 Build Id: cf79d888-a065-46e3-8563-fcee5447cb06 To build this version:
|
Thanks so much 🙌🏻 - this is much easier to review now. Once we land #319 that will also likely resolve much of my concerns, as we can host our own documentation on our gh-pages. There are some changes here to existing docs that I'd like to do once we land #319, since then we'll have the version snapshot (or we could link do the release branch docs????) and won't be break the experience for new users. Focusing on release atm, but will jump on this once that's done, because I really like this new API surface. |
Co-authored-by: Ifeanyi Ubah <[email protected]>
Co-authored-by: Ifeanyi Ubah <[email protected]>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Build Succeeded 🥳 Build Id: 60cce3e2-677f-4055-9018-2fe8af24ce59 To build this version:
|
@@ -67,9 +67,10 @@ To extend Quilkin's code with our own custom filter, we need to do the following | |||
// src/main.rs | |||
use quilkin::filters::{Filter, ReadContext, ReadResponse, WriteContext, WriteResponse}; | |||
|
|||
const NAME: &str = "greet.v1"; |
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.
I was hoping that #319 's snapshotting would solve this issue, but looks like that's blocked for the moment.
Since this is a change in API, and this will break the docs for 0.1.0 -- I'm wondering how to handle this in the short term.
That says something like:
This documentation is for the development version of Quilkin. To view the documentation for a specific release, switch to the release tag in the above dropdown.
(I'm happy to do this as a seperate PR if we are all happy with it).
Which can then we can remove it once #319 is merged and good to go.
Other than that, this is 👍🏻 as far as I am concerned - and I want to get it in, as I know a lot of your follow up work is based on this.
Sound good?
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.
SGTM, I can make a separate PR.
Break out a section on the README.md linking to tagged snapshots of documentation, so that as API changes occur it's still easy to see previous API documentation and accompanying guides. It also stops new users from getting confused by in-flight API changes. I believe this will aso unblock googleforgames#293 and also remove the requirement to get a 0.1.0 snapshot for googleforgames#319, which could block other PRs as well.
Break out a section on the README.md linking to tagged snapshots of documentation, so that as API changes occur it's still easy to see previous API documentation and accompanying guides. It also stops new users from getting confused by in-flight API changes. I believe this will aso unblock googleforgames#293 and also remove the requirement to get a 0.1.0 snapshot for googleforgames#319, which could block other PRs as well.
Break out a section on the README.md linking to tagged snapshots of documentation, so that as API changes occur it's still easy to see previous API documentation and accompanying guides. It also stops new users from getting confused by in-flight API changes. I believe this will aso unblock googleforgames#293 and also remove the requirement to get a 0.1.0 snapshot for googleforgames#319, which could block other PRs as well.
Break out a section on the README.md linking to tagged snapshots of documentation, so that as API changes occur it's still easy to see previous API documentation and accompanying guides. It also stops new users from getting confused by in-flight API changes. I believe this will aso unblock googleforgames#293 and also remove the requirement to get a 0.1.0 snapshot for googleforgames#319, which could block other PRs as well.
Build Succeeded 🥳 Build Id: 862f1be6-1727-462b-a86c-5eca7d83bc6a To build this version:
|
This Pr builds on-top of #286 and refactors the API structure of the filter changes to be easier to use, and cleans up the public API surface.
Changes:
factory
that constructs a new instance ofDynFilterFactory
. This makes paths to construct filters much less verbose while conveying the same information, and hiding the underlying implementation. Considering the following example.extensions
module is removed, and some filter extensions were further broken up into submodules if they had a significantly enough complex configuration type and traits.closes #280
Filter Extension Docs Example