Skip to content

kos updates - #176

Open
bsandu-peridio wants to merge 6 commits into
mainfrom
beni/dev
Open

kos updates#176
bsandu-peridio wants to merge 6 commits into
mainfrom
beni/dev

Conversation

@bsandu-peridio

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aligns extension config resolution between runtime/remote and standalone/local execution paths by applying the same override-dispatch logic (target-<name>: and legacy bare <name>:) when reading composed extension config values.

Changes:

  • Use Config::resolve_overrides_in_value when loading remote/composed extension config for ext build.
  • Use Config::resolve_overrides_in_value when loading remote/composed extension config for ext image.
  • Add explanatory comments describing why this override resolution is needed in the runtime-build path.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/commands/ext/image.rs Applies override-resolution to composed extension config in the remote/runtime path so target-<name>: overlays are honored consistently.
src/commands/ext/build.rs Applies override-resolution to composed extension config in the remote/runtime path so target-<name>: overlays are honored consistently.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/commands/ext/build.rs Outdated
Comment on lines +370 to +375
// Resolve target-<name>: / kernel-<spec>: / legacy bare <name>:
// overrides from the composed extension value so the preferred
// `target-<name>:` form is honored in the runtime-build path too
// (previously only the standalone `Local` path resolved it, so a
// path-sourced ext in `avocado build` got the base config: no
// per-target overlay).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 2e569f9.

Comment thread src/commands/ext/image.rs Outdated
Comment on lines +440 to +447
// Resolve target-<name>: / kernel-<spec>: / legacy bare <name>:
// overrides from the composed extension value (find_ext_in_mapping
// returns it raw). Using resolve_overrides_in_value here — rather
// than only checking a bare `<target>:` key — means the preferred
// `target-<name>:` form is honored in the runtime-build path too
// (previously only the standalone `Local` path resolved it, so a
// path-sourced ext in `avocado build` got the base config: no
// per-target overlay and the base `--tag`).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 2e569f9.

Comment thread src/commands/ext/build.rs Outdated
Comment on lines +376 to +380
ext_section.map(|ext_val| {
config.resolve_overrides_in_value(
ext_val.clone(),
&target,
None,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 2e569f9.

@bsandu-peridio
bsandu-peridio force-pushed the beni/dev branch 2 times, most recently from 2e569f9 to b3b971d Compare July 14, 2026 09:15
@bsandu-peridio bsandu-peridio changed the title honor target-<name>: overrides for both runtime/standalone builds honor target-<name>: overrides for both runtime/standalone builds + kernel-<ver> Jul 14, 2026
Signed-off-by: Beniamin Sandu <b.sandu@peridio.com>
Signed-off-by: Beniamin Sandu <b.sandu@peridio.com>
Signed-off-by: Beniamin Sandu <b.sandu@peridio.com>
Signed-off-by: Beniamin Sandu <b.sandu@peridio.com>
Signed-off-by: Beniamin Sandu <b.sandu@peridio.com>
@bsandu-peridio bsandu-peridio changed the title honor target-<name>: overrides for both runtime/standalone builds + kernel-<ver> kos updates Aug 3, 2026
@bsandu-peridio
bsandu-peridio requested a review from Copilot August 3, 2026 20:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

Suppressed comments (1)

src/utils/config.rs:3182

  • kernel-<spec>: override blocks are merged without first running resolve_overrides_in_value on the block itself. That means any nested override keys inside a matching kernel block (e.g., nested target-<name>: or another kernel-<spec>:) will leak through into the merged result as literal keys, despite this function’s contract that recognized override sub-keys are stripped. Recursing on each matched kernel block before merging keeps behavior consistent with the newly-added recursion for target-<name>: blocks and prevents key leakage.
        for v in kernel_matches {
            merged = self.merge_values(merged, v);
        }

Signed-off-by: Beniamin Sandu <b.sandu@peridio.com>
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.

2 participants