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

Studio can build against downgraded channels #9282

Merged
merged 4 commits into from
Sep 3, 2024
Merged

Studio can build against downgraded channels #9282

merged 4 commits into from
Sep 3, 2024

Conversation

mwrock
Copy link
Contributor

@mwrock mwrock commented Jun 14, 2024

This introduces two new environment variables to the hab-plan-build script (linux and windows):

  • HAB_REFRESH_CHANNEL specifies the channel used to pull dependencies for core, chef and chef-platform origins. The default is LTS-2024 which falls back to stable if they cannot be found there.
  • HAB_PREFER_LOCAL_CHEF_DEPS is a boolean flag which defaults to false/unset. If set, this informs the build to choose a locally installed core/chef/chef-platform dependency over the one in the remote bldr channel. This would likely be used by the packages team when building a new set of refreshed packages where they need to build many deps locally in a particular order. It would also be used in our own release pipeline when we need to pull a locally built component (like a new new studio).

The hab pkg build command has a new --refresh-channel arg that is a convenience for feeding the HAB_REFRESH_CHANNEL environment variable for a build. There is no convenience arg for HAB_PREFER_LOCAL_CHEF_DEPS because that will likely only be used internally.

One key thing to note here is that now, unless HAB_PREFER_LOCAL_CHEF_DEPS is set, core/chef/chef-platform deps will only ever come the remote refresh channel and they will not come from the latest locally installed package.

I have removed the IGNORE_LOCAL feature flag since this now removes the need for that flag. We only ever needed/used this for core deps and now we essentially use it by default. It was also never publicly documented so I don't think we need to worry about it breaking anyone.

Copy link

netlify bot commented Jun 14, 2024

👷 Deploy Preview for chef-habitat processing.

Name Link
🔨 Latest commit cf7efef
🔍 Latest deploy log https://app.netlify.com/sites/chef-habitat/deploys/66d783b26fc71100085833c5

@mwrock mwrock marked this pull request as ready for review July 16, 2024 00:07
@@ -348,6 +348,13 @@ pub struct PkgBuild {
/// Uses a Dockerized Studio for the build
#[structopt(name = "DOCKER", short = "D", long = "docker")]
docker: bool,
/// Channel used to retrieve plan dpendencies for Chef supported origins
Copy link
Contributor

Choose a reason for hiding this comment

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

dependencies

http_proxy Sets an http_proxy environment variable inside the Studio
https_proxy Sets an https_proxy environment variable inside the Studio
no_proxy Sets a no_proxy environment variable inside the Studio
ARTIFACT_PATH Sets the source artifact cache path (\`-a' option overrides)
Copy link
Contributor

Choose a reason for hiding this comment

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

missing HAB_REFRESH_CHANNEL

QUIET Prints less output (\`-q' flag overrides)
SRC_PATH Sets the source path (\`-s' option overrides)
VERBOSE Prints more verbose output (\`-v' flag overrides)
HAB_LICENSE Set to 'accept' or 'accept-no-persist' to accept the Habitat license
Copy link
Contributor

Choose a reason for hiding this comment

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

missing HAB_REFRESH_CHANNEL

mwrock added 3 commits August 1, 2024 15:15
Signed-off-by: Matt Wrock <[email protected]>
Signed-off-by: Matt Wrock <[email protected]>
@mwrock mwrock marked this pull request as draft August 1, 2024 22:20
@mwrock
Copy link
Contributor Author

mwrock commented Aug 1, 2024

Converting this to draft until windows packages are promoted to LTS-2024.

@mwrock mwrock marked this pull request as ready for review September 3, 2024 22:20
@mwrock mwrock merged commit ca4c091 into main Sep 3, 2024
12 checks passed
jasonheath added a commit that referenced this pull request Dec 20, 2024
PR: #9282
COMMAND:
patch test/end-to-end/test_studio_can_build_packages.ps1 \
  <(diff <(git show ca4c091:test/end-to-end/test_studio_can_build_packages.ps1) \
  <(git show ca4c091^:test/end-to-end/test_studio_can_build_packages.ps1))

Signed-off-by: Jason Heath <[email protected]>
jasonheath added a commit that referenced this pull request Dec 20, 2024
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.

2 participants