build icon indicating copy to clipboard operation
build copied to clipboard

[Bug]: extensions.sh fails when no passed function hooks found

Open ZoomRmc opened this issue 7 months ago • 5 comments

What happened?

Recent run of Build All Artifacts action failed at the Prepare Info JSON and Matrices step, due to a subshell error 123 while running the extensions.sh script:

  [💥] Error  123 occurred in SUBSHELL [ SUBSHELL at /home/actions-runner-01/_work/os/os/build/lib/functions/general/extensions.sh:582 ]
  Error:  Error  123 occurred in SUBSHELL SUBSHELL at /home/actions-runner-01/_work/os/os/build/lib/functions/general/extensions.sh:582

From what I can see, xargs fails due to grep returning nothing. Not sure why, perhaps there are no passed arguments so there's no searched_hook_names to grep?

https://github.com/armbian/build/blob/c2d1479fa646ad42718d685527beb8815f5498c8/lib/functions/general/extensions.sh#L582

The function is new and was introduced last week: https://github.com/armbian/build/commit/10570df8048919d15f09ef24b088b3a168793c72

Possible mitigation step is appending || true to the subshell invocation at line 582 so it never fails. If lack of input arguments is indeed the issue, early enable_extensions_with_hostdeps_builtin_and_user return is preferable, of course.

How to reproduce?

https://github.com/armbian/os/actions/runs/15516597014/job/43684884037#annotation:10:80

Branch

main (main development branch)

On which host OS are you running the build script and observing this problem?

Ubuntu 24.04 Noble

Are you building on Windows WSL2?

  • [ ] Yes, my Ubuntu/Debian/OtherOS is running on WSL2

Relevant log URL

No response

Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

ZoomRmc avatar Jun 08 '25 12:06 ZoomRmc

Hey @ZoomRmc! 👋

Thanks for opening your first issue with the Armbian project — we’re glad to have you here! 🧡
Your input doesn’t just help us improve the project — it benefits everyone who uses Armbian.

If you'd like to stay informed about project updates or collaborate more closely with the team,
you can optionally share some personal contact preferences at armbian.com/update-data.
This helps us keep in touch without relying solely on GitHub notifications.

Also, don’t forget to ⭐ star the repo to support the work — and welcome aboard! 🚀

github-actions[bot] avatar Jun 08 '25 12:06 github-actions[bot]

Jira ticket: AR-2698

github-actions[bot] avatar Jun 08 '25 12:06 github-actions[bot]

Interesting. Maybe because userpatches is empty?

rpardini avatar Jun 10 '25 10:06 rpardini

Or, the opposite, some userpatches full of things in unexpected format? What's the userpatches in this failed run?

rpardini avatar Jun 10 '25 10:06 rpardini

What's the userpatches in this failed run?

This also fails on our default CI with https://github.com/armbian/os/tree/main/userpatches

igorpecovnik avatar Jun 12 '25 19:06 igorpecovnik

still exists

diggerdu avatar Jun 16 '25 16:06 diggerdu

Happens to me with userpatches/extensions empty (directory exists, but empty). Deleting the directory fixes the error, but it also seems like a bug that the directory being empty is causing a crash.

JohnTheCoolingFan avatar Jun 29 '25 22:06 JohnTheCoolingFan