-
Notifications
You must be signed in to change notification settings - Fork 41
v3.3.1 CI #1375
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
base: release/3.3
Are you sure you want to change the base?
v3.3.1 CI #1375
Conversation
There was a problem hiding this 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
-
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. ↩
There was a problem hiding this 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.
| 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| 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 " "$@")" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| 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 " "$@")" |
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
e265ff0 to
9867e39
Compare
Unit Test Results 1 files 1 604 suites 1h 37m 57s ⏱️ Results for commit 9867e39. |
Description
Motivation and Context
Types of changes
How Has This Been Tested?
Checklist:
Special treatment