Skip to content

[Deps-Test] Deep-merge injected ExtraChefAttributes with the cluster config's existing ones - #7459

Merged
himani2411 merged 2 commits into
aws:developfrom
himani2411:cli-devsetting
Jun 29, 2026
Merged

[Deps-Test] Deep-merge injected ExtraChefAttributes with the cluster config's existing ones#7459
himani2411 merged 2 commits into
aws:developfrom
himani2411:cli-devsetting

Conversation

@himani2411

Copy link
Copy Markdown
Contributor

Description of changes

A test feature (e.g. gb200) may
already set DevSettings.Cookbook.ExtraChefAttributes on the cluster config. The
previous 'inject only if absent' guard then skipped our attributes entirely(
ExtraChefAttributes (python-version,nvidia, etc.) via --extra-chef-attributes), so
cluster init used the cookbook default python and failed with
'Errno::ENOENT: .../pyenv/versions/3.14.2/.../python' (the AMI carries the
upgraded python).

Deep-merge instead: parse the existing JSON string, recursively merge our injected attributes under it, and re-serialize. The two dicts share branch keys (cluster, cluster.nvidia) but disjoint children, so a shallow merge would drop one subtree; recursion preserves both. Test-specific attributes win on leaf conflicts (existing passed as the override arg).

Tests

  • ONGOING test

References

  • Link to impacted open issues.
  • Link to related PRs in other packages (i.e. cookbook, node).
  • Link to documentation useful to understand the changes.

Checklist

  • Make sure you are pointing to the right branch.
  • If you're creating a patch for a branch other than develop add the branch name as prefix in the PR title (e.g. [release-3.6]).
  • Check all commits' messages are clear, describing what and why vs how.
  • Make sure to have added unit tests or integration tests to cover the new/modified code.
  • Check if documentation is impacted by this change.

Please review the guidelines for contributing and Pull Request Instructions.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

…config's existing ones

A test feature (e.g. gb200) may
already set DevSettings.Cookbook.ExtraChefAttributes on the cluster config. The
previous 'inject only if absent' guard then skipped our attributes entirely(
ExtraChefAttributes (python-version,nvidia, etc.) via --extra-chef-attributes), so
cluster init used the cookbook default python and failed with
'Errno::ENOENT: .../pyenv/versions/3.14.2/.../python' (the AMI carries the
upgraded python).

Deep-merge instead: parse the existing JSON string, recursively merge our
injected attributes under it, and re-serialize. The two dicts share branch keys
(cluster, cluster.nvidia) but disjoint children, so a shallow merge would drop
one subtree; recursion preserves both. Test-specific attributes win on leaf
conflicts (existing passed as the override arg).
@himani2411
himani2411 requested review from a team as code owners June 26, 2026 14:35
@himani2411 himani2411 added skip-changelog-update Disables the check that enforces changelog updates in PRs 3.x labels Jun 26, 2026
@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.92%. Comparing base (bdf724a) to head (8263c8b).
⚠️ Report is 12 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #7459   +/-   ##
========================================
  Coverage    89.91%   89.92%           
========================================
  Files          180      180           
  Lines        16200    16226   +26     
========================================
+ Hits         14567    14592   +25     
- Misses        1633     1634    +1     
Flag Coverage Δ
unittests 89.92% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@himani2411
himani2411 enabled auto-merge (rebase) June 29, 2026 15:03
@himani2411
himani2411 merged commit 0b7ba83 into aws:develop Jun 29, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.x skip-changelog-update Disables the check that enforces changelog updates in PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants