Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a first pass explanation of using GitHub Codespaces for OpenSAFELY projects #1268

Merged
merged 2 commits into from
Jul 13, 2023

Conversation

StevenMaude
Copy link
Contributor

@StevenMaude StevenMaude commented Jul 6, 2023

This adds a first pass explanation of using GitHub Codespaces with the research template.

It follows:

opensafely/research-template#102

which is now merged.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jul 6, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 119231c
Status: ✅  Deploy successful!
Preview URL: https://5226f4aa.opensafely-docs.pages.dev
Branch Preview URL: https://steve-github-codespaces-basi.opensafely-docs.pages.dev

View logs

@StevenMaude
Copy link
Contributor Author

StevenMaude commented Jul 11, 2023

TODO:

  • merge research template PR
  • work through steps and see if they work end-to-end
  • add screenshots
  • tidy commits

@StevenMaude StevenMaude force-pushed the steve/github-codespaces-basic-explanation branch from 811545e to 473501d Compare July 11, 2023 16:39
@StevenMaude StevenMaude force-pushed the steve/github-codespaces-basic-explanation branch from 473501d to 602c099 Compare July 11, 2023 17:01
StevenMaude added a commit to opensafely/research-template that referenced this pull request Jul 12, 2023
This reverts commit db11a50.

Most of this information is in:

opensafely/documentation#1268

although the information on local dev containers is not,
and may warrant adding somewhere in future.

So let's retain the commit history here, and perhaps add to the README
or OpenSAFELY documentation in future.
StevenMaude added a commit to opensafely/research-template that referenced this pull request Jul 12, 2023
This reverts commit db11a50.

Most of this information is in:

opensafely/documentation#1268

although the information on local dev containers is not,
and may warrant adding somewhere in future.

So let's retain the commit history here, and perhaps add to the README
or OpenSAFELY documentation in future.
@StevenMaude StevenMaude force-pushed the steve/github-codespaces-basic-explanation branch from 602c099 to df78559 Compare July 12, 2023 12:45
@StevenMaude StevenMaude force-pushed the steve/github-codespaces-basic-explanation branch from df78559 to 4c75535 Compare July 12, 2023 15:29
StevenMaude added a commit to opensafely/research-template that referenced this pull request Jul 12, 2023
This reverts commit db11a50.

Most of this information is in:

opensafely/documentation#1268

although the information on local dev containers is not,
and may warrant adding somewhere in future.

So let's retain the commit history here, and perhaps add to the README
or OpenSAFELY documentation in future.
@StevenMaude StevenMaude marked this pull request as ready for review July 12, 2023 18:21
@StevenMaude StevenMaude changed the title WIP: Add a basic explanation of GitHub Codespaces Add a basic explanation of GitHub Codespaces Jul 12, 2023
@StevenMaude
Copy link
Contributor Author

StevenMaude commented Jul 12, 2023

The commits need tidying here, and one of the images has a half-visible tool tip, which could be fixed.

@StevenMaude StevenMaude changed the title Add a basic explanation of GitHub Codespaces Add a first pass explanation of using GitHub Codespaces for OpenSAFELY projects Jul 12, 2023
@StevenMaude
Copy link
Contributor Author

@StevenMaude
Copy link
Contributor Author

I think ultimately this page is serving three current purposes, and would eventually split into:

  • the Getting Started page (but with some extra tidying/refinement)
  • a separate page on managing Codespaces and Codespaces billing
  • a separate page on the full set of features we provide in the Codespaces setup

It's fine as one self-contained page for now, until we work this out.

@StevenMaude
Copy link
Contributor Author

StevenMaude commented Jul 13, 2023

Things that aren't discussed in this documentation, or have been thought too much about. They could be considered more in future:

  • codespace prebuilds
    • These speed up the codespace deployment, but not sure how these would work inside an organization.
    • Not sure how these interact with template-created repositories either.
    • They cost money for an organization, because they use storage.
  • debugging issues with Codespaces
    • can users access Codespaces at all, or does IT policy prevent access?
    • GitHub still occasionally has big outages unfortunately, roughly 1-3 times per month; check GitHub's status page if Codespaces is unavailable or behaving strangely
  • more on configuring machines appropriately
    • how to spot out of memory errors
  • the "unpublished changes" warning when deleting a codespace
    • you can save these changes to a branch when deleting a codespace
  • hiding unhelpful ehrQL autocompletion suggestions of internal attributes/methods
  • keeping the installed ehrQL in sync with the ehrQL version you're using for your project
    • for now, I've not worried about this too much and it's a bit out of scope
    • the latest main version gets installed
    • we might solve it by having a v1, v2 branch, or publishing an ehrQL package to PyPI
    • not sure what the behaviour is on restarting the existing codespace;
      • it might reinstall packages as this is a post-container command, and needs checking
  • updating OpenSAFELY CLI
    • may not really need to do manually; you might be able to just stop and start the codespace?
  • use of Codespaces with a local Visual Studio Code installation
    • it removes the web browser, which again might help to remove quirks/bugs
    • you can install Visual Studio Code as a "user setup", without admin permissions, I think

@StevenMaude
Copy link
Contributor Author

We should update the "Downloading some dummy data" title in the ehrQL documentation, because there's no download involved, but will update that later.

This adds a first pass explanation of using GitHub Codespaces with the research template.

It follows:

opensafely/research-template#102

which is now merged.
To emphasise regions of interest.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants