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

Conformance display profiles on gatewayapi docs #2874

Merged

Conversation

xtineskim
Copy link
Contributor

What type of PR is this?
/kind documentation

What this PR does / why we need it:
Related to #2550. tldr, we lack a way to quickly show different implementations of the Gateway API and their features. After trying various plugins for mkdocs, the most convenient was a markdown table that could be sorted based on columns. Not the most ideal experience, but it's a start for showing conformance profile reports on the gateway api site
Which issue(s) this PR fixes:
#2550 (although this will need more iteration in the future.It's a start)

Fixes #

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/documentation Categorizes issue or PR as related to documentation. labels Mar 14, 2024
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 14, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @xtineskim. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@shaneutt
Copy link
Member

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 14, 2024
@robscott
Copy link
Member

Thanks @xtineskim!

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 14, 2024
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 19, 2024
Copy link
Member

@mlavacca mlavacca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR, @xtineskim!

hack/mkdocs-copy-geps.py Outdated Show resolved Hide resolved
site-src/implementation-table.md Outdated Show resolved Hide resolved
@xtineskim xtineskim marked this pull request as draft April 2, 2024 18:05
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 2, 2024
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 4, 2024
http_reports.drop_duplicates(subset='organization', inplace=True, keep='last')

table = pandas.DataFrame(columns=http_reports['organization'])
table.insert(loc=0, column='Features', value=httproute_extended_conformance_features_list)
Copy link
Contributor

@candita candita Apr 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better use of the space if we come up with list of shortened feature names. Just removing the HttpRoute prefix will help. Maybe there could be a link from the shortened feature name to its reference in the API or a similar option.

For example, HTTPRouteBackendRequestHeaderModification could be called Header Modification and point to github.com/kubernetes-sigs/gateway-api/blob/e81022784e13b041a91f73725e9f3e393fccdbfc/conformance/utils/suite/features.go#L101

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also helps if readers aren't familiar with the terms we use for our features.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we can leave this for the next version, as we wouldn't want to hold the first iteration.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on this being very nice to have but also not a blocker. If you run out of time to fit this into this PR, do you mind filing a follow up issue so we don't lose track of it?

@@ -38,7 +38,7 @@ profiles:
- HTTPRouteRequestTimeout
- HTTPRouteResponseHeaderModification
- HTTPRouteSchemeRedirect
name: HTTP
name: HTTP
Copy link
Contributor

@candita candita Apr 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If an implementation adds a broken-format report, will it mess up the display completely, or just for that implementation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good question - it will be missing from the display. For example, currently the generate_table filters for the name "HTTP", and if that column is missing (the format results in the column being in an incorrect location in the dataframe), then it will be dropped. I guess it's somewhat of a check

hack/mkdocs-copy-geps.py Outdated Show resolved Hide resolved
Copy link
Member

@mlavacca mlavacca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like @robscott's proposal to group reports by macro-categories (Gateway and Mesh) and have implementations on the y-axis. I see the additional problems we need to tackle here:

  1. for each Gateway API Version, an implementation can submit multiple reports for different implementation versions
  2. for each Gateway API version and implementation version, there can be multiple reports related to the modes
  3. an organization can have multiple projects (at Kong, for example, we have the Gateway Operator we'll add conformance for soon)

For this reason, I'd like to iterate on Rob's proposal and add the following details:

Gateway Profile

HTTPRoute

Org Project Version Mode HostRewrite MethodMatching MethodMatching PathRedirect ...
Kong kubernetes-ingress-controller v3.1.2 default
Kong project-2 v1.2.3 with-the-lot
EnvoyProxy envoy-gateway 0.6.0 default

Mesh Profile

HTTPRoute

...

I understand this decreases the readability of the table, but I didn't find a better way to include all the needed information.

@xtineskim
Copy link
Contributor Author

@mlavacca thanks for your input! I think with @candita's comment about having abbreviated names (maybe not in this pr), I think it would be better. I'll make the changes to switch the axis

Per your comments listed:

  1. for each Gateway API Version, an implementation can submit multiple reports for different implementation versions

Currently I am just grabbing the latest report uploaded (nginx, contour both have 2 yaml reports, but i sort the versions and keep the latest one). I'm hoping that as new conformance reports are generated, all the profiles will be included in the latest report

2.for each Gateway API version and implementation version, there can be multiple reports related to the modes

Ah good catch with the mode, I forgot that use case (reference for others). I haven't seen any project report use that field either (yet). To address this, I can add a filter for mode for the loaded dataframes to look for the mode type, but also add in the default mode for current projects. Thanks for the reminder on this!

3.an organization can have multiple projects

I'm assuming though that this will have it's own folder, and a different project name? And if the project name is different, that shouldn't be a problem 👍

@xtineskim
Copy link
Contributor Author

@robscott thank you for the suggestions! 🤝 slowly addressing the above comments, and i like the proposal of having the Gateway Profile and the Mesh Profile.
Just a few q's:

  • The Mesh Profiles information are pulled from the name of MESH in the reports (for example kuma's. Not sure if naming of MESH will have to be changed in the future if other routes will be added under the MESH conformance? I guess just assume keeping it for HTTPRoute for now?
  • Should I still have the Kuma listed under the Gateway Profile as well for HTTPRoute (pulling from this part of the report).

@robscott
Copy link
Member

The Mesh Profiles information are pulled from the name of MESH in the reports (for example kuma's. Not sure if naming of MESH will have to be changed in the future if other routes will be added under the MESH conformance? I guess just assume keeping it for HTTPRoute for now?

This is actually one of my concerns with the current names of the conformance profiles. I think we may want to just settle on "mesh" and "gateway" conformance profiles and then have per-route details covered by the supported features. Interested in what @shaneutt and @mlavacca think about that though.

Should I still have the Kuma listed under the Gateway Profile as well for HTTPRoute (pulling from this part of the report).

Yes, I think both Kuma and Istio support the Mesh and Gateway concepts in Gateway API, so they'd be covered under both sections.

@michaelbeaumont
Copy link
Contributor

Should I still have the Kuma listed under the Gateway Profile as well for HTTPRoute (pulling from this part of the report).

Yes, I think both Kuma and Istio support the Mesh and Gateway concepts in Gateway API, so they'd be covered under both sections.

Yep, Kuma does indeed support HTTPRoute for both Mesh and Gateway!

@mikemorris
Copy link
Contributor

mikemorris commented Apr 23, 2024

Confirming that Istio likewise supports HTTPRoute for both gateway and mesh use cases. This visualization is looking great and should be quite helpful in guiding users looking to adopt Gateway API!

Copy link
Member

@robscott robscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all the work on this @xtineskim! This is looking like it's really close, just a few more nits but otherwise LGTM.

| kumahq | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: | :x: |
| nginxinc | :x: | :white_check_mark: | :white_check_mark: | :x: | :white_check_mark: | :white_check_mark: | :x: | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: | :x: | :x: |
| projectcontour | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: |
| solo.io | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xtineskim I think we might need to show both "Organization" and "Project" here for now. Otherwise we end up with incomplete information. For example, in this case, most people would want to know the product name ("Gloo Gateway"), while in the case of Kong above, the "Kubernetes Ingress Controller" product name is really not sufficient. Until we have a better solution in conformance reports, I think we'll just have to settle for reporting both.

@mlavacca Do you think it's worth adding a new field (or merging fields) in conformance reports to make this easier to handle? Maybe we should just have a single product name field that represents everything?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the reports we already have organization and project, which if merged provide a unique tuple. Acutally, this is very related to my comment above: #2874 (review). I agree we should address both org+project and implementation version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gotcha, i'll add them in 👍

@@ -0,0 +1,25 @@
The following tables are populated from the conformance reports uploaded by project implementations. They are separated into the extended features that each project supports listed in their reports.

## Gateway Profile
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure where/how to fit this in, but we'll likely want to always support the current and previous version of Gateway API here. Maybe we need something like:

## v1.1
### Gateway
#### HTTPRoute

...

## v1.0

Admittedly a report for v1.1 hasn't merged yet, but that should happen relatively soon with #3025.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could also be a followup item though if we can't get it in this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah i think i'd like to noodle on it a bit. I don't like the way i have the version handled, but maybe a way to have older pages potentially? 🤔

site-src/implementations.md Outdated Show resolved Hide resolved
@@ -15,10 +15,109 @@
import shutil
import logging
from mkdocs import plugins
import yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I think this file should probably be renamed to represent the broader scope of the script.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im thinking of putting this conformance report generation into it's own make-implementation-table.py and have it as it's own hook. Thoughts??

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM, thanks!

mkdocs.yml Show resolved Hide resolved
http_reports.drop_duplicates(subset='organization', inplace=True, keep='last')

table = pandas.DataFrame(columns=http_reports['organization'])
table.insert(loc=0, column='Features', value=httproute_extended_conformance_features_list)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on this being very nice to have but also not a blocker. If you run out of time to fit this into this PR, do you mind filing a follow up issue so we don't lose track of it?

Copy link
Member

@robscott robscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @xtineskim, a couple tiny nits but otherwise LGTM.


### HTTPRoute

| Organization | project | version | HTTPRouteMethodMatching | HTTPRouteQueryParamMatching | HTTPRouteResponseHeaderModification | HTTPRouteBackendTimeout | HTTPRouteHostRewrite | HTTPRouteParentRefPort | HTTPRoutePathRedirect | HTTPRoutePathRewrite | HTTPRoutePortRedirect | HTTPRouteRequestMirror | HTTPRouteRequestMultipleMirrors | HTTPRouteRequestTimeout | HTTPRouteSchemeRedirect |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Would be nice if Project and Version were capitalized

site-src/implementation-table.md Outdated Show resolved Hide resolved
@@ -15,10 +15,109 @@
import shutil
import logging
from mkdocs import plugins
import yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM, thanks!

@robscott
Copy link
Member

robscott commented May 2, 2024

Thanks @xtineskim, this is a great addition!

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 2, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: robscott, xtineskim

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 2, 2024
@k8s-ci-robot k8s-ci-robot merged commit cd175ec into kubernetes-sigs:main May 2, 2024
8 checks passed
@xtineskim xtineskim deleted the conformance-profile-display branch May 3, 2024 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/documentation Categorizes issue or PR as related to documentation. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.