feat(api): support phone-home for #cloud-config-archive user-data - #5094
Draft
goncalo-rodrigues wants to merge 1 commit into
Draft
feat(api): support phone-home for #cloud-config-archive user-data#5094goncalo-rodrigues wants to merge 1 commit into
goncalo-rodrigues wants to merge 1 commit into
Conversation
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Enabling phone-home previously required the user-data document root to be a #cloud-config mapping. A #cloud-config-archive (a YAML sequence) was rejected with "userData ... must be valid cloud-init YAML to enable phone home", even though cloud-init merges each archive part independently. Deliver phone-home as its own archive part instead: - Classify user-data by its cloud-init header: a #cloud-config mapping (header-less is still accepted and the header added on output) or a #cloud-config-archive sequence. A list without the archive header, or a map carrying a different header (e.g. a #!/bin/bash script that happens to parse as a map), is rejected rather than silently mangled. - Insert appends a dedicated text/cloud-config entry whose content is built by the existing #cloud-config insertion path, so both formats share one source of truth for the phone-home block. - Remove strips phone-home from each cloud-config entry, dropping entries left empty and leaving unrelated parts untouched. - The archive header comment is preserved, and re-enabling stays idempotent, matching the #cloud-config behaviour. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: goncalo-rodrigues <goncalo.rodrigues@ori.co>
goncalo-rodrigues
force-pushed
the
feat/phonehome-cloud-config-archive
branch
from
August 18, 2026 14:21
a8a05db to
7916cb9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enabling phone-home previously required the user-data document root to be a #cloud-config mapping. A #cloud-config-archive (a YAML sequence) was rejected with "userData ... must be valid cloud-init YAML to enable phone home", even though cloud-init merges each archive part independently.
Additionally, the check for the cloud config type was very lenient, allowing things like
to fail silently, as they are valid YAML maps. This is now fixed so that #!/bin/bash scripts and phoneHomeEnabled cannot be used simultaneously.
This was tested in our own hardware.
Related issues
Type of Change
Breaking Changes
Testing
Additional Notes