Skip to content

Partial-update rollback: atomic submodule commit with failure summary. #30

Description

@AuraMindNest

Problem

When CI processes multiple library submodules, some can fail while others succeed. Exiting immediately on the first fatal error prevented the translations repo from being finalized with partial progress, and ad-hoc per-workflow summary blocks gave an incomplete picture of successes, skips, and failures. The start-local job also re-read every libs/ submodule from .gitmodules instead of limiting work to submodules that actually succeeded in sync-mirrors.

Acceptance Criteria

  • Submodule processing continues through the finalize phase even when individual submodules return fatal errors; the job exits non-zero only after finalize completes.
  • A single consolidated summary reports successfully updated, failed (by type), and skipped submodules, including open-translation-PR skips.
  • sync-mirrors emits updated_submodules as JSON; start-local runs under always() and processes only that list.
  • Combined exit code reflects submodule fatals, finalize failures, and (in start-local) Weblate trigger failures.

Implementation Notes

  • Add record_submodule_fatal, print_submodule_processing_summary, and submodule_names_to_json / parse_submodule_names_json in lib.sh; track SUBMODULE_FATAL and OPEN_PR_SKIP in translation state.
  • Replace inline summary echo blocks in workflows with print_submodule_processing_summary; defer exit 1 until after finalize using a merged exit_rc.
  • Call set_git_bot_config before git operations in translation.sh and add_create_tag_workflow; guard env.sh org/repo parsing when GITHUB_REPOSITORY is unset (tests).

References

  • .github/workflows/add-submodules.yml
  • .github/workflows/assets/env.sh
  • .github/workflows/assets/lib.sh
  • .github/workflows/assets/translation.sh
  • .github/workflows/start-translation.yml
  • tests/helpers/common.bash
  • tests/test_lib.bats

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions