question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

This Epic proposes a concept of Rule Sets. This is a grouping mechanism for rule checks and aims to make Zally implementation more general and allow usage beyond Zalando.

As a Zally user I want to be able to package rule checks in groups And I can better group the rules (by topics, technical level, organization, etc.) So that I can easily implement add my own rule sets to a Zally installation without changing source code of the project

Proposal: Rule Sets

Entities

Check

A check implements one aspect of a Rule. A Rule contains one or multiple checks (1-to-n relationship). Check = (Description, CheckImplementation)

Example: “HTTP method have to correspond with the response code as specified in the standard”

Rule

A rule is an abstract entity, which represents an external guideline which can be automatically checked. Rule = (Id, Title, Type, ExternalLink, Checks) with Type ϵ {MUST, SHOULD, MAY}

Example: “Use standardized HTTP response codes”

Rule Set

A rule set is a bundle or a package of Rules. It should represent a logical grouping of rules (e.g. one company’s guidelines). Rule Sets are developed, tested and published as separate packages. Similar to a plugin mechanism, packages can be added to a Zally installation. Zally server is able to discover them on the startup. RuleSet = (Id, Rules)

Example: “Zalando RESTful API and Event Scheme Guidelines”

Configuration

All discovered Rule Sets are active per default. Administrator of Zally installation can deactivate Rule Sets (per rule-set-id) and specific Rules (rule-set-id-rule-id) via configuration.

Working Packages

  1. Ignore Rules by External Ids - #558
  2. Core Interfaces - #559
  3. Package Discovery - #560
  4. Statistics for Rule Sets - #561
  5. Documentation - #562

Preferably, we should work documentation-driven. 1-4 working packages have to be done sequentially.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:2
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
roxspringcommented, Oct 12, 2017

Just wanted to make sure I’m understanding the distinction between the various concepts and trying identify the principles of identifying rules and checks. For example looking at the Zalando Guideline 150:

The RuleSet would be: Zalando Guidelines

The Rule would be the heading from the particular section: MUST Use Specific HTTP Status Codes [150]

The checks would be… one per statement/aspect?:

  • You must not invent new HTTP status codes; only use standardized HTTP status codes and consistent with its intended semantics.
  • You should use the most specific HTTP status code for your concrete resource request processing status or error situation.
  • When using HTTP status codes that are less commonly used and not listed below, you must provide good documentation in the API definition. Note that this suggests that the severity can vary by Check, not simply at the Type level (although maybe the most severe roles up to the Type level??).

Or is the idea that checks would be even more fine grained and broken down by HTTP Method, HTTP Status Code Family, or similar?

1reaction
roxspringcommented, Oct 5, 2017

Generally looks good to me.

Where do violations fit in? Based on the existing architecture I’m presuming that each check can produce 0…1 violation, and therefore going forward a rule can produce many violations. (I’m tempted to suggest that each check should be able to produce many violations with each violation referencing a single location within the swagger, as opposed to the current model where a violation can point to multiple occurrences within the swagger definition).

Does “Zally operator can deactivate …” imply that just the end user can deactivate thing? Would be good if as the administrator of my installation I can also deactivate so that end users don’t need to repeat that configuration.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Formats – Multiplayer | Epic Card Game
These rules only apply to games with three or more players. ... At the start of the game, each player sets their gold...
Read more >
EPIC: Rulesets available - Bell of Lost Souls
In order to improve visibility to the FAQ entries, the Epic Compendium includes the FAQ entries within the main body of the rules...
Read more >
Epic Games Community Rules | Be Safe and Have Fun
Please read the Epic Games Community Rules. ... You can find a full set of all the things you can do to better...
Read more >
Epic Origins Rules - Brotherwise Games
Call to Adventure is a tabletop game in which players compete to craft the hero with the greatest destiny. Play cards to build...
Read more >
Epic Card Game Complete Bundle: Base Set, Guardians ...
Amazon.com: Epic Card Game Complete Bundle: Base Set, Guardians of Gowana and ... Will you lead the fight against their rule or fight...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found