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

Updated channel from stable to LTS-2024 #9327

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .expeditor/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,5 +136,5 @@ artifact_channels:
- staging
# prod Builder Supervisors update from here
- current
# Habitat packages in stable, binary packages available to the world
- stable
# Habitat packages in LTS-2024, binary packages available to the world
- LTS-2024
4 changes: 2 additions & 2 deletions .expeditor/end_to_end.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ steps:
- label: "[:linux: hup-does-not-abandon-services]"
command:
- .expeditor/scripts/end_to_end/setup_environment.sh dev
- hab pkg install --binlink --channel=stable core/expect
- hab pkg install --binlink --channel=LTS-2024 core/expect
- hab pkg install --channel=\$HAB_BLDR_CHANNEL core/hab-sup core/hab-launcher
- test/end-to-end/hup-does-not-abandon-services.exp
expeditor:
Expand All @@ -58,7 +58,7 @@ steps:
- label: "[:linux: hab-svc-load]"
command:
- .expeditor/scripts/end_to_end/setup_environment.sh dev
- hab pkg install --binlink --channel=stable core/expect
- hab pkg install --binlink --channel=LTS-2024 core/expect
- hab pkg install --channel=\$HAB_BLDR_CHANNEL core/hab-sup core/hab-launcher
- test/end-to-end/hab-svc-load.exp
expeditor:
Expand Down
8 changes: 4 additions & 4 deletions .expeditor/scripts/end_to_end/setup_environment.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ Invoke-NativeCommand hab pkg install core/hab-pkg-export-container `
--channel "$Channel" `
--url="$BuilderUrl"

Write-Host "--- Installing latest core/powershell from $BuilderUrl, stable channel"
Write-Host "--- Installing latest core/powershell from $BuilderUrl, LTS-2024 channel"
Invoke-NativeCommand hab pkg install core/powershell `
--binlink `
--force `
--channel=stable `
--channel=LTS-2024 `
--url="$BuilderUrl"
Write-Host "--- Using core/powershell $(pwsh --version)"

Write-Host "--- Installing latest core/pester from $BuilderUrl, stable channel"
Write-Host "--- Installing latest core/pester from $BuilderUrl, LTS-2024 channel"
Invoke-NativeCommand hab pkg install core/pester `
--channel=stable `
--channel=LTS-2024 `
--url="$BuilderUrl"
12 changes: 6 additions & 6 deletions .expeditor/scripts/end_to_end/setup_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,28 @@ sudo -E hab pkg install core/hab-pkg-export-container \
--channel="${channel}" \
--url="${HAB_BLDR_URL}"

echo "--- Installing latest core/netcat from ${HAB_BLDR_URL}, stable channel"
echo "--- Installing latest core/netcat from ${HAB_BLDR_URL}, LTS-2024 channel"
sudo -E hab pkg install core/netcat \
--binlink \
--force \
--channel="stable" \
--channel="LTS-2024" \
--url="${HAB_BLDR_URL}"

echo "--- Installing latest core/powershell from ${HAB_BLDR_URL}, stable channel"
echo "--- Installing latest core/powershell from ${HAB_BLDR_URL}, LTS-2024 channel"
# Binlink to '/usr/local/bin' to ensure we do not run the system installed version. The system
# version is installed in `/usr/bin` which occurs earlier in the PATH than '/bin' (the default)
# binlink location).
sudo -E hab pkg install core/powershell \
--binlink \
--binlink-dir="/usr/local/bin" \
--force \
--channel="stable" \
--channel="LTS-2024" \
--url="${HAB_BLDR_URL}"
echo "--- Using core/powershell version $(pwsh --version)"

echo "--- Installing latest core/pester from ${HAB_BLDR_URL}, stable channel"
echo "--- Installing latest core/pester from ${HAB_BLDR_URL}, LTS-2024 channel"
sudo -E hab pkg install core/pester \
--channel="stable" \
--channel="LTS-2024" \
--url="${HAB_BLDR_URL}"

sudo useradd --system --no-create-home hab
2 changes: 1 addition & 1 deletion .expeditor/scripts/verify/test_install_script.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Write-Host "--- Installing pester"
hab pkg install core/pester --channel stable
hab pkg install core/pester --channel LTS-2024
Import-Module "$(hab pkg path core/pester)\module\pester.psd1"
$env:HAB_NOCOLORING = "true"

Expand Down
2 changes: 1 addition & 1 deletion components/common/src/util/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ async fn interpreter_paths() -> Result<Vec<PathBuf>> {
Err(_) => {
match install::type_erased_start(&mut ui::NullUi::new(),
&default_bldr_url(),
&ChannelIdent::stable(),
&ChannelIdent::lts(),
&(ident.clone(),
PackageTarget::active_target())
.into(),
Expand Down
5 changes: 4 additions & 1 deletion components/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ pub const AUTH_TOKEN_ENVVAR: &str = "HAB_AUTH_TOKEN";
env_config_string!(#[derive(Deserialize, Serialize, Clone, Debug, Eq, Hash, PartialEq)]
pub ChannelIdent,
HAB_BLDR_CHANNEL,
ChannelIdent::STABLE);
ChannelIdent::LTS);

impl ChannelIdent {
const LTS: &'static str = "LTS-2024";
const STABLE: &'static str = "stable";
const UNSTABLE: &'static str = "unstable";

Expand All @@ -42,6 +43,8 @@ impl ChannelIdent {
pub fn stable() -> Self { Self::from(Self::STABLE) }

pub fn unstable() -> Self { Self::from(Self::UNSTABLE) }

pub fn lts() -> Self { Self::from(Self::LTS) }
}

impl fmt::Display for ChannelIdent {
Expand Down
4 changes: 2 additions & 2 deletions components/hab/src/cli/hab/pkg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ pub struct PkgDownload {
#[structopt(name = "CHANNEL",
short = "c",
long = "channel",
default_value = "stable",
default_value = "LTS-2024",
env = ChannelIdent::ENVVAR)]
channel: String,
/// The path to store downloaded artifacts
Expand Down Expand Up @@ -493,7 +493,7 @@ pub struct PkgInstall {
/// Install from the specified release channel
#[structopt(short = "c",
long = "channel",
default_value = "stable",
default_value = "LTS-2024",
env = ChannelIdent::ENVVAR)]
channel: String,
/// One or more Habitat package identifiers (ex: acme/redis) and/or filepaths to a Habitat
Expand Down
20 changes: 10 additions & 10 deletions components/pkg-export-container/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,14 @@ impl TryFrom<&ArgMatches> for BuildSpec {
hab_sup: m.get_one::<String>("HAB_SUP_PKG").unwrap().to_string(),
url: m.get_one::<String>("BLDR_URL").unwrap().to_string(),
channel: m.get_one::<String>("CHANNEL")
.unwrap_or(&"stable".to_string())
.unwrap_or(&"LTS-2024".to_string())
.to_string()
.into(),
base_pkgs_url: m.get_one::<String>("BASE_PKGS_BLDR_URL")
.unwrap()
.to_string(),
base_pkgs_channel: m.get_one::<String>("BASE_PKGS_CHANNEL")
.unwrap_or(&"stable".to_string())
.unwrap_or(&"LTS-2024".to_string())
.to_string()
.into(),
auth: m.get_one::<String>("BLDR_AUTH_TOKEN")
Expand Down Expand Up @@ -301,11 +301,11 @@ impl BuildSpec {
// and cacerts isn't really something that's going to need to
// be done
let busybox = if cfg!(target_os = "linux") {
Some(self.install_stable_pkg(ui, BUSYBOX_IDENT, rootfs).await?)
Some(self.install_lts_pkg(ui, BUSYBOX_IDENT, rootfs).await?)
} else {
None
};
let cacerts = self.install_stable_pkg(ui, CACERTS_IDENT, rootfs).await?;
let cacerts = self.install_lts_pkg(ui, CACERTS_IDENT, rootfs).await?;

Ok(BasePkgIdents { hab,
sup,
Expand Down Expand Up @@ -353,15 +353,15 @@ impl BuildSpec {
.await
}

async fn install_stable_pkg(&self,
ui: &mut UI,
ident_or_archive: &str,
fs_root_path: &Path)
-> Result<FullyQualifiedPackageIdent> {
async fn install_lts_pkg(&self,
ui: &mut UI,
ident_or_archive: &str,
fs_root_path: &Path)
-> Result<FullyQualifiedPackageIdent> {
self.install(ui,
ident_or_archive,
&self.base_pkgs_url,
&ChannelIdent::stable(),
&ChannelIdent::lts(),
fs_root_path,
None)
.await
Expand Down
4 changes: 2 additions & 2 deletions components/pkg-export-container/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ fn add_builder_args(cmd: Command) -> Command {
.arg(Arg::new("CHANNEL").long("channel")
.short('c')
.value_name("CHANNEL")
.default_value("stable")
.default_value("LTS-2024")
.help("Install packages from the specified release channel"))
.arg(Arg::new("BASE_PKGS_BLDR_URL").long("base-pkgs-url")
.value_name("BASE_PKGS_BLDR_URL")
Expand All @@ -112,7 +112,7 @@ fn add_builder_args(cmd: Command) -> Command {
specified URL"))
.arg(Arg::new("BASE_PKGS_CHANNEL").long("base-pkgs-channel")
.value_name("BASE_PKGS_CHANNEL")
.default_value("stable")
.default_value("LTS-2024")
.help("Install base packages from the specified release"))
.arg(Arg::new("BLDR_AUTH_TOKEN").long("auth")
.short('z')
Expand Down
8 changes: 4 additions & 4 deletions components/pkg-export-container/src/naming.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,9 @@ mod tests {
("{{pkg_origin}}-{{pkg_name}}-{{pkg_version}}-{{pkg_release}}",
Some("core-foo-1.2.3-20200430153200")),
("{{pkg_origin}}-{{pkg_name}}-{{pkg_version}}-{{pkg_release}}-{{channel}}",
Some("core-foo-1.2.3-20200430153200-stable")),
Some("core-foo-1.2.3-20200430153200-lts-2024")),
("super-{{pkg_origin}}-wacky-{{pkg_name}}-funtime-{{pkg_version}}-container-{{pkg_release}}-party-{{channel}}-ohemgee",
Some("super-core-wacky-foo-funtime-1.2.3-container-20200430153200-party-stable-ohemgee")),
Some("super-core-wacky-foo-funtime-1.2.3-container-20200430153200-party-lts-2024-ohemgee")),

// Invalid inputs
("{{" , None),
Expand Down Expand Up @@ -407,9 +407,9 @@ mod tests {
("{{pkg_origin}}-{{pkg_name}}-{{pkg_version}}-{{pkg_release}}",
Some("core-foo-1.2.3-20200430153200")),
("{{pkg_origin}}-{{pkg_name}}-{{pkg_version}}-{{pkg_release}}-{{channel}}",
Some("core-foo-1.2.3-20200430153200-stable")),
Some("core-foo-1.2.3-20200430153200-lts-2024")),
("super-{{pkg_origin}}-wacky-{{pkg_name}}-funtime-{{pkg_version}}-container-{{pkg_release}}-party-{{channel}}-ohemgee",
Some("super-core-wacky-foo-funtime-1.2.3-container-20200430153200-party-stable-ohemgee")),
Some("super-core-wacky-foo-funtime-1.2.3-container-20200430153200-party-lts-2024-ohemgee")),

// Invalid inputs
("{{" , None),
Expand Down
14 changes: 7 additions & 7 deletions components/pkg-export-tar/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ impl<'a> BuildSpec<'a> {
// something other than a "base" package... replacing busybox
// isn't really something that's going to need to be done.
let busybox = if cfg!(target_os = "linux") {
Some(self.install_stable_pkg(ui, BUSYBOX_IDENT, rootfs).await?)
Some(self.install_lts_pkg(ui, BUSYBOX_IDENT, rootfs).await?)
} else {
None
};
Expand All @@ -185,15 +185,15 @@ impl<'a> BuildSpec<'a> {
.await
}

async fn install_stable_pkg(&self,
ui: &mut UI,
ident_or_archive: &str,
fs_root_path: &Path)
-> Result<PackageIdent> {
async fn install_lts_pkg(&self,
ui: &mut UI,
ident_or_archive: &str,
fs_root_path: &Path)
-> Result<PackageIdent> {
self.install(ui,
ident_or_archive,
self.base_pkgs_url,
&ChannelIdent::stable(),
&ChannelIdent::lts(),
fs_root_path,
None)
.await
Expand Down
4 changes: 2 additions & 2 deletions components/pkg-export-tar/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub(crate) struct Cli {
long = "channel",
short = 'c',
value_name = "CHANNEL",
default_value = "stable")]
default_value = "LTS-2024")]
pub(crate) channel: String,

/// URL to install base packages from
Expand All @@ -73,7 +73,7 @@ pub(crate) struct Cli {
#[arg(name = "BASE_PKGS_CHANNEL",
long = "base-pkgs-channel",
value_name = "BASE_PKGS_CHANNEL",
default_value = "stable")]
default_value = "LTS-2024")]
pub(crate) base_pkgs_channel: String,

/// Provide a Builder auth token for private pkg export
Expand Down
2 changes: 1 addition & 1 deletion components/sup/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ mod test {
#[test]
fn update_channel_is_set_to_default_when_not_specified() {
let config = config_from_cmd_str("hab-sup run");
assert_eq!(config.update_channel, ChannelIdent::stable());
assert_eq!(config.update_channel, ChannelIdent::lts());
}

#[test]
Expand Down
4 changes: 2 additions & 2 deletions components/sup/src/manager/service/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl ServiceSpec {
Self { ident,
group: DEFAULT_GROUP.to_string(),
bldr_url: DEFAULT_BLDR_URL.to_string(),
channel: ChannelIdent::stable(),
channel: ChannelIdent::lts(),
topology: Topology::default(),
update_strategy: UpdateStrategy::default(),
update_condition: UpdateCondition::default(),
Expand Down Expand Up @@ -762,7 +762,7 @@ mod test {
assert_eq!(spec.binds,
vec![ServiceBind::from_str("cache:redis.cache@acmecorp").unwrap(),
ServiceBind::from_str("db:postgres.app@acmecorp").unwrap(),]);
assert_eq!(spec.channel, ChannelIdent::stable());
assert_eq!(spec.channel, ChannelIdent::lts());
assert_eq!(spec.config_from,
Some(PathBuf::from("/only/for/development")));

Expand Down
2 changes: 1 addition & 1 deletion e2e_local_raw_command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fi
# use.
commands=(". /opt/ci-studio-common/buildkite-agent-hooks/ci-studio-common.sh"
".expeditor/scripts/end_to_end/setup_environment.sh dev"
"hab pkg install --binlink --channel=stable core/expect"
"hab pkg install --binlink --channel=LTS-2024 core/expect"
"${*}")

# Add a `;` after every command, for feeding into the container. This
Expand Down
2 changes: 1 addition & 1 deletion test/end-to-end/multi-supervisor/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu

# Channel from which to install Habitat-related packages
ARG CHANNEL=stable
ARG CHANNEL=LTS-2024

# Bootstrap the installation of Habitat
RUN apt-get update && apt-get -y install curl
Expand Down
4 changes: 2 additions & 2 deletions test/end-to-end/multi-supervisor/supervisor/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM alpine as build_image

# All Supervisor-related packages will be downloaded from this channel
# on Builder.
ARG CHANNEL=stable
ARG CHANNEL=LTS-2024

# Always accept the license when we run this image.
ENV HAB_LICENSE=accept-no-persist
Expand All @@ -21,7 +21,7 @@ RUN apk add bash wget \
RUN hab pkg install --channel="${CHANNEL}" core/hab \
&& hab pkg install --channel="${CHANNEL}" core/hab-sup \
&& hab pkg install --channel="${CHANNEL}" core/hab-launcher \
&& hab pkg install --channel="stable" core/busybox \
&& hab pkg install --channel="LTS-2024" core/busybox \
&& hab pkg binlink core/hab -d /hab/bin

# Create enough of a filesystem for the Supervisor to operate. We
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Describe "Clean hab installation" {
$LASTEXITCODE | Should -Be 0
}
It "can talk to builder" {
hab pkg install core/redis --channel stable
hab pkg install core/redis --channel LTS-2024
$LASTEXITCODE | Should -Be 0
}
}
18 changes: 9 additions & 9 deletions test/end-to-end/test_pkg_download.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -64,27 +64,27 @@ Describe "hab pkg download" {
}
}

It "'hab pkg download --channel stable --download-directory $cacheDir core/gzip' succeeds" {
hab pkg download --channel stable --download-directory $cacheDir core/gzip
It "'hab pkg download --channel LTS-2024 --download-directory $cacheDir core/gzip' succeeds" {
hab pkg download --channel LTS-2024 --download-directory $cacheDir core/gzip
Test-GzipIdent
}
It "'hab pkg download --channel stable --download-directory $cacheDir --file $identFile' succeeds" {
It "'hab pkg download --channel LTS-2024 --download-directory $cacheDir --file $identFile' succeeds" {
Set-Content $identFile -Value "core/gzip"
hab pkg download --channel stable --download-directory $cacheDir --file $identFile
hab pkg download --channel LTS-2024 --download-directory $cacheDir --file $identFile
Test-GzipIdent
}
It "'hab pkg download --channel stable --download-directory $cacheDir --file $identFile' succeeds with comments and empty lines" {
It "'hab pkg download --channel LTS-2024 --download-directory $cacheDir --file $identFile' succeeds with comments and empty lines" {
Set-Content $identFile -Value @"
# this is a series
# of comments, followed by empty lines and whitespaces

core/gzip
"@
hab pkg download --channel stable --download-directory $cacheDir --file $identFile
hab pkg download --channel LTS-2024 --download-directory $cacheDir --file $identFile
Test-GzipIdent
}
It "'hab pkg download --channel stable --download-directory $cacheDir core/rust --target=x86_64-windows' succeeds" {
hab pkg download --channel stable --download-directory $cacheDir core/rust --target=x86_64-windows
It "'hab pkg download --channel LTS-2024 --download-directory $cacheDir core/rust --target=x86_64-windows' succeeds" {
hab pkg download --channel LTS-2024 --download-directory $cacheDir core/rust --target=x86_64-windows
Test-RustIdent
}
It "fails when package is invalid" {
Expand All @@ -97,7 +97,7 @@ Describe "hab pkg download" {
}
It "fails when invalid package is provided in file" {
Set-Content $identFile -Value "arglebargle"
hab pkg download --channel stable --download-directory $cacheDir --file $identFile
hab pkg download --channel LTS-2024 --download-directory $cacheDir --file $identFile
$LASTEXITCODE | Should -Not -Be 0
}
It "fails when package does not exist" {
Expand Down
Loading
Loading