Skip to content

Conversation

@alik-6
Copy link
Contributor

@alik-6 alik-6 commented Jun 3, 2025

Description

  • Added DEVCONTAINER arg/env in Dockerfile to enable conditional zsh install
  • Updated devcontainer.json to set build target to "dev" and pass DEVCONTAINER=1
  • Removed "remoteUser": "appuser" to prevent container crash
  • Replaced old GitHub CLI feature key with updated version
  • Added VS Code extension recommendations for Python, Prisma, Ruff, etc.
  • Removed deprecated pre-commit feature.

Guidelines

  • My code follows the style guidelines of this project (formatted with Ruff)

  • I have performed a self-review of my own code

  • I have commented my code, particularly in hard-to-understand areas

  • I have made corresponding changes to the documentation if needed

  • My changes generate no new warnings

  • I have tested this change

  • Any dependent changes have been merged and published in downstream modules

  • I have added all appropriate labels to this PR

  • [ x ] I have followed all of these guidelines.

How Has This Been Tested? (if applicable)

N/A

Screenshots (if applicable)

N/A

Additional Information

N/A

…ainer config

- Added DEVCONTAINER arg/env in Dockerfile to enable conditional zsh install
- Updated devcontainer.json to set build target to "dev" and pass DEVCONTAINER=1
- Removed "remoteUser": "appuser" to prevent container crash
- Replaced old GitHub CLI feature key with updated version
- Added VS Code extension recommendations for Python, Prisma, Ruff, etc.
- Removed deprecated pre-commit feature
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jun 3, 2025

Reviewer's Guide

This PR fixes and enhances the devcontainer setup by adding conditional zsh support in the Dockerfile and updating the devcontainer.json configuration to prevent crashes, update tooling, and refresh recommended extensions.

Flow Diagram: Conditional Zsh Installation Logic in Dockerfile

graph TD
    Start[Start of Dockerfile 'dev' stage script with DEVCONTAINER arg] --> CheckArg{Check value of $DEVCONTAINER};
    CheckArg -- "$DEVCONTAINER = 1" --> InstallZsh["RUN apt-get update && \napt-get install -y zsh && \nchsh -s /usr/bin/zsh && \napt-get clean && rm -rf /var/lib/apt/lists/*"];
    CheckArg -- "$DEVCONTAINER != 1" --> SkipZsh["echo 'Not building for devcontainer, skipping devcontainer dependencies installation'"];
    InstallZsh --> NextStep[Continue with subsequent Dockerfile commands];
    SkipZsh --> NextStep;
    NextStep --> End[End of script / Docker image layer built];
Loading

File-Level Changes

Change Details Files
Enable conditional zsh installation in devcontainer Dockerfile
  • Added DEVCONTAINER build arg and ENV
  • Added conditional RUN block to install zsh when DEVCONTAINER=1
  • Cleaned up apt cache after installation
Dockerfile
Refresh devcontainer.json configuration
  • Set build target to "dev" and pass DEVCONTAINER=1
  • Removed "remoteUser" to prevent container crash
  • Replaced GitHub CLI feature key with updated version
  • Added VS Code extension recommendations
  • Removed deprecated pre-commit feature
.devcontainer/devcontainer.json

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

@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 @alik-6 - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 3 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: 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.

trailing comma in devcontainer.json...
@pawbtism
Copy link
Contributor

pawbtism commented Jun 4, 2025

LGTM, tested and works

@kzndotsh kzndotsh self-assigned this Jun 5, 2025
@kzndotsh kzndotsh merged commit de87941 into allthingslinux:main Jun 5, 2025
1 check passed
@alik-6 alik-6 deleted the fix/devcontainer-workflow branch June 5, 2025 13:02
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.

3 participants