Skip to content

[Bug]: Azure DevOps pull request links with %28 / %29 in the repository name never match their project #36928

Closed

Description

@Tabonx

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Add an Azure DevOps project whose repository name contains parentheses, cloned over SSH: [email protected]:v3/example/Sample%20(Beta)/Sample%20(Beta).
  2. Link a thread to one of its pull requests with the URL escaped the way some tools write it: https://dev.azure.com/example/Sample%20%28Beta%29/_git/Sample%20%28Beta%29/pullrequest/7.
  3. Leave the app running and watch ~/.t3/userdata/logs/server.trace.ndjson.

Expected behavior

The link belongs to the project, and the pull request syncs like links written Sample%20(Beta).

Actual behavior

The link never matches its project. PullRequestService.canonicalRef fails with PullRequestUnavailableError ("Change requests cannot be browsed for this project's host yet."), and PullRequestSyncReactor.syncGroup retries it about once a minute. With two such links, my trace logged 5,000 failed spans in 9 hours.

Links to the same repository written Sample%20(Beta) work. Repository keys are compared as text, and the remote and the link escape the same name in two ways. #22782 fixed a related case, a space in the name, only where the name goes to az.

Impact

Minor bug or occasional failure

Version or commit

Desktop 0.1.9. Still on main @ ea05ea5 (that commit backs off the retries but the link still never resolves).

Environment

macOS, desktop app 0.1.9

Logs or stack traces

WARN pull request sync skipped
  key: <project-id>\u0000dev.azure.com/example/sample%20%28beta%29/_git/sample%20%28beta%29#7
  reason: Change requests cannot be browsed for this project's host yet.

Workaround

Unlink the pull request and link it again with a URL that leaves the parentheses unescaped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions