Bug 313182
| Summary: | git-webkit create-bug --see-also causes cc_radar() to prompt about overwriting the wrong bug | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | David Kilzer (:ddkilzer) <ddkilzer> |
| Component: | Tools / Tests | Assignee: | David Kilzer (:ddkilzer) <ddkilzer> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: |
https://bugs.webkit.org/show_bug.cgi?id=312722 https://bugs.webkit.org/show_bug.cgi?id=309535 |
||
David Kilzer (:ddkilzer)
When `git-webkit create-bug` is invoked with both `--see-also` (pointing to other Bugzilla bugs) and `--radar` (pointing to an existing radar), `cc_radar()` incorrectly prompts "Would you like to overwrite <see-also-bug> with <radar>?" -- targeting a see-also bug instead of the newly created bug.
This happens when the radar importer is already CC'd on the bug (e.g., auto-CC on Security product bugs). `cc_radar()` checks `issue.references[0]` to find an already-tracked radar, but `issue.references` is a mixed list containing both radar references (from `<rdar://problem/N>` comments) and Bugzilla references (from see-also links). A see-also Bugzilla link in `references[0]` is mistaken for a tracked radar.
Steps to reproduce:
1. Run `git-webkit create-bug` with `--radar rdar://NNNNNNNNN` and multiple `--see-also https://bugs.webkit.org/show_bug.cgi?id=NNNNNN` arguments on a Security product bug.
2. The Security product auto-CCs the radar importer.
3. `_post_create_operations()` adds the see-also links before calling `cc_radar()`.
4. `cc_radar()` accesses `issue.references`, which now includes the see-also Bugzilla bugs.
5. `cc_radar()` picks `references[0]` (a see-also Bugzilla bug) and prompts to overwrite it with the radar.
Expected:
`cc_radar()` posts the `<rdar://problem/N>` comment on the newly created bug without prompting.
Actual:
`cc_radar()` prompts "Would you like to overwrite <see-also-bug-URL> with <radar-URL>?" and fails with "EOF when reading a line" in non-interactive contexts.
The `_see_also()` mock endpoint also has a fidelity gap: it does not include `related_links` (see-also URLs added via `tracker.set()`) in its response, unlike the full bug response endpoint. This prevents tests from exercising the see-also + cc_radar interaction.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/175465077>
David Kilzer (:ddkilzer)
Pull request: https://github.com/WebKit/WebKit/pull/63481
EWS
Committed 312172@main (00845d94ab4d): <https://commits.webkit.org/312172@main>
Reviewed commits have been landed. Closing PR #63481 and removing active labels.