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

Commit 793a7d8

Browse files
committed
Add detailed site-breakage data
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.
1 parent 855c9b1 commit 793a7d8

File tree

4 files changed

+169
-10
lines changed

4 files changed

+169
-10
lines changed

data/sidebar.yml

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,37 @@ solutions:
1616

1717
references:
1818
breakage:
19-
- https://github.com/webcompat/web-bugs/issues/11622
20-
- https://github.com/webcompat/web-bugs/issues/55685
21-
- https://github.com/webcompat/web-bugs/issues/67848
22-
- https://github.com/webcompat/web-bugs/issues/106830
19+
- url: https://github.com/webcompat/web-bugs/issues/11622
20+
site: http://www.election.gov.np
21+
platform:
22+
- all
23+
intervention: https://github.com/mozilla-extensions/webcompat-addon/blob/4a3094f52d561925620ac441d5c4423766ec5c29/src/webextension/injections/js/bug1472081-election.gov.np-window.sidebar-shim.js
24+
impact: feature_broken
25+
affects_users: all
26+
resolution: site_changed
27+
- url: https://github.com/webcompat/web-bugs/issues/55685
28+
site: http://www.susu09.com/forum.php
29+
platform:
30+
- all
31+
last_reproduced: 2020-07-27
32+
impact: site_broken
33+
affects_users: all
34+
resolution: site_fixed
35+
- url: https://github.com/webcompat/web-bugs/issues/67848
36+
site: https://indichords.com/
37+
platform:
38+
- all
39+
last_reproduced: 2021-03-08
40+
impact: feature_broken
41+
affects_users: all
42+
resolution: site_fixed
43+
- url: https://github.com/webcompat/web-bugs/issues/106830
44+
site: https://www.pontefractfhs.org.uk
45+
platform:
46+
- all
47+
last_reproduced: 2022-07-09
48+
impact: site_broken
49+
affects_users: all
50+
resolution: site_fixed
2351
platform_issues:
2452
- https://bugzilla.mozilla.org/show_bug.cgi?id=1428302

schemas/entry.schema.json

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,68 @@
8080
"additionalProperties": false,
8181
"properties": {
8282
"breakage": {
83-
"description": "List of URLs to issues where actual site breakage is tracked. If available, point the link directly to a comment with clear STR",
83+
"description": "List of issues tracking known site breakage.",
8484
"type": "array",
8585
"items": {
86-
"type": "string",
87-
"format": "uri"
86+
"anyOf": [
87+
{
88+
"type": "string",
89+
"format": "uri",
90+
"description": "URL of tracking issue"
91+
},
92+
{
93+
"type": "object",
94+
"properties": {
95+
"url": {
96+
"type": "string",
97+
"format": "uri",
98+
"description": "URL of tracking issue"
99+
},
100+
"site": {
101+
"type": "string",
102+
"format": "uri",
103+
"description": "URL of broken site of page"
104+
},
105+
"platform": {
106+
"type": "array",
107+
"items": {
108+
"type": "string",
109+
"enum": ["all", "desktop", "mobile", "windows", "macos", "linux"],
110+
"description": "List of affected platforms. Default is 'all'"
111+
}
112+
},
113+
"last_reproduced": {
114+
"type": "string",
115+
"format": "date",
116+
"description": "Most recent date the issue was successfully reproduced"
117+
},
118+
"intervention": {
119+
"type": "string",
120+
"format": "uri",
121+
"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"
122+
},
123+
"impact": {
124+
"type": "string",
125+
"enum": ["site_broken", "feature_broken", "significant_visual", "minor_visual", "unsupported_message"],
126+
"description": "Type of breakage"
127+
},
128+
"affects_users": {
129+
"type": "string",
130+
"enum": ["all", "some", "few"],
131+
"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."
132+
},
133+
"resolution": {
134+
"type": "string",
135+
"enum": ["site_changed", "site_fixed"],
136+
"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."
137+
},
138+
"notes": {
139+
"type": "string",
140+
"description": "Any additional notes about why the other fields for this issue are set to the given values."
141+
}
142+
}
143+
}
144+
]
88145
}
89146
},
90147
"platform_issues": {

tools/kbcheck/src/entry.rs

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pub struct Solutions {
3434
#[serde(deny_unknown_fields)]
3535
pub struct References {
3636
#[serde(default)]
37-
pub breakage: Vec<Url>,
37+
pub breakage: Vec<BreakageItem>,
3838
#[serde(default)]
3939
pub platform_issues: Vec<Url>,
4040
#[serde(default)]
@@ -47,6 +47,75 @@ pub struct References {
4747
pub standards_discussions: Vec<Url>,
4848
}
4949

50+
#[derive(Debug, Serialize, Deserialize)]
51+
#[serde(untagged)]
52+
pub enum BreakageItem {
53+
Url(Url),
54+
Breakage(Breakage),
55+
}
56+
57+
impl BreakageItem {
58+
pub fn url(&self) -> &Url {
59+
match self {
60+
BreakageItem::Url(url) => url,
61+
BreakageItem::Breakage(item) => &item.url,
62+
}
63+
}
64+
}
65+
66+
#[derive(Debug, Serialize, Deserialize)]
67+
#[serde(deny_unknown_fields)]
68+
pub struct Breakage {
69+
url: Url,
70+
site: Url,
71+
platform: Vec<Platform>,
72+
#[serde(default)]
73+
last_reproduced: Option<String>, // Date
74+
#[serde(default)]
75+
intervention: Option<Url>,
76+
impact: Impact,
77+
affects_users: AffectsUsers,
78+
resolution: Option<BreakageResolution>,
79+
#[serde(default)]
80+
notes: String,
81+
}
82+
83+
#[derive(Debug, PartialEq, Serialize, Deserialize)]
84+
#[serde(rename_all = "lowercase")]
85+
pub enum Platform {
86+
All,
87+
Desktop,
88+
Mobile,
89+
Windows,
90+
Macos,
91+
Linux,
92+
}
93+
94+
#[derive(Debug, PartialEq, Serialize, Deserialize)]
95+
#[serde(rename_all = "snake_case")]
96+
pub enum Impact {
97+
SiteBroken,
98+
FeatureBroken,
99+
SignificantVisual,
100+
MinorVisual,
101+
UnsupportedMessage,
102+
}
103+
104+
#[derive(Debug, PartialEq, Serialize, Deserialize)]
105+
#[serde(rename_all = "lowercase")]
106+
pub enum AffectsUsers {
107+
All,
108+
Some,
109+
Few,
110+
}
111+
112+
#[derive(Debug, PartialEq, Serialize, Deserialize)]
113+
#[serde(rename_all = "snake_case")]
114+
pub enum BreakageResolution {
115+
SiteChanged,
116+
SiteFixed,
117+
}
118+
50119
#[derive(Debug, Serialize, Deserialize)]
51120
#[serde(deny_unknown_fields)]
52121
pub struct Entry {

tools/kbcheck/src/updates.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,13 @@ fn check_missing_breakage(
8282
bugs_data: &BTreeMap<u64, bugzilla::Bug>,
8383
updates: &mut Vec<Update>,
8484
) {
85-
let entry_breakage =
86-
BTreeSet::from_iter(entry.references.breakage.iter().filter_map(webcompat_id));
85+
let entry_breakage = BTreeSet::from_iter(
86+
entry
87+
.references
88+
.breakage
89+
.iter()
90+
.filter_map(|item| webcompat_id(item.url())),
91+
);
8792
let mut bugs_see_also = BTreeSet::new();
8893
for bug_data in bugs_data.values() {
8994
bugs_see_also.extend(

0 commit comments

Comments
 (0)