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

feat: add IPIP and TestGroup Metadatas #130

Closed
wants to merge 7 commits into from

Conversation

laurentsenta
Copy link
Contributor

@laurentsenta laurentsenta commented Aug 4, 2023

Contributes to #123
Related comment: https://github.com/ipfs/gateway-conformance/pull/116/files#r1277390949

To implement Dashboards, we introduce:

  • The ability to define "human readable" test groups in code, which do not depend on the test structure, these could be used to generate user-friendly tables like the one in public-gateway-checker.
  • The ability to associate IPIPs reference with a test case and also link to subsections.

Example Output: https://github.com/ipfs/gateway-conformance/actions/runs/5880695313/attempts/1#summary-15947714091
Note how the tests are grouped, and how TrustlessCarEntityBytes links to the corresponding ipip

Todos

  • Introduce the metadata APIs required
  • Draft a dashboard output that relies on these new specs
  • Implement a generator that outputs the groups, versions, and IPIPs

Follow-ups

  • demonstrate a more scalable generator that relies on turning outputs "queriable" data
  • demonstrate a reverse-index that goes from an IPIP and list all the tests (when linked from the specs)
  • When the need arise, we can add IPIP markers to a check (like a single header or payload test)

@laurentsenta laurentsenta marked this pull request as draft August 4, 2023 11:23
@laurentsenta

This comment was marked as outdated.

@laurentsenta laurentsenta force-pushed the feat/introduce-version branch from 57929ea to 0a9d68b Compare August 7, 2023 09:23
@laurentsenta laurentsenta force-pushed the feat/introduce-version branch 3 times, most recently from b526505 to d1c8ff8 Compare August 15, 2023 14:57
@@ -11,6 +12,8 @@ import (
)

func TestTrustlessCarPathing(t *testing.T) {
tooling.LogTestGroup(t, GroupTrustlessGateway)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We define test groups like this

@@ -39,6 +42,7 @@ func TestTrustlessCarPathing(t *testing.T) {
Exactly().
InThatOrder(),
),
IPIP: IPIP402,
Copy link
Contributor Author

@laurentsenta laurentsenta Aug 16, 2023

Choose a reason for hiding this comment

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

We can associate an IPIP to a test, later maybe we'll let users associate to the check itself.

@@ -374,6 +384,9 @@ func TestTrustlessCarDagScopeAll(t *testing.T) {
}

func TestTrustlessCarEntityBytes(t *testing.T) {
tooling.LogTestGroup(t, GroupTrustlessGateway)
tooling.LogIPIP(t, IPIP402, "4.2.2")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can associate an ipip + it's section to a group of tests.

Copy link
Member

@hacdias hacdias Aug 17, 2023

Choose a reason for hiding this comment

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

IPIPs aren't, in general, that long. I'm not sure if including their section is useful, as they all have more or less the same structure (summary, motivation, design, rationale, etc). Nevertheless, I do like the idea of associating the tests to IPIPs.

Copy link
Member

@lidel lidel Aug 17, 2023

Choose a reason for hiding this comment

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

💭 It may not be that useful to associate the entire test group to a single IPIP.
IPIPs are usually deltas against existing specs, and there may be IPIPs on top of historical IPIPs too.

We may have such groups in the future, so fine to keep this, but for now a more useful would be to have something like already existing Hint where specific test case can include a list of IPIPs related to the test.

So far we've beein including IPIP number in the Hint, having dedicated func for this would allow us to print more meaningful error message with link to specific IPIP at https://specs.ipfs.tech/ipips/

@laurentsenta laurentsenta requested a review from galargh August 16, 2023 15:31
@laurentsenta laurentsenta marked this pull request as ready for review August 16, 2023 15:31
@laurentsenta laurentsenta requested review from lidel and hacdias August 16, 2023 15:31
@laurentsenta
Copy link
Contributor Author

laurentsenta commented Aug 16, 2023

@lidel, @hacdias, @galargh I'm preparing the conformance test suite to generate more advanced dashboards, like the one we find in pinning service compliance and gateway checkers.

The goal here is to get your ack on how we'll associate metadata to tests like test groups and IPIPs references.

The output looks like this:
https://github.com/ipfs/gateway-conformance/actions/runs/5880695313/attempts/1#summary-15947714091
but not that this will change A LOT soon when I can generate more advanced dashboards.

@lidel
Copy link
Member

lidel commented Aug 17, 2023

Thank you for prototyping this @laurentsenta

I think the main feedback is that IPIPs are too ephemeral to be used as a high level source of truth, avoid mentioning them in high level reports unless they have a dedicated test group.
Usually, we have mandatory and optional Gateway features, and we should frame things around that, and not IPIPs.

IPIPs describe change to the specs, and should be only mentioned when a specific test case fails.

My thinking is:

  • rule of thumb: we want to hide IPIPs from high level groups and surface them when there is a specific test case instead
    • this means people who are interested in high level spec get to the always-up-to-date spec document, and we only surface historic IPIP details only when a related test case fails
  • for high level groups like "Trustless Gateway" to link to relevant specs https://specs.ipfs.tech/http-gateways/trustless-gateway/
  • for specific groups, try to link to relevant sections in specs, instead of IPIPs – this will be more future-proof, as there may be new IPIP that changes behavior, and the section will always describe latest behavior
  • 👉 IPIP information is the most valuable at the level of specific test check. This means we want a companion to Hint where we can list numbers of IPIPs that are related to the check, and then we can use this metadata info for generating useful output which links to things in https://specs.ipfs.tech/ipips/
    • 💭 perhaps more useful/generic would be HintURLs list, where we could pass multiple URLs related to the test, could be section in specs related to header or parameter, or an IPIP

@laurentsenta
Copy link
Contributor Author

@lidel, thanks for the thorough review and spending the time to clarify!

I'll propose a new API to include your feedbacks regarding specs and ipips.

Regarding the high-level groups: my intent is to create 2 different concepts, "human-readable groups" metadata, and "specs" metadata.

@BigLep
Copy link

BigLep commented Aug 22, 2023

Thanks for sharing. I quickly scanned and saw some of the comments.

From looking at https://github.com/ipfs/gateway-conformance/actions/runs/5880695313/attempts/1#summary-15947714091, things standing out:

  1. Groups like "Path Gateway" should ideally link to the "Path Gateway" spec. (I think Lidel had same comment.)
  2. (Nice to have) Summarize results at the group level (e.g., "Path Gateway" is Green with X/X passing)
  3. (Nice to have) Collapse the individual test results so one just sees the group and then can expand if interested? Maybe possible with https://stackoverflow.com/questions/28607382/is-it-possible-to-create-a-toggle-switch-in-markdown ? (Maybe this means having a table per test group?)
  4. If can't have collapsed results, maybe consider different heading alignment? For example, "Path Gateway" could be center aligned rather than right aligned?
  5. Is there a reason we have a "conformance-" prefix (e.g., "conformance-ipfs.runfission.com")?
  6. (Idea) While prototyping, maybe also add in ipfs.io or dweb.link to show what it looks like when something is mostly green?

This is a drive by because I'm interested in the work. I likely won't be able to engage quickly here so don't block on me.

@laurentsenta
Copy link
Contributor Author

Thanks for all the comments, these informed the new PRs!

@BigLep I took into account your comments, it'll be great to revisit these once we're done with the first iteration of the dashboard (wip)

Closing this, replaced by:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants