Skip to content

Issues/3466 Move away from Gitpod #3569

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

Open
wants to merge 134 commits into
base: dev
Choose a base branch
from

Conversation

JulianFlesch
Copy link
Contributor

@JulianFlesch JulianFlesch commented May 14, 2025

Description

Addresses the suggestions in issue 3466 to move away from gitpod and towards devcontainer for Github codespaces.

PR checklist

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

@JulianFlesch JulianFlesch changed the title [DRAFT] Issues/3466 gitpod [DRAFT] Issues/3466 Move away from Gitpod May 14, 2025
@JulianFlesch
Copy link
Contributor Author

Note: This still uses (a newer) gitpod base image and thus also the gitpod user.

@JulianFlesch JulianFlesch marked this pull request as ready for review May 20, 2025 10:13
@JulianFlesch JulianFlesch changed the title [DRAFT] Issues/3466 Move away from Gitpod Issues/3466 Move away from Gitpod May 20, 2025
Copy link

codecov bot commented May 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.48%. Comparing base (75d8c83) to head (c5dd2d2).
Report is 15 commits behind head on dev.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JulianFlesch
Copy link
Contributor Author

JulianFlesch commented Jul 22, 2025

Ready for review, if you have the time @mashehu @mahesh-panchal ! 🎉

Summary of latest changes:

  • A way to retry builds for the nf-Core/tools container was added due to nf-test installer download sometimes failing (issue)
  • Installation of nf-test in the devcontainer image was changed to conda, since conda is needed anyway (commit)
  • All images are now build for linux/amd64 and linux/arm64 architectures (this requires QEMU and buildx)
  • Most requirements are installed via (local) features now, with the exception of nf-core tools because it requires the current state of the repo
  • There are thus two devcontainer configs: everything in .devcontainer/build-devcontainer is for building an image with a specific version of tools and all features installed. The config ./devcontainer/devcontainer.json is used to run it in vscode / codespaces.

Failing Test

To make the failing test work, I assume something in template_features.yml needs to be changed?

@JulianFlesch JulianFlesch marked this pull request as ready for review July 22, 2025 15:39
Copy link
Contributor

@mashehu mashehu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need to these files to the files_changed lint tests. And remove the gitpod.yml file

# copy this repo at current revision
COPY . /root/nfcore-tools/

# install python 3.11, local nf-core tools version, and precommit hooks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why python 3.11 specifically? The minimal version is 3.9 currently.


"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
"version": "latest"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pin this to a specific version please. Renovate will help us update it.

},

// Add the IDs of extensions you want installed when the container is created.
"extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add ruff here as well.

nextflow self-update

# Update welcome message
echo "Welcome to the nf-core/tools devcontainer!" > /usr/local/etc/vscode-dev-containers/first-run-notice.txt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
echo "Welcome to the nf-core/tools devcontainer!" > /usr/local/etc/vscode-dev-containers/first-run-notice.txt
echo "Welcome to the nf-core devcontainer!" > /usr/local/etc/vscode-dev-containers/first-run-notice.txt

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we symlink files that are the same? So we save the hassle of keeping everything in sync?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reducing redundancy sounds good, but I would rather not have symlinks in the template, to make things more simple. If we add them, let's remember to use followlinks?True in Jinja2.

#!/usr/bin/env bash

# Update welcome message
echo "Welcome to the nf-core pipeline devcontainer!" > /usr/local/etc/vscode-dev-containers/first-run-notice.txt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use jinja variables to customize the welcome message to the current pipeline.

@mirpedrol
Copy link
Member

The new template file .devcontainer/setup.sh should be skipped by a template feature. We should remove the current gitpod feature and update the codespaces feature to add the new file, in nf_core/pipelines/create/template_features.yml

"version": "21.0.6-ms"
},
"ghcr.io/rocker-org/devcontainer-features/miniforge:2": {
"version": "latest"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the version should also be pinned here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reducing redundancy sounds good, but I would rather not have symlinks in the template, to make things more simple. If we add them, let's remember to use followlinks?True in Jinja2.

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.

7 participants