Skip to content

hab plan CLI fixes#9941

Merged
jasonheath merged 7 commits intomainfrom
jah/hab-plan-cli
Oct 2, 2025
Merged

hab plan CLI fixes#9941
jasonheath merged 7 commits intomainfrom
jah/hab-plan-cli

Conversation

@jasonheath
Copy link
Copy Markdown
Contributor

@jasonheath jasonheath commented Sep 24, 2025

  • Fixes hab plan render by fixing the default.toml parsing
  • Fixes parsing of the argument passed to --scaffolding restoring scaffold plan generation
  • Restores scaffolding functionality on windows
  • Updates template_plan.sh and template_plan.ps1 to fix hab plan init
    • Removes almost all use of {{~ and ~}} to stop lines from running together after handlebars upgrade
    • introduces newlines to separate settings that were previously running together
    • Upcases 'Required.' and 'Optional.' and drops the period
    • Replaces no longer available doc URLs with current viable doc URLs
    • Normalizes whitespace in the handlebars templates as it was inconsistent
  • requires --scaffolding for a non-placeholder scaffoding setting
    • for some reason the code was always defaulting to "core/scaffolding-ruby"
  • add an end-to-end test for hab plan init and hab plan render

@netlify
Copy link
Copy Markdown

netlify Bot commented Sep 24, 2025

👷 Deploy Preview for chef-habitat processing.

Name Link
🔨 Latest commit dec705c
🔍 Latest deploy log https://app.netlify.com/projects/chef-habitat/deploys/68dd9b9077eda30008b12708

@jasonheath jasonheath changed the title Jah/hab plan cli hab plan CLI fixes Sep 24, 2025
@jasonheath jasonheath force-pushed the jah/hab-plan-cli branch 2 times, most recently from f6f1391 to 1e29e96 Compare September 24, 2025 20:12
@jasonheath jasonheath marked this pull request as ready for review September 24, 2025 21:30
@jasonheath jasonheath requested a review from a team as a code owner September 24, 2025 21:30
@jasonheath
Copy link
Copy Markdown
Contributor Author

I plan to add a e2e test for the hab plan cmd but I think the code is ready for review.

@jasonheath jasonheath force-pushed the jah/hab-plan-cli branch 3 times, most recently from 5cf52f4 to 9bcab3b Compare September 26, 2025 14:17
Copy link
Copy Markdown
Contributor

@agadgil-progress agadgil-progress left a comment

Choose a reason for hiding this comment

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

Tested on Linux.

Most changes look alright.

Only one comment - there are no scaffolding packages on windows so not sure supporting --scaffolding makes sense. So on windows the package should always resolve to some/scaffolding

@agadgil-progress
Copy link
Copy Markdown
Contributor

So may be we should get rid of --scaffolding for now for windows and then we can plan and add that support later.

@mwrock
Copy link
Copy Markdown
Contributor

mwrock commented Sep 30, 2025

I think this brings us closer to 1.6 parity. Not having support for --scaffolding is technically a breaking change. There are windows scaffolding packages in the effortless repo. The only difference I see here with 1.6 is that it supports non-ident scaffolding values (ex. go and not just core/scaffolding-go). This really isn't necessary but it is not breaking and I think it's fine.

Jason Heath and others added 6 commits October 1, 2025 12:38
- Removes almost all use of '{{~' and '~}}' to fix lines running
  together after handlebars upgrade
- introduces newlines to separate settings that were previously running
  together
- Upcases 'Required.' and 'Optional.' and drops the period
- Replaces no longer available doc URLs with current viable doc URLs
- Normalizes whitespace in the handlebars templates as it was
  inconsistent

Signed-off-by: Jason Heath <jason.heath@progress.com>
- Removes almost all use of '{{~' and '~}}' to fix lines running
  together after handlebars upgrade
- introduces newlines to separate settings that were previously running
  together
- Upcases 'Required.' and 'Optional.' and drops the period
- Replaces no longer available doc URLs with current viable doc URLs
- Normalizes whitespace in the handlebars templates as it was
  inconsistent

Signed-off-by: Jason Heath <jh@jasonheath.com>
Signed-off-by: Jason Heath <jason.heath@progress.com>
Signed-off-by: Jason Heath <jason.heath@progress.com>
Signed-off-by: Jason Heath <jason.heath@progress.com>
The templates have a switch in them that wasn't being respected. In the
template_plan.sh linux version we find this version of it

|  {{ #if scaffolding_ident }}
|  pkg_scaffolding="{{ scaffolding_ident }}"
|  {{ else }}
|  # pkg_scaffolding="some/scaffolding"
|  {{ /if }}

In reality 'pkg_scaffolding='core/scaffolding=ruby"' was always being
added to the plan file when 'pkg_scaffolding="some/scaffolding"' should
have been what was added unless the --scaffolding option was used.

Signed-off-by: Jason Heath <jason.heath@progress.com>
@jasonheath jasonheath force-pushed the jah/hab-plan-cli branch 2 times, most recently from 7ad1ec7 to b2f00d0 Compare October 1, 2025 21:15
Signed-off-by: Jason Heath <jason.heath@progress.com>
@sonarqube-for-infrastructure-prod
Copy link
Copy Markdown

@jasonheath jasonheath merged commit e3e5766 into main Oct 2, 2025
36 checks passed
@jasonheath jasonheath deleted the jah/hab-plan-cli branch October 2, 2025 11:44
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.

3 participants