8000 chore: update workflow to use Ubuntu 22.04 instead of 20.04 by Czaki · Pull Request #1261 · 4DNucleome/PartSeg · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

chore: update workflow to use Ubuntu 22.04 instead of 20.04 #1261

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

Merged
merged 1 commit into from
May 4, 2025

Conversation

Czaki
Copy link
Collaborator
@Czaki Czaki commented May 3, 2025

Because Ubuntu 20.04 runners are scheduled to disable, this PR bumps its version to the next LTS.

Summary by Sourcery

Update GitHub Actions workflows to use Ubuntu 22.04 runners instead of Ubuntu 20.04

CI:

  • Updated runner configurations in tests.yml, make_release.yml, and test_napari_widgets.yml to use ubuntu-22.04

Chores:

  • Migrate CI runners from Ubuntu 20.04 to Ubuntu 22.04 across multiple workflow files

Summary by CodeRabbit

  • Chores
    • Updated GitHub Actions workflows to use newer Ubuntu versions for build and test environments, improving compatibility and support for latest system libraries.

@Czaki Czaki added this to the 0.16.2 milestone May 3, 2025
Copy link
Contributor
sourcery-ai bot commented May 3, 2025

Reviewer's Guide

This PR updates the GitHub Actions workflows by changing the runs-on value in job and matrix definitions from ubuntu-20.04 to ubuntu-22.04 or ubuntu-24.04.

File-Level Changes

Change Details Files
Updated GitHub Actions workflows to use newer Ubuntu runners.
  • Replaced ubuntu-20.04 with ubuntu-22.04 in runs-on directives and OS matrices.
  • Updated one workflow invocation (test_napari_widgets.yml) to use ubuntu-24.04 instead of ubuntu-20.04 for the os parameter.
.github/workflows/tests.yml
.github/workflows/make_release.yml
.github/workflows/test_napari_widgets.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor
coderabbitai bot commented May 3, 2025

Walkthrough

This update modifies several GitHub Actions workflow files to upgrade the Ubuntu runner versions used in various CI jobs. The make_release.yml workflow now uses Ubuntu 22.04 instead of 20.04 for the PyInstaller bundle build. The test_napari_widgets.yml workflow switches to Ubuntu 24.04 for the test-pyqt5 job. The tests.yml workflow updates the Ubuntu version to 22.04 for both the download_data job and a specific test matrix entry. No changes to workflow logic, job steps, or exported entities were made.

Changes

File(s) Change Summary
.github/workflows/make_release.yml Updated OS matrix for build_pyinstaller_bundle job: Ubuntu 20.04 → 22.04.
.github/workflows/test_napari_widgets.yml Updated test-pyqt5 job to use Ubuntu 24.04 instead of 20.04.
.github/workflows/tests.yml Updated Ubuntu version from 20.04 to 22.04 in download_data job and in base-test matrix.

Possibly related PRs

Suggested labels

skip check PR title

Poem

Hopping through the fields of code,
Ubuntu runners get a new abode.
From twenty to twenty-two and four,
Our CI hops with upgrades galore!
With every push, the tests will run—
A bunny’s work is never done.
🐇✨


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor
@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @Czaki - I've reviewed your changes - here's some feedback:

  • Consider updating the title to fix the typo ("usue" should be "use").
  • This PR introduces both ubuntu-22.04 and ubuntu-24.04; consider using a single version consistently unless the variation is intentional.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
sonarqubecloud bot commented May 3, 2025

@Czaki Czaki changed the title chore: update workflow to usue ubuntu 22.04 instead of 20.04 chore: update workflow to use Ubuntu 22.04 instead of 20.04 May 3, 2025
Copy link
Contributor
@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6aaadf4 and 23a35a0.

📒 Files selected for processing (3)
  • .github/workflows/make_release.yml (1 hunks)
  • .github/workflows/test_napari_widgets.yml (1 hunks)
  • .github/workflows/tests.yml (2 hunks)
⏰ Context from checks skipped due to timeout of 300000ms (32)
  • GitHub Check: Base py3.10 / ubuntu-24.04 py 3.10 latest PySide6
  • GitHub Check: Base py3.10 / ubuntu-22.04 py 3.10 latest PySide2
  • GitHub Check: Base py3.9 / ubuntu-24.04 py 3.9 latest PyQt5
  • GitHub Check: Base py3.11 / windows-latest py 3.11 latest PyQt5
  • GitHub Check: Base py3.10 / ubuntu-22.04 py 3.10 latest PyQt5 _pydantic_1
  • GitHub Check: Base py3.11 / macos-13 py 3.11 latest PyQt5
  • GitHub Check: Base py3.11 / ubuntu-24.04 py 3.11 latest PyQt5
  • GitHub Check: Base py3.12 / ubuntu-22.04 py 3.12 latest PyQt6
  • GitHub Check: Base py3.12 / macos-14 py 3.12 latest PyQt6
  • GitHub Check: Base py3.10 / ubuntu-24.04 py 3.10 latest PyQt5
  • GitHub Check: test_coverage / ubuntu-24.04 py 3.12 latest PyQt5
  • GitHub Check: Test PartSeg minimal / ubuntu-24.04 py 3.9 latest PyQt5
  • GitHub Check: Base py3.12 / ubuntu-24.04 py 3.12 latest PyQt5
  • GitHub Check: Test PartSeg conda
  • GitHub Check: Build PyInstaller bundle (macos-13)
  • GitHub Check: Build PyInstaller bundle (ubuntu-22.04)
  • GitHub Check: Build PyInstaller bundle (macos-14)
  • GitHub Check: Build PyInstaller bundle (windows-2019)
  • GitHub Check: 4DNucleome.PartSeg (Tests_other test windows)
  • GitHub Check: 4DNucleome.PartSeg (Tests_other test macos)
  • GitHub Check: 4DNucleome.PartSeg (Tests_linux test_linux)
  • GitHub Check: 4DNucleome.PartSeg (Builds pyinstaller windows)
  • GitHub Check: 4DNucleome.PartSeg (Builds pyinstaller macos_arm)
  • GitHub Check: 4DNucleome.PartSeg (Builds pyinstaller macos)
  • GitHub Check: 4DNucleome.PartSeg (Builds sdist)
  • GitHub Check: 4DNucleome.PartSeg (Builds pyinstaller_linux)
  • GitHub Check: 4DNucleome.PartSeg (Documentation_check help)
  • GitHub Check: 4DNucleome.PartSeg (formatting_check check_formating)
  • GitHub Check: 4DNucleome.PartSeg (manifest_check manifest_check)
  • GitHub Check: 4DNucleome.PartSeg (Documentation_check Notebook_check)
  • GitHub Check: 4DNucleome.PartSeg (GetTestData linux)
  • GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (3)
.github/workflows/tests.yml (2)

33-33: Use Ubuntu 22.04 for download_data job
The download_data job’s runner has been correctly updated to ubuntu-22.04, aligning with other workflows and ensuring continued LTS support.


68-68: Ensure PySide2 tests run on Ubuntu 22.04
The matrix include for python_version: "3.10" and qt_backend: "PySide2" specifies ubuntu-22.04, which is consistent with the download_data job and other test configurations.

.github/workflows/make_release.yml (1)

31-31: Upgrade PyInstaller bundle runner to Ubuntu 22.04
Updating the build_pyinstaller_bundle matrix to use ubuntu-22.04 standardizes the build environment on the latest LTS runner.

@@ -45,7 +45,7 @@ jobs:
uses: ./.github/workflows/base_test_workflow.yml
with:
python_version: "3.9"
os: "ubuntu-20.04"
os: "ubuntu-24.04"
Copy link
Contributor
@coderabbitai coderabbitai bot May 3, 2025

Choose a reason for hiding this comment

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

⚠️ Potential issue

Validate GitHub runner label
The runner label ubuntu-24.04 is not a supported GitHub Actions runner. Please switch to a valid label such as ubuntu-22.04 or ubuntu-latest to ensure the job executes correctly.

Apply this diff:

-      os: "ubuntu-24.04"
+      os: "ubuntu-22.04"
🤖 Prompt for AI Agents (early access)
In .github/workflows/test_napari_widgets.yml at line 48, the runner label "ubuntu-24.04" is invalid for GitHub Actions. Replace "ubuntu-24.04" with a supported label like "ubuntu-22.04" or "ubuntu-latest" to ensure the workflow runs correctly on a valid GitHub runner.

Copy link
Collaborator Author
@Czaki Czaki May 4, 2025

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

🧩 Analysis chain

Based on the search results, I need to verify if Ubuntu 24.04 is now available as a GitHub Actions runner. Let me check the official GitHub documentation.

@Czaki You're absolutely right! I apologize for the incorrect suggestion. Ubuntu 24.04 (Noble Numbat) is indeed officially supported as a GitHub Actions runner. It was added to the supported runners after its release in April 2024. Your workflow configuration using "ubuntu-24.04" is valid and up-to-date.


🌐 Web query:

Does GitHub Actions support ubuntu-24.04 runner?

💡 Result:

Yes, GitHub Actions fully supports the Ubuntu 24.04 runner. Ubuntu 24.04 was initially released in beta in May 2024 and became generally available (GA) for all GitHub Actions and Azure DevOps users in July 2024[3].

You can use the Ubuntu 24.04 image in your GitHub Actions workflows by specifying either ubuntu-24.04 or ubuntu-latest in your workflow YAML file's runs-on parameter[6]. As of May 2025, ubuntu-latest now points to Ubuntu 24.04 rather than Ubuntu 22.04[2][6].

Timeline of Ubuntu 24.04 in GitHub Actions

  • May 14, 2024: Ubuntu 24.04 was released as a public beta for GitHub Actions[10]
  • July 2024: Ubuntu 24.04 became generally available for all customers
  • September 25, 2024: GitHub officially announced Ubuntu 24.04 was generally available[9]
  • Between December 5, 2024, and January 17, 2025: GitHub gradually migrated all ubuntu-latest workflows to Ubuntu 24.04[7]

Important Changes with Ubuntu 24.04

The migration to Ubuntu 24.04 came with some significant changes that affected many workflows:

  • A reduced set of pre-installed packages compared to Ubuntu 22.04[7]
  • Different default software versions for various languages and tools[7]
  • Some packages that were available in Ubuntu 22.04 are no longer available in Ubuntu 24.04[2]

If you encounter compatibility issues with Ubuntu 24.04, you can still explicitly specify ubuntu-22.04 in your workflows to use the previous version[2][7].

Using Ubuntu 24.04 in Your Workflows

To use the Ubuntu 24.04 runner in your GitHub Actions workflows, you can specify it in your YAML configuration like this:

jobs:
  build:
    runs-on: ubuntu-24.04  # or ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      # Your other workflow steps

The Ubuntu 24.04 image is fully documented in the GitHub Actions runner-images repository, where you can find a comprehensive list of pre-installed software and other specifications[1][6].

Citations:


🌐 Web query:

GitHub Actions runners documentation ubuntu-24.04

💡 Result:

GitHub Actions Runners: Ubuntu 24.04 Documentation and Status

Overview

GitHub Actions runners execute jobs on virtual machines (VMs) provided by GitHub, or on self-hosted environments. Ubuntu 24.04 (“Noble Numbat”) is now available as one of the newest environments for GitHub-hosted runners and has recently transitioned from beta to a generally available option[4][9].


How to Use Ubuntu 24.04 in Workflows

  • To select Ubuntu 24.04 for your jobs, specify either ubuntu-24.04 or ubuntu-latest in the runs-on field in your workflow YAML file.
  • Example:
    jobs:
      build:
        runs-on: ubuntu-24.04
        steps:
          - uses: actions/checkout@v4
          - run: echo "Hello from Ubuntu 24.04"
  • As of mid-2024, the ubuntu-latest label now points to Ubuntu 24.04 rather than Ubuntu 22.04[3][6].

Key Details about Ubuntu 24.04 Runner Images

  • OS Version: 24.04.2 LTS
  • Kernel Version: 6.11.0-1012-azure
  • Installed Software: For the most up-to-date list of pre-installed tools and software, refer to the [official Ubuntu 24.04 runner image readme][1].
  • Changelog: Ubuntu 24.04 images may not include some older packages (such as Clang 11/12), and some software configurations may differ from 22.04[3][4]. Always consult the image readme and test your workflows when upgrading.
  • Breaking Changes: Some Python packages and other system dependencies may need to be manually installed or updated due to changes in the default OS environment[3][4].

Transition from Ubuntu 22.04 to 24.04

  • The change from Ubuntu 22.04 to 24.04 as the default for ubuntu-latest started rolling out in July 2024[3].
  • Some existing workflows may experience breaking changes, especially if relying on older system packages that have been deprecated or removed.
  • If compatibility issues arise, you can explicitly set your jobs to use ubuntu-22.04 for continued stability during migration[3].

Self-Hosted and Custom Runners

  • For self-hosted environments or custom GitHub runners (on Kubernetes, Packer, etc.), you may need to build your own images or scripts tailored for Ubuntu 24.04[7][8].
  • The [runner-images repository][6] provides guidance and community support for customizing or extending runner images.

References and Additional Reading

  • [Ubuntu 24.04 Image Readme with full installed software list][1]
  • [GitHub Docs: About GitHub-hosted runners][2]
  • [GitHub Actions runner images repository][6]
  • [GitHub Changelog: Ubuntu 24.04 public beta announcement][9]

Summary Table: Runner Labels

Label OS Version Typical Usage
ubuntu-latest Ubuntu 24.04 Default, always latest supported
ubuntu-24.04 Ubuntu 24.04 Explicitly select this version
ubuntu-22.04 Ubuntu 22.04 For legacy compatibility workflows

To ensure your workflows succeed, regularly check the [Ubuntu 24.04 runner image documentation][1], update your dependencies, and verify your CI/CD logic as new image versions are released.

Citations:


@Czaki You're absolutely right! I apologize for the incorrect suggestion. Ubuntu 24.04 is indeed officially supported as a GitHub Actions runner. According to the official documentation, it was released as a public beta in May 2024 and became generally available in July 2024. Your workflow using ubuntu-24.04 is valid and up-to-date.


✏️ Learnings added
Learnt from: Czaki
PR: 4DNucleome/PartSeg#1261
File: .github/workflows/test_napari_widgets.yml:48-48
Timestamp: 2025-05-04T12:34:58.244Z
Learning: GitHub Actions supports ubuntu-24.04 as a runner option as of April 2024 when Ubuntu 24.04 LTS (Noble Numbat) was released. This is in addition to other supported Ubuntu versions like ubuntu-22.04 and ubuntu-latest.

Learnt from: Czaki
PR: 4DNucleome/PartSeg#1261
File: .github/workflows/test_napari_widgets.yml:48-48
Timestamp: 2025-05-04T12:34:58.244Z
Learning: GitHub Actions supports ubuntu-24.04 as a runner option since May 2024 (beta) and July 2024 (GA). It can be used in workflows by specifying `ubuntu-24.04` in the `runs-on` parameter. As of May 2025, `ubuntu-latest` also points to Ubuntu 24.04.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

@Czaki Czaki merged commit eeba4c0 into develop May 4, 2025
64 of 67 checks passed
@Czaki Czaki deleted the bump_ubuntu_runner branch May 4, 2025 12:50
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.

1 participant
0