Skip to content

Conversation

@agadgil-progress
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings December 5, 2025 08:08
@agadgil-progress agadgil-progress requested a review from a team as a code owner December 5, 2025 08:08
@netlify
Copy link

netlify bot commented Dec 5, 2025

👷 Deploy Preview for chef-habitat processing.

Name Link
🔨 Latest commit 9db2f3a
🔍 Latest deploy log https://app.netlify.com/projects/chef-habitat/deploys/6939153a12a0e800083ea833

Copy link
Contributor

Copilot AI left a comment

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 introduces a feature flag (HAB_FEAT_MACOS_NATIVE_SUPPORT) to enable native studio support on macOS, allowing macOS users to run Habitat Studio natively when the feature flag is set, rather than defaulting to Docker. The implementation modifies the studio entry logic to check for this feature flag on Unix systems (specifically targeting macOS) and routes to the appropriate studio implementation.

Key changes:

  • Adds MACOS_NATIVE_SUPPORT feature flag with environment variable HAB_FEAT_MACOS_NATIVE_SUPPORT
  • Updates studio entry logic to support native studio on macOS when feature flag is enabled
  • Replaces hardcoded package identifier with environment variable HAB_STUDIO_BACKLINE_PKG in Darwin studio script
  • Removes two unused feature flags (SERVICE_CONFIG_FILES and STRUCTOPT_CLI)

Reviewed changes

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

File Description
components/common/src/lib.rs Adds MACOS_NATIVE_SUPPORT feature flag and removes two unused flags (SERVICE_CONFIG_FILES, STRUCTOPT_CLI)
components/hab/src/command/studio/enter.rs Updates studio entry logic to support macOS native studio behind feature flag, changes cfg from target_os to target_family for Unix support
components/studio/libexec/hab-studio-type-darwin-default.sh Replaces hardcoded chef/hab-backline with environment variable ${HAB_STUDIO_BACKLINE_PKG} for flexibility
components/hab/install.sh Removes trailing whitespace (formatting cleanup only)

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI review requested due to automatic review settings December 8, 2025 07:31
Copy link
Contributor

Copilot AI left a comment

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 4 out of 5 changed files in this pull request and generated no new comments.

@agadgil-progress
Copy link
Contributor Author

agadgil-progress commented Dec 9, 2025

To test this PR, a bit of preparatory work is required - that is to download the hab-studio and ham-backline packages that are available. This can be done by -

$ sudo ./target/debug/hab pkg install core/hab-studio --binlink -f -c aarch64-darwin
$ sudo hab pkg install core/hab-backline -c aarch64-darwin

(the HAB_AUTH_TOKEN needs to be set).

Once these packages are installed one can test the studio by -

$ hab studio enter # This should start the docker studio - current 1.6 / 2.0 behaviour 
$ HAB_FEAT_MACOS_NATIVE_SUPPORT=true HAB_BACKLINE_PKG=core/hab-backline HAB_STUDIO_BINARY=/usr/local/bin/hab-studio ./target/debug/hab studio enter

- `SERVICE_CONFIG_FILES`
- `STRUCTOPT_CLI`

Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
Added a Feature Flag `MACOS_NATIVE_SUPPORT`. All the MacOS Features will
be gated by this runtime flag till we are ready to support MacOS fully.

Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
@sonarqube-for-infrastructure-prod

Quality Gate failed Quality Gate failed

Failed conditions
1 New issue

See analysis details on SonarQube

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE SonarQube for IDE

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