Share one loaded editor across the read-only VS Code e2e tests

Ouverte
#6,147 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 4 jours

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
45/100
Type d'issue
Refactorisation
Clarté
Plutôt claire
Activité
Active
Stack technique
typescript, vscode
Domaine
testing-qa

Piste de recherche

Start with find_references.spec.ts and the openServerPage helper it calls, then check how go_to_definition.spec.ts, hints.spec.ts, completions.spec.ts and the default lineage test copy examples/sushi and open pages. Share one copied sushi directory and one loaded page across the read-only tests, resetting the references panel and cursor between them, while tests that write files or stop the server keep their own. Done when those read-only files open the editor once, the mutating tests still get a fresh page, and find_references.spec.ts runs noticeably faster.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Improvement Project: VSCode Extension Tech Debt

Why this exists

find_references.spec.ts runs 13 tests serially in one Playwright worker, and each test copies examples/sushi and calls openServerPage. That call loads a new browser page, which reloads the VS Code workbench and starts a new sqlmesh_lsp before the test clicks around a model.

None of those tests write a file, and go-to-definition, hints, completions, and the default lineage test do the same read of sushi.

The code-server process is already shared per worker, while the workbench and the loaded SQLMesh context are not. Sharing the temp directory only saves the sushi copy, which is a few seconds. Sharing the page removes 12 reloads of 21–39 seconds each, about five minutes off that file, and the CI job will get shorter by that amount when this file is the one the other workers are waiting on.

This is separate from the virtualenv work in #6098, because these tests already use the repo .venv.

What to change

Copy sushi once and open it once in find_references.spec.ts, go_to_definition.spec.ts, hints.spec.ts, completions.spec.ts, and the default lineage test. Tests that write files, stop the server, or assert on their own virtualenv should keep a fresh directory and a fresh page, and a shared page needs its references panel and cursor reset between tests.

Done when

  • Those read-only files load the editor once, the mutating tests still get their own page, and find_references.spec.ts passes several minutes faster.
Langage dominant
Python
Étoiles
3.3k
Forks
471
Merge moyen
6 j 7 h
PR mergées (30 j)
35

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de SQLMesh/sqlmesh

Toutes les issues de SQLMesh/sqlmesh

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.