Skip to content

Conversation

@wmlynik
Copy link

@wmlynik wmlynik commented Aug 18, 2025

Description

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (refactoring, style fixes, git/CI config, submodule management, no code logic changes)

How Has This Been Tested?

  • Already covered by automatic testing.
  • New test added: (add PR link here).
  • Tested by hand on: (list targets here).

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing linter checks and tests passed.
  • My changes generate no new compilation warnings for any of the targets.

Special treatment

  • This PR needs additional PRs to work (list the PRs, preferably in merge-order).
  • I will merge this PR by myself when appropriate.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @wmlynik, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on updating the Continuous Integration (CI) environment and aligning project dependencies with the v3.3.1 release. It involves updating Docker images used in GitHub Actions, streamlining Docker script configurations by removing a dedicated environment file, and updating numerous Git submodules to their latest v3.3.1-compatible commits.

Highlights

  • Updated CI Docker Images: The phoenix-build and phoenix-devel Docker images used in GitHub Actions have been updated to their v3.3.1 tagged versions.
  • Streamlined Docker Environment Handling: The .docker_env file has been removed, and environment variables are now passed directly to Docker commands in docker-build.sh and docker-devel.sh, simplifying configuration.
  • Submodule Version Alignment: Several core project submodules, including libphoenix, phoenix-rtos-build, phoenix-rtos-devices, phoenix-rtos-kernel, phoenix-rtos-lwip, phoenix-rtos-ports, phoenix-rtos-tests, and phoenix-rtos-usb, have been updated to new commit hashes, reflecting the v3.3.1 release state.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates CI configurations and submodules for version 3.3.1. Key changes include pinning Docker image versions in GitHub Actions for better reproducibility, and refactoring Docker helper scripts. The .docker_env file has been removed in favor of passing environment variables explicitly to docker run commands.

While the changes in docker-build.sh and the GitHub Actions appear correct, I've found a few issues in docker-devel.sh that need attention. Specifically, environment variables are no longer being passed to the development container, which is a significant change in behavior. There are also some minor issues with shell script best practices, such as unquoted variables and inconsistent use of exec. Please see my detailed comments.

Comment on lines 12 to 16
if [ "$#" -eq 0 ]; then
exec docker run -it --privileged --rm -h "$(hostname)-docker" --env-file .docker_env -v /dev/bus/usb/:/dev/bus/usb -v "${PATH_TO_PROJECT}:/project" -w /project "$DOCKER_IMG_NAME" bash
exec docker run -it --privileged --rm -v /dev/bus/usb/:/dev/bus/usb -v "${PATH_TO_PROJECT}:/project" -w /project $DOCKER_IMG_NAME bash
else
exec docker run -it --privileged --rm -h "$(hostname)-docker" --env-file .docker_env -v /dev/bus/usb/:/dev/bus/usb -v "${PATH_TO_PROJECT}:/project:delegated" -w /project "$DOCKER_IMG_NAME" "$(printf "%q " "$@")"
docker run -it --privileged --rm -v /dev/bus/usb/:/dev/bus/usb -v "${PATH_TO_PROJECT}:/project:delegated" -w /project $DOCKER_IMG_NAME "$(printf "%q " "$@")"
fi

Choose a reason for hiding this comment

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

high

The --env-file .docker_env option has been removed, but unlike in docker-build.sh, it hasn't been replaced with explicit -e flags for environment variables. This means that important variables like TARGET, CONSOLE, DEBUG, etc., are no longer passed to the development container. This is a significant behavioral change that could break development and testing workflows that depend on these variables. If these variables are still required, they should be passed explicitly.


if [ "$#" -eq 0 ]; then
exec docker run -it --privileged --rm -h "$(hostname)-docker" --env-file .docker_env -v /dev/bus/usb/:/dev/bus/usb -v "${PATH_TO_PROJECT}:/project" -w /project "$DOCKER_IMG_NAME" bash
exec docker run -it --privileged --rm -v /dev/bus/usb/:/dev/bus/usb -v "${PATH_TO_PROJECT}:/project" -w /project $DOCKER_IMG_NAME bash

Choose a reason for hiding this comment

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

medium

The $DOCKER_IMG_NAME variable should be quoted to prevent potential issues with word splitting and globbing if the variable's value contains spaces or special characters.

Suggested change
exec docker run -it --privileged --rm -v /dev/bus/usb/:/dev/bus/usb -v "${PATH_TO_PROJECT}:/project" -w /project $DOCKER_IMG_NAME bash
exec docker run -it --privileged --rm -v /dev/bus/usb/:/dev/bus/usb -v "${PATH_TO_PROJECT}:/project" -w /project "$DOCKER_IMG_NAME" bash

exec docker run -it --privileged --rm -v /dev/bus/usb/:/dev/bus/usb -v "${PATH_TO_PROJECT}:/project" -w /project $DOCKER_IMG_NAME bash
else
exec docker run -it --privileged --rm -h "$(hostname)-docker" --env-file .docker_env -v /dev/bus/usb/:/dev/bus/usb -v "${PATH_TO_PROJECT}:/project:delegated" -w /project "$DOCKER_IMG_NAME" "$(printf "%q " "$@")"
docker run -it --privileged --rm -v /dev/bus/usb/:/dev/bus/usb -v "${PATH_TO_PROJECT}:/project:delegated" -w /project $DOCKER_IMG_NAME "$(printf "%q " "$@")"

Choose a reason for hiding this comment

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

medium

The $DOCKER_IMG_NAME variable should be quoted to prevent potential issues with word splitting and globbing. Additionally, exec has been removed from this line, making it inconsistent with line 13. Using exec is more efficient as it replaces the shell process with the docker run command.

Suggested change
docker run -it --privileged --rm -v /dev/bus/usb/:/dev/bus/usb -v "${PATH_TO_PROJECT}:/project:delegated" -w /project $DOCKER_IMG_NAME "$(printf "%q " "$@")"
exec docker run -it --privileged --rm -v /dev/bus/usb/:/dev/bus/usb -v "${PATH_TO_PROJECT}:/project:delegated" -w /project "$DOCKER_IMG_NAME" "$(printf "%q " "$@")"

Władysław Młynik and others added 4 commits August 18, 2025 14:32
Done in the same way as the rootfs to avoid loosing permissions when packing to zip.
This small issue hasn't been seen before, because in CI binaries like phoenixd/psu are taken from docker.

JIRA: CI-575
* phoenix-rtos-tests 1c676a4...459323f (1):
  > trunner: fix flash armv7m4
* phoenix-rtos-tests 459323f...5ae82a4 (1):
  > trunner: armv7a9 correct _reboot_by_debugger
@wmlynik wmlynik force-pushed the wmlynik/v3.3.1-ci branch from e265ff0 to 9867e39 Compare August 18, 2025 12:32
@github-actions
Copy link

Unit Test Results

     1 files   1 604 suites   1h 37m 57s ⏱️
20 854 tests 17 836 ✅ 3 018 💤 0 ❌
21 040 runs  17 983 ✅ 3 057 💤 0 ❌

Results for commit 9867e39.

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