stacks

command
v0.0.0-...-68c7731 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Overview

The stacks command finds all gopls stack traces reported by telemetry in the past 7 days, and reports their associated GitHub issue, creating new issues as needed.

The association of stacks with GitHub issues (labelled gopls/telemetry-wins) is represented in two different ways by the body (first comment) of the issue:

  1. Each distinct stack is identified by an ID, 6-digit base64 string such as "TwtkSg". If a stack's ID appears anywhere within the issue body, the stack is associated with the issue.

    Some problems are highly deterministic, resulting in many field reports of the exact same stack. For such problems, a single ID in the issue body suffices to record the association. But most problems are exhibited in a variety of ways, leading to multiple field reports of similar but distinct stacks.

  2. Each GitHub issue body may start with a code block of this form:

    ``` #!stacks "runtime.sigpanic" && "golang.hover:+170" ```

    The first line indicates the purpose of the block; the remainder is a predicate that matches stacks. It is an expression defined by this grammar:

    > expr = "string literal" > | ( expr ) > | ! expr > | expr && expr > | expr || expr

    Each string literal implies a substring match on the stack; the other productions are boolean operations.

    The stacks command gathers all such predicates out of the labelled issues and evaluates each one against each new stack. If the predicate for an issue matches, the issue is considered to have "claimed" the stack: the stack command appends a comment containing the new (variant) stack to the issue, and appends the stack's ID to the last line of the issue body.

    It is an error if two issues' predicates attempt to claim the same stack.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL