Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HAB_FEAT_IGNORE_LOCAL is not honored with hab pkg build --docker #5739

Open
tduffield opened this issue Oct 11, 2018 · 8 comments
Open

HAB_FEAT_IGNORE_LOCAL is not honored with hab pkg build --docker #5739

tduffield opened this issue Oct 11, 2018 · 8 comments
Labels
Focus :Plan Build Focus: Studio Related to the Habitat Studio (core/hab-studio) component Stale Type: Bug Issues that describe broken functionality

Comments

@tduffield
Copy link
Contributor

When running hab pkg build --docker on Ubuntu 16.04, the HAB_FEAT_IGNORE_LOCAL environment variable is injected into the studio, but it is not honored.

Here is the output from a Linux chroot build (hab pkg build):

   hab-studio: Exported: HAB_AUTH_TOKEN=[redacted]
   hab-studio: Exported: HAB_ORIGIN=chef
   hab-studio: Exported: HAB_BLDR_CHANNEL=expeditor-chef-a2-master
   hab-studio: Exported: HAB_NONINTERACTIVE=true
   hab-studio: Exported: HAB_FEAT_IGNORE_LOCAL=[redacted]
   hab-studio: Exported: GITHUB_TOKEN=[redacted]
∅ Enabling feature: IgnoreLocal

Here is the output from a Docker build (hab pkg build --docker):

   hab-studio: Exported: HAB_AUTH_TOKEN=[redacted]
   hab-studio: Exported: HAB_ORIGIN=chef
   hab-studio: Exported: HAB_BLDR_CHANNEL=expeditor-chef-a2-master
   hab-studio: Exported: HAB_FEAT_IGNORE_LOCAL=[redacted]
   hab-studio: Exported: GITHUB_TOKEN=[redacted]
   : Loading /src/components/authz-service/habitat/plan.sh
   authz-service: Plan loaded

I have full logs available, but they are hidden behind the ChefVPN.

@stevendanna
Copy link
Contributor

I'm guessing this is because in the chroot you inhereit the entire environment since you end up in a child process of your original shell process but with docker we only pass through HAB_STUDIO_SECRET_ prefixed vars

@tduffield
Copy link
Contributor Author

@stevendanna I am passing it via HAB_STUDIO_SECRET_HAB_FEAT_IGNORE_LOCAL

@stevendanna
Copy link
Contributor

stevendanna commented Oct 11, 2018

@tduffield OIC! Definitely looks like a bug then, thanks for clarifying!

@elliott-davis
Copy link
Contributor

There is a workaround for this in 0.64.0 e6db9a4. However, the full fix would be to allow HAB_FEAT_ like https://github.com/habitat-sh/habitat/blob/master/components/hab/src/command/studio/docker.rs#L100-L104

@stale
Copy link

stale bot commented Apr 3, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

@stale stale bot added the Stale label Apr 3, 2020
@stevendanna
Copy link
Contributor

On 1.5.71, this now works assuming you are using HAB_STUDIO_SECRET_HAB_FEATURE_INGORE_LOCAL. It doesn't work with just HAB_FEAT_INGORE_LOCAL as far as I can tell because we don't appear to have special handling for HAB_FEAT_ env variables for docker studios.

Given that, I think we can close this in favor of #5274

@stale stale bot removed the Stale label Apr 3, 2020
@christophermaier christophermaier added Focus: Studio Related to the Habitat Studio (core/hab-studio) component Type: Bug Issues that describe broken functionality and removed A-studio labels Jul 24, 2020
@stale
Copy link

stale bot commented Aug 13, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

@stale stale bot added the Stale label Aug 13, 2022
@stale
Copy link

stale bot commented May 22, 2023

This issue has been automatically closed after being stale for 400 days. We still value your input and contribution. Please re-open the issue if desired and leave a comment with details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Focus :Plan Build Focus: Studio Related to the Habitat Studio (core/hab-studio) component Stale Type: Bug Issues that describe broken functionality
Projects
None yet
Development

No branches or pull requests

5 participants