Skip to content

thread token passed from --auth through to check for interpreter#10357

Merged
agadgil-progress merged 3 commits intomainfrom
auth_install
Apr 24, 2026
Merged

thread token passed from --auth through to check for interpreter#10357
agadgil-progress merged 3 commits intomainfrom
auth_install

Conversation

@mwrock
Copy link
Copy Markdown
Contributor

@mwrock mwrock commented Apr 22, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 22, 2026 21:05
@mwrock mwrock requested a review from a team as a code owner April 22, 2026 21:05
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 22, 2026

👷 Deploy Preview for chef-habitat processing.

Name Link
🔨 Latest commit 3309dc7
🔍 Latest deploy log https://app.netlify.com/projects/chef-habitat/deploys/69eab83f7cf7480009d109a8

Copy link
Copy Markdown
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 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.

Comment thread test/end-to-end/test_pkg_install.ps1 Outdated
Comment thread test/end-to-end/test_pkg_install.ps1 Outdated
Comment thread test/end-to-end/test_pkg_install.ps1 Outdated
Comment thread components/common/src/util/path.rs Outdated
Copilot AI review requested due to automatic review settings April 22, 2026 21:42
Copy link
Copy Markdown
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 10 out of 10 changed files in this pull request and generated 2 comments.

Comment thread components/common/src/util/path.rs Outdated
Comment thread test/end-to-end/test_pkg_install.ps1 Outdated
Copilot AI review requested due to automatic review settings April 23, 2026 01:30
Copy link
Copy Markdown
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 10 out of 10 changed files in this pull request and generated 2 comments.

Comment thread components/common/src/util/path.rs
Comment thread components/common/src/templating.rs
mwrock added 3 commits April 23, 2026 17:24
Signed-off-by: Matt Wrock <matt@mattwrock.com>
Signed-off-by: Matt Wrock <matt@mattwrock.com>
Signed-off-by: Matt Wrock <matt@mattwrock.com>
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.

Looks good - couldn't test the end-to-end test, for that we've to wait till everything goes through the pipelines.

@agadgil-progress agadgil-progress merged commit 4f1d7b9 into main Apr 24, 2026
32 checks passed
@agadgil-progress agadgil-progress deleted the auth_install branch April 24, 2026 08:19
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