Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
Add detailed site-breakage data
Browse files Browse the repository at this point in the history
This is intended to allow us to compute the overall priority of an
issue based on the factors we use in triage, rather than assigning the
impact/severity directly.

It adds a number of fields under 'breakage' that contain details about
the extent and impact of the breakage.

For now plain URLs are still allowed, to avoid having to rewrite all
existing entries at once.
  • Loading branch information
jgraham committed Jul 27, 2022
1 parent 968002f commit ace0fb2
Show file tree
Hide file tree
Showing 3 changed files with 160 additions and 8 deletions.
36 changes: 32 additions & 4 deletions data/sidebar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,37 @@ solutions:

references:
breakage:
- https://github.com/webcompat/web-bugs/issues/11622
- https://github.com/webcompat/web-bugs/issues/55685
- https://github.com/webcompat/web-bugs/issues/67848
- https://github.com/webcompat/web-bugs/issues/106830
- url: https://github.com/webcompat/web-bugs/issues/11622
site: http://www.election.gov.np
platform:
- all
intervention: https://github.com/mozilla-extensions/webcompat-addon/blob/4a3094f52d561925620ac441d5c4423766ec5c29/src/webextension/injections/js/bug1472081-election.gov.np-window.sidebar-shim.js
impact: feature_broken
affects_users: all
resolution: site_changed
- url: https://github.com/webcompat/web-bugs/issues/55685
site: http://www.susu09.com/forum.php
platform:
- all
last_reproduced: 2020-07-27
impact: site_broken
affects_users: all
resolution: site_fixed
- url: https://github.com/webcompat/web-bugs/issues/67848
site: https://indichords.com/
platform:
- all
last_reproduced: 2021-03-08
impact: feature_broken
affects_users: all
resolution: site_fixed
- url: https://github.com/webcompat/web-bugs/issues/106830
site: https://www.pontefractfhs.org.uk
platform:
- all
last_reproduced: 2022-07-09
impact: site_broken
affects_users: all
resolution: site_fixed
platform_issues:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1428302
63 changes: 60 additions & 3 deletions schemas/entry.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,68 @@
"additionalProperties": false,
"properties": {
"breakage": {
"description": "List of URLs to issues where actual site breakage is tracked. If available, point the link directly to a comment with clear STR",
"description": "List of issues tracking known site breakage.",
"type": "array",
"items": {
"type": "string",
"format": "uri"
"anyOf": [
{
"type": "string",
"format": "uri",
"description": "URL of tracking issue"
},
{
"type": "object",
"properties": {
"url": {
"type": "string",
"format": "uri",
"description": "URL of tracking issue"
},
"site": {
"type": "string",
"format": "uri",
"description": "URL of broken site of page"
},
"platform": {
"type": "array",
"items": {
"type": "string",
"enum": ["all", "desktop", "mobile", "windows", "macos", "linux"],
"description": "List of affected platforms. Default is 'all'"
}
},
"last_reproduced": {
"type": "string",
"format": "date",
"description": "Most recent date the issue was successfully reproduced"
},
"intervention": {
"type": "string",
"format": "uri",
"description": "URL of intervention that is shipping or has been shipped. Link to the code in the GitHub repository, and use the canonical URLs to ensure persistance over time"
},
"impact": {
"type": "string",
"enum": ["site_broken", "feature_broken", "significant_visual", "minor_visual", "unsupported_message"],
"description": "Type of breakage"
},
"affects_users": {
"type": "string",
"enum": ["all", "some", "few"],
"description": "What fraction of users are affected. 'all' where any site user is likely to run into the issue, 'some' for issues that are common but many users will not experience, and 'few' where the breakage depends on an unusual configuration or similar."
},
"resolution": {
"type": "string",
"enum": ["site_changed", "site_fixed"],
"description": "If the issue no longer reproduces on this site, the kind of change that happened. 'site_change' if there was a general redesign or the site is no longer online, 'site_fixed' if the specific issue was patched."
},
"notes": {
"type": "string",
"description": "Any additional notes about why the other fields for this issue are set to the given values."
}
}
}
]
}
},
"platform_issues": {
Expand Down
69 changes: 68 additions & 1 deletion tools/kbcheck/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub struct Solutions {
#[serde(deny_unknown_fields)]
pub struct References {
#[serde(default)]
pub breakage: Vec<Url>,
pub breakage: Vec<BreakageItem>,
#[serde(default)]
pub platform_issues: Vec<Url>,
#[serde(default)]
Expand All @@ -47,6 +47,73 @@ pub struct References {
pub standards_discussions: Vec<Url>,
}

#[derive(Debug, Serialize, Deserialize)]
#[serde(untagged)]
pub enum BreakageItem {
Url(Url),
Breakage(Breakage),
}

impl BreakageItem {
pub fn url(&self) -> &Url {
match self {
BreakageItem::Url(url) => url,
BreakageItem::Breakage(item) => &item.url,
}
}
}

#[derive(Debug, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct Breakage {
url: Url,
site: Url,
platform: Vec<Platform>,
last_reproduced: Option<String>, // Date
intervention: Option<Url>,
impact: Impact,
affects_users: AffectsUsers,
resolution: Option<BreakageResolution>,
#[serde(default)]
notes: String,
}

#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum Platform {
All,
Desktop,
Mobile,
Windows,
Macos,
Linux,
}

#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum Impact {
SiteBroken,
FeatureBroken,
SignificantVisual,
MinorVisual,
UnsupportedMessage,
}

#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum AffectsUsers {
All,
Some,
Few,
}

#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum BreakageResolution {
SiteChanged,
SiteFixed,
}

#[derive(Debug, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct Entry {
Expand Down

0 comments on commit ace0fb2

Please sign in to comment.