[WIP] Keeping Git branches in sync with job-server workspaces

Ouverte
#1,507 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
25/100
Type d'issue
Documentation
Clarté
À clarifier
Activité
À l'abandon
Stack technique
git, github
Domaine
documentation

Piste de recherche

Commencez par le workflow et l’échange avec le support technique lié dans cet issue, puis examinez la documentation couvrant les branches Git, les workspaces du job-server et les workflows des chercheurs. Déterminez si les branches et les workspaces doivent rester synchronisés et documentez les recommandations pour les cas de workspace primaire et secondaire. Le travail est terminé lorsque les recommandations qui en résultent expliquent ce que les chercheurs doivent faire après qu’une analyse révisée a été demandée.

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

Description

In the Bristol-Cambridge-Oxford meeting on May 2, 2024 @venexia asked a question about keeping Git branches in sync with job-server workspaces. The question was prompted by an exchange with tech support.^1

We should recognize that it may not be desirable to keep Git branches in sync with job-server workspaces. Nevertheless, this issue captures the question and the exchange with tech support. Ultimately, the intention is to improve the documentation, by making recommendations to researchers.

In the following workflow, the primary branch is GitHub's default branch. It is often called main. The terms primary branch, primary workspace, secondary branch, and secondary workspace have no meaning beyond this issue. HEAD is Git-speak for "the current branch's latest commit".

  • Researcher creates repo from opensafely/research-template
  • Researcher commits to primary branch
  • Researcher creates primary workspace associated with primary branch
  • Researcher runs jobs in primary workspace
  • Primary workspace directories are created on L3 and L4 filesystems
  • Files are written to primary workspace directories
  • Researcher writes paper based on primary branch HEAD and files in primary workspace directories
  • Researcher submits paper 🎉

At this point, the paper is based on primary branch HEAD and files in primary workspace directories.

The paper is reviewed; further analysis is requested, which necessitates modifications to the dataset definition. The researcher doesn't want to overwrite files in primary workspace directories, because modifications to the dataset definition could result in a different dataset. 🙁

  • Researcher branches from primary branch, giving secondary branch
  • Researcher commits to secondary branch
  • Researcher creates secondary workspace associated with secondary branch
  • Researcher runs jobs in secondary workspace
  • Secondary workspace directories are created on L3 and L4 filesystems
  • Files are written to secondary workspace directories
  • Researcher updates paper based on secondary branch HEAD and files in secondary workspace directories
  • Researcher merges secondary branch into primary branch
  • Secondary branch is deleted (by researcher, by GitHub, etc.)
  • Researcher submits paper 🎉

At this point, the paper is based on primary branch HEAD and files in secondary workspace directories.

The paper is reviewed; further analysis is requested 🙁

  • Should the researcher commit to primary branch? Files in primary workspace directories are behind files in secondary workspace directories. The researcher would need to run jobs in primary workspace.

  • Should the researcher branch from primary branch, giving new secondary branch with same name as old secondary branch, and commit to new secondary branch? The researcher would not need to run jobs in secondary workspace.

Langage dominant
Python
Étoiles
48
Forks
10
Merge moyen
1 j 12 h
PR mergées (30 j)
11

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 opensafely/documentation

Toutes les issues de opensafely/documentation

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.