Skip to content

Merge develop into feature/vnext-delta — bug fixes, ARM32, V2 downloader#864

Merged
Nox-MSFT merged 14 commits intofeature/vnext-deltafrom
user/msft/nox-msft/vnext-delta-merge-develop
Apr 24, 2026
Merged

Merge develop into feature/vnext-delta — bug fixes, ARM32, V2 downloader#864
Nox-MSFT merged 14 commits intofeature/vnext-deltafrom
user/msft/nox-msft/vnext-delta-merge-develop

Conversation

@Nox-MSFT
Copy link
Copy Markdown
Collaborator

Summary

Brings feature/vnext-delta up to date with develop, incorporating all bug fixes, ARM32 compatibility, and the V2 content downloader work.

Included from develop

Additional fix

  • Prevent unnecessary regeneration of swupdate_handler_result_codes.h — Removed embedded timestamp from extension_result_code_generator.py that caused 164+ files to recompile on every build.

Merge conflicts resolved

3 conflicts were manually resolved:

  1. CMakeLists.txt — Kept vnext-delta's Extension Configurations
  2. packages/CMakeLists.txt — Kept vnext-delta's UNSPECIFIED_PACKAGE naming
  3. init.c — Combined vnext-delta's atomic approach with develop's double-uninit guard

Validation

  • ✅ Build: 344 targets compiled successfully
  • ✅ Tests: 702/702 passed, 0 failures

nonsocode and others added 14 commits March 18, 2026 10:28
* Fix ARM32 segfault in extension registration: use %ld for long instead of %lld

The %lld format specifier consumes 8 bytes but long is 4 bytes on ARM32,
causing subsequent varargs (hash pointer) to be misread and segfaulting in strlen().
Regression introduced in PR #633 when %d was changed to %lld without updating the
variable type from long to long long.

* Add Debian 11 ARM32 build job using QEMU emulation

Adds arm32-container-job that builds on ubuntu-latest with QEMU
ARM emulation via docker/setup-qemu-action. Runs the full build
pipeline (install-deps, build, test) inside a debian:11 arm/v7
Docker container.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Prioritize dpkg for detecting userspace architecture

Update determine_machine_architecture function to prefer dpkg for userspace architecture detection.

* Replace CMake 3.20+ commands with CMake 3.5-compatible alternatives

Replace cmake_path() and file(COPY_FILE) calls with
get_filename_component() and configure_file(COPYONLY) respectively,
to match the project's cmake_minimum_required(VERSION 3.5).

Also add out*/ to .gitignore to cover build output directories
with suffixes (e.g. out-debian11-arm32/).

* support armhf

* arm64

* remove arm32 buid

---------

Co-authored-by: nox-msft <wewilair@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Nox-MSFT <55153324+Nox-MSFT@users.noreply.github.com>
* fix group memberships

* make choice

* make choice multiline

* back to defaults

* default curl

* content downloader message
* fix:  Make DO a suggestion when built with DO support

* don't break

* doc

* exclued cmakefiles fom coverage

* fix another bug

* undo coverage changes
* Update comment due to changes in PR #805 to add extendedResultCode

#805

* Clean up recursive include.

* Fix log debug statements

* Clean logic and improve message.

* Clean up according to review.
…861)

* Properly initialize curl content handler logging

* Pass logLevel to contentDownloader.

* Fix do-client logging initialization.

* Remove comment.

* Update header file.

* Call Cleanup when the lib is being Unloaded.

* feat: Add backward-compatible V2 content downloader contract

Enhance PR #828's logging initialization for content downloaders with
proper backward compatibility via a V2 contract model:

- Add V2 contract version (2.0) constants and ADUC_ContractUtils_IsV2Contract()
- Add InitializeV1Proc typedef for V1 ABI (1 arg) alongside V2's InitializeProc (2 args)
- Branch InitializeContentDownloader on contract version: V1 calls with 1 arg, V2 with 2 args
- Remove Cleanup from required symbols array so V1 extensions still load
- Only call Cleanup on the content downloader lib (not all libs) and only for V2
- Update Download() to accept both V1 and V2 contract versions
- Update curl and DO downloaders to report V2 contract
- Add unit tests for V1/V2/unsupported contract version routing

Addresses ABI compatibility concerns raised in #828.


* docs: Document V2 content downloader contract

Update extension-contract-versions.md with V1 vs V2 content downloader
contract details (Initialize signature change, Cleanup export).

Update device-update-agent-extensibility-points.md custom content
downloader section with V1/V2 guidance.

* test: Fix unit tests after develop merge and V2 contract adoption

- extension_manager_ut.cpp: pass ADUC_LOG_DEBUG to InitializeContentDownloader
  callsites (build break after logLevel param was added)
- extension_manager_ut.cpp, extension_manager_download_test_case.cpp: use
  {3,0} instead of {2,0} for the 'unsupported contract version' scenarios,
  since {2,0} is now a supported V2 contract
- curl_content_downloader_ut.cpp: update GetContractInfo test to expect V2,
  matching curl downloader's reported contract version

All 744 unit tests pass.

---------

Co-authored-by: Andre Ricardo <andre.ricardo@zoetis.com>
Brings 12 develop commits into vnext-delta, including:
- Fix #855 bug when hash check fails
- Fix double-free in logging library
- Fix segmentation fault
- Fix Curl downloader default
- Enhance content downloader with V2 contract and logging
- ARM 32 compatibility fixes
- Make DO recommended when built with DO support
- Build/CI cleanup (CMake paths, coverage, rootkey workflow)

Conflict resolutions:
- CMakeLists.txt: kept vnext-delta Extension Configurations block
- packages/CMakeLists.txt: kept vnext-delta UNSPECIFIED_PACKAGE naming
  (component-based packaging for delta handler)
- src/logging/zlog/src/init.c: combined vnext-delta atomic_fetch_sub
  with develop double-uninit guard

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The extension result code generator embedded a timestamp in the header
comment, producing different content on every run and defeating the
smart-write comparison. This caused 164+ files to recompile on every
cmake reconfigure even when no source files changed.

Changes:
- Remove timestamp from generated header (extension_result_code_generator.py)
- Expand cmake hash cache to include extension JSON files and generator
  scripts so cache invalidation is accurate
- Improve status messages to distinguish 'up-to-date' from 'Generated'
@Nox-MSFT Nox-MSFT requested review from chgennar and mirskiy April 24, 2026 19:56
@Nox-MSFT Nox-MSFT merged commit c891681 into feature/vnext-delta Apr 24, 2026
15 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants