-
-
Notifications
You must be signed in to change notification settings - Fork 3k
artifact-rootfs: surface git-log failure when computing configng hash #9849
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: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,12 +18,33 @@ function artifact_rootfs_config_dump() { | |
| # Track the latest commit touching configng's desktop definitions. | ||
| # Any change to YAML, parser, or module code in tools/modules/desktops/ | ||
| # invalidates the desktop rootfs cache — the package list, browser | ||
| # mapping, tier overrides, or branding may have changed. | ||
| # mapping, tier overrides, or branding may have changed. Scoped to | ||
| # desktop builds and the desktop subtree because armbian-config is | ||
| # only invoked at build time for desktop installs | ||
| # (`module_desktops install mode=build`); for CLI builds the .deb | ||
| # is just installed and its contents don't affect the rootfs. | ||
| if [[ "${BUILD_DESKTOP}" == "yes" ]]; then | ||
| declare configng_desktops_hash="undetermined" | ||
| local configng_dir="${SRC}/cache/sources/armbian-configng" | ||
| if [[ -d "${configng_dir}/.git" ]]; then | ||
| configng_desktops_hash="$(git -C "${configng_dir}" log -1 --format=%H -- tools/modules/desktops/ 2>/dev/null || echo "unknown")" | ||
| # Capture stdout + stderr, then branch on exit status. This is | ||
| # a best-effort knob for cache-invalidation, not a build | ||
| # blocker - if git can't read this clone (torn checkout, | ||
| # stale files, broken HEAD, permissions), we warn and fall | ||
| # through to "unknown" rather than aborting an hour-long | ||
| # build. The downstream check in create-cache.sh skips the | ||
| # fingerprint fold on "unknown" / "undetermined" — the | ||
| # build still produces a valid image, it just doesn't get | ||
| # the configng-aware cache bust. | ||
| declare git_out git_rc | ||
| git_out="$(git -C "${configng_dir}" log -1 --format=%H -- tools/modules/desktops/ 2>&1)" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Path filter The PR objectives state the fix should "remove the path filter from git log -1" so that "any commit" in armbian-configng invalidates the cache, but line 40 still restricts the hash to commits touching 🤖 Prompt for AI Agents |
||
| git_rc=$? | ||
| if (( git_rc == 0 )); then | ||
| configng_desktops_hash="${git_out}" | ||
| else | ||
| display_alert "configng_desktops hash: git log failed (rc=${git_rc}) in ${configng_dir}" "${git_out}" "warn" | ||
| configng_desktops_hash="unknown" | ||
| fi | ||
| fi | ||
| artifact_input_variables[CONFIGNG_DESKTOPS_HASH]="${configng_desktops_hash}" | ||
| fi | ||
|
Comment on lines
26
to
50
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PR objectives claim BUILD_DESKTOP gate should be removed, but it remains. The PR objectives state the fix should "remove the BUILD_DESKTOP gate" so "any commit in cache/sources/armbian-configng now bumps the rootfs cache key for all build flavours" (emphasis added). However, lines 26-50 still wrap the entire hash computation in 🤖 Prompt for AI Agents |
||
|
|
||
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.
Variable still named CONFIGNG_DESKTOPS_HASH instead of CONFIGNG_HASH.
The PR objectives state the fix should "rename CONFIGNG_DESKTOPS_HASH → CONFIGNG_HASH", but the code at lines 27, 43, 46, 49, and 81 continues to use
CONFIGNG_DESKTOPS_HASHandconfigng_desktops_hash. This name implies desktop-only scope, which contradicts the objective of applying the hash to all build types.Also applies to: 43-43, 46-46, 49-49, 81-81
🤖 Prompt for AI Agents