thread token passed from --auth through to check for interpreter#10357
Merged
agadgil-progress merged 3 commits intomainfrom Apr 24, 2026
Merged
thread token passed from --auth through to check for interpreter#10357agadgil-progress merged 3 commits intomainfrom
agadgil-progress merged 3 commits intomainfrom
Conversation
👷 Deploy Preview for chef-habitat processing.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR threads the --auth token through Habitat’s hook templating / PATH construction so the Supervisor can install the required interpreter (e.g., busybox-static) from Builder when running install hooks, even when HAB_AUTH_TOKEN is not set in the environment.
Changes:
- Add an optional auth token parameter through
templating::compile_for_package_install,Pkg::from_install, and PATH/interpreter resolution to support authenticated interpreter installs. - Update Supervisor/common call sites and unit tests for the new function signatures (
..., token: Option<&str>). - Add end-to-end coverage to validate interpreter installation during install hooks when using
hab pkg install --auth.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/end-to-end/test_pkg_install.ps1 | Adds E2E tests ensuring hook interpreter can be installed from Builder when using --auth and clearing HAB_AUTH_TOKEN. |
| components/common/src/util/path.rs | Threads an optional token into interpreter resolution and uses it for authenticated interpreter installation. |
| components/common/src/templating.rs | Passes token into package templating compilation for install/uninstall hooks. |
| components/common/src/templating/package.rs | Extends Env::new and Pkg::from_install to accept a token and propagate it into PATH/interpreter resolution. |
| components/common/src/templating/hooks.rs | Passes token into templating compilation and Pkg::from_install when running maintenance hooks. |
| components/sup/src/command/shell.rs | Updates PATH setup call site for new append_interpreter_and_env_path(..., token) signature. |
| components/sup/src/manager/service.rs | Updates Pkg::from_install call sites for new signature. |
| components/sup/src/manager/service/hooks.rs | Updates test helper to use new Pkg::from_install(..., None) signature. |
| components/sup/src/manager/service/pipe_hook_client.rs | Updates test helper to use new Pkg::from_install(..., None) signature. |
| components/common/src/templating/config.rs | Updates tests to use new Pkg::from_install(..., None) signature. |
Signed-off-by: Matt Wrock <matt@mattwrock.com>
Signed-off-by: Matt Wrock <matt@mattwrock.com>
Signed-off-by: Matt Wrock <matt@mattwrock.com>
agadgil-progress
approved these changes
Apr 24, 2026
Contributor
agadgil-progress
left a comment
There was a problem hiding this comment.
Looks good - couldn't test the end-to-end test, for that we've to wait till everything goes through the pipelines.
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.
No description provided.