Skip to content

Deck PR status page shows stale contexts for renamed or removed presubmit jobs. #824

Description

@Champbreed

Deck's PR status page can show a context for a presubmit job that no longer exists, for example after the job was renamed or removed from the repo's config. GitHub still reports the old status against the commit, and since there's no matching ProwJob for it anymore, it stays visible indefinitely in the PR status list.

Contexts belonging to jobs that no longer exist should eventually stop showing up on the PR status page, instead of persisting forever.

How to reproduce:

  1. Have a presubmit job run and report a status on a PR.
  2. Rename or remove that job from the repo's Prow config.
  3. Push a new commit to the same PR, or open a new PR against the same repo/branch.
  4. Open the PR's Deck status page. The old job's status is still listed, with no current ProwJob backing it.

The root cause is in getFullPRContext in cmd/deck/static/pr/pr.ts. It builds its list of unified contexts by putting every GitHub-reported status context into a map first, then merging in current ProwJob data on top. Nothing in that flow ever removes an entry, so a context with no corresponding current ProwJob just stays in the map and gets rendered.

This is related to kubernetes/test-infra#36399, but that issue is actually describing a different, though related, problem: stale results in the prow bot's PR comment, which is a separate reporting path from this one. Opening this issue to track the Deck-specific problem accurately.

cc @BenTheElder @petr-muller

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/deckIssues or PRs related to prow's deck componentarea/status-reconcilerIssues or PRs related to reconciling status when jobs change

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions