-
Notifications
You must be signed in to change notification settings - Fork 325
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
[SKIP CI] .github/zephyr.yml: add a temporary submodules/west consistency check #7320
Conversation
Test new, fancy and impressive looking git --filter optimization on non-critical "manifest check". Extend it later to other checks if it hasn't caused any issue. https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/ zephyrproject-rtos/west#638 (comment) Signed-off-by: Marc Herbert <[email protected]>
bc17647
to
76f82af
Compare
|
The "git submodules" consistency check added by the 2nd commit failed in https://github.com/thesofproject/sof/actions/runs/4486669431/jobs/7889366353?pr=7320 which is exactly its purpose. This was just broken by PR #7250. EDIT: and fixed by #7316 checkpatch fails because it wants me to split an URL. I decline. |
if git status --porcelain=v2 | grep ^ ; then | ||
git status | ||
echo 'FAIL: inconsistency between git submodules and west.yml!' | ||
echo 'Always use "git status"' |
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.
What are you telling people to do here ? By itself git status
wont fix the problem.
Btw, why not just convert rimage to west and avoid temp W/A ?
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.
What are you telling people to do here ? By itself git status wont fix the problem.
The error message says "inconsistency between git submodules and west.yml" and the check name is "git submodule consistency". There's also a comment in west.yml above the line that people changed.
Btw, why not just convert rimage to west and avoid temp W/A ?
That's explained in the comment above. rimage is already in west, the longer-term fix is to change its location so it does coincide with the XTOS submodule. However this will (temporarily) break CI as every rimage change does as we just saw in zephyrproject-rtos/zephyr#54700 and zephyrproject-rtos/zephyr#56099
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.
@lgirdwood I added a direct reference to the detailed rimage submodule instructions in sof/west.yml, I should have done that from the start.
Real-world experience has proved again that big READMEs are not enough, not even when they're only a couple lines away as the one added in commit 8fd351e ("west.yml: add warning to keep git submodules in sync"). Only some failure / red color stand a chance. It also seems some people rarely use "git status". This was discovered in commit d9eb16a ("cmake: add warning when git submodule changes are found") but is still surprising. Signed-off-by: Marc Herbert <[email protected]>
76f82af
to
7d82f64
Compare
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 rimage submodule has just been updated elsewhere, this new test is now passing in https://github.com/thesofproject/sof/actions/runs/4492799010/jobs/7903159878?pr=7320
if git status --porcelain=v2 | grep ^ ; then | ||
git status | ||
echo 'FAIL: inconsistency between git submodules and west.yml!' | ||
echo 'Always use "git status"' |
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.
@lgirdwood I added a direct reference to the detailed rimage submodule instructions in sof/west.yml, I should have done that from the start.
The deleted "install" target copied only the rimage executable and left the config files behind. This gave the wrong impression that the executable is useful without config files. "Installing" also gave the wrong impression that rimage versions are somewhat stable and relatively independent of SOF versions: they're not. In fact there is no such thing as an rimage "version": everyone should always use the exact rimage _git commit_ from the west manifest or git submodule. There are no rimage "releases" and no semantic versioning or anything like it, rimage is effectively part of the SOF source and build and run directly from its build directory by practically every SOF developer and SOF CI thanks to sof/src/arch/xtensa/CMakeLists.txt#ExternalProject_Add(rimage_ep ... sof/scripts/xtensa-build-zephyr.py#def build_rimage() sof/zephyr/CMakeLists.txt#set(RIMAGE_CONFIG_PATH ... etc. Providing an "install" target greatly increases the chances of different people and CIs using different rimage versions which is the last thing we want considering the many significant rimage changes happening right now, examples: - zephyrproject-rtos/zephyr#56099 - zephyrproject-rtos/zephyr#54700 - thesofproject/sof#7270 - thesofproject/sof#7304 - thesofproject/sof#7320 - thesofproject#155 While it's useful for multiple files (e.g.: config files), a CMake target was always overkill to copy a single file. Someone or some script who really wants to copy the rimage binary to some other place that the build directory for some (discouraged) reason _can still do so_ with a much more basic, simpler and more transparent file copy command. Finally, the default "bin" DESTINATION required root access which is otherwise totally unncessary to build SOF. Signed-off-by: Marc Herbert <[email protected]>
The deleted "install" target copied only the rimage executable and left the config files behind. This gave the wrong impression that the executable is useful without config files. "Installing" also gave the wrong impression that rimage versions are somewhat stable and relatively independent of SOF versions: they're not. In fact there is no such thing as an rimage "version": everyone should always use the exact rimage _git commit_ from the west manifest or git submodule. There are no rimage "releases" and no semantic versioning or anything like it, rimage is effectively part of the SOF source and build and run directly from its build directory by practically every SOF developer and SOF CI thanks to sof/src/arch/xtensa/CMakeLists.txt#ExternalProject_Add(rimage_ep ... sof/scripts/xtensa-build-zephyr.py#def build_rimage() sof/zephyr/CMakeLists.txt#set(RIMAGE_CONFIG_PATH ... etc. Providing an "install" target greatly increases the chances of different people and CIs using different rimage versions which is the last thing we want considering the many significant rimage changes happening right now, examples: - zephyrproject-rtos/zephyr#56099 - zephyrproject-rtos/zephyr#54700 - thesofproject/sof#7270 - thesofproject/sof#7304 - thesofproject/sof#7320 - thesofproject#155 While it's useful for multiple files (e.g.: config files), a CMake target was always overkill to copy a single file. Someone or some script who really wants to copy the rimage binary to some other place that the build directory for some (discouraged) reason _can still do so_ with a much more basic, simpler and more transparent file copy command. Finally, the default "bin" DESTINATION required root access which is otherwise totally unncessary to build SOF. Signed-off-by: Marc Herbert <[email protected]>
The deleted "install" target copied only the rimage executable and left the config files behind. This gave the wrong impression that the executable is useful without config files. "Installing" also gave the wrong impression that rimage versions are somewhat stable and relatively independent of SOF versions: they're not. In fact there is no such thing as an rimage "version": everyone should always use the exact rimage _git commit_ from the west manifest or git submodule. There are no rimage "releases" and no semantic versioning or anything like it, rimage is effectively part of the SOF source and build and run directly from its build directory by practically every SOF developer and SOF CI thanks to sof/src/arch/xtensa/CMakeLists.txt#ExternalProject_Add(rimage_ep ... sof/scripts/xtensa-build-zephyr.py#def build_rimage() sof/zephyr/CMakeLists.txt#set(RIMAGE_CONFIG_PATH ... etc. Providing an "install" target greatly increases the chances of different people and CIs using different rimage versions which is the last thing we want considering the many significant rimage changes happening right now, examples: - zephyrproject-rtos/zephyr#56099 - zephyrproject-rtos/zephyr#54700 - thesofproject/sof#7270 - thesofproject/sof#7304 - thesofproject/sof#7320 - #155 While it's useful for multiple files (e.g.: config files), a CMake target was always overkill to copy a single file. Someone or some script who really wants to copy the rimage binary to some other place that the build directory for some (discouraged) reason _can still do so_ with a much more basic, simpler and more transparent file copy command. Finally, the default "bin" DESTINATION required root access which is otherwise totally unncessary to build SOF. Signed-off-by: Marc Herbert <[email protected]>
Real-world experience has proved again that big READMEs are not enough, not even when they're only a couple lines away as the one added in commit 8fd351e ("west.yml: add warning to keep git submodules in sync"). Only some failure / red color stand a chance.
It also seems some people rarely use "git status". This was discovered in commit d9eb16a ("cmake: add warning when git submodule changes are found") but is still surprising.