Skip to content

feat(hpc): enhance Lmod with source install and cache rebuild (#634)#655

Merged
adolago merged 1 commit intomainfrom
hpc/634-lmod-enhance
Feb 16, 2026
Merged

feat(hpc): enhance Lmod with source install and cache rebuild (#634)#655
adolago merged 1 commit intomainfrom
hpc/634-lmod-enhance

Conversation

@adolago
Copy link
Owner

@adolago adolago commented Feb 16, 2026

Summary

  • Add install_method parameter (package/source) for flexible Lmod deployment
  • Add rebuild_cache parameter for spider cache refresh
  • Add unit tests for module metadata, params, and OS detection

Closes #634

Test plan

  • cargo clippy --features full-hpc passes
  • cargo test --features full-hpc --lib -- lmod::tests — 4 tests pass

🤖 Generated with Claude Code

Add install_method param (package/source) for flexible Lmod deployment,
rebuild_cache param for spider cache refresh, and unit tests.

Closes #634

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@adolago adolago merged commit ec91d95 into main Feb 16, 2026
12 of 14 checks passed
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a227a9611b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +202 to +203
"cd /tmp && curl -sL https://github.com/TACC/Lmod/archive/{}.tar.gz | tar xz && cd Lmod-{} && ./configure --prefix=/usr/local && make install",
version, version

Choose a reason for hiding this comment

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

P1 Badge Source Lmod init from the source-install prefix

This branch installs Lmod with --prefix=/usr/local, but the profile script generated later in execute still only checks /usr/share/lmod/lmod/init/bash (lines 247-248), so install_method: source on a host without the package install leaves login shells without module initialization. In that scenario the module reports success, but users cannot actually use Lmod from their shell startup.

Useful? React with 👍 / 👎.

Comment on lines +193 to +195
let build_deps = match os_family {
"rhel" => "dnf install -y lua lua-posix lua-filesystem gcc make tcl",
_ => "DEBIAN_FRONTEND=noninteractive apt-get install -y lua5.3 liblua5.3-dev lua-posix lua-filesystem tcl make",

Choose a reason for hiding this comment

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

P2 Badge Install curl in source-install dependencies

The source-install path downloads the tarball with curl, but the dependency install commands here do not include curl; on minimal RHEL/Debian images where curl is not preinstalled, the next command fails before build/install begins. This makes install_method: source non-functional in common clean-node environments.

Useful? React with 👍 / 👎.

Comment on lines +289 to +292
if ok {
changed = true;
changes.push("Rebuilt Lmod spider cache".to_string());
}

Choose a reason for hiding this comment

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

P2 Badge Fail when requested spider cache rebuild does not run

When rebuild_cache is true, failures of both cache-update commands are silently ignored because only the success path mutates state and there is no else error path. If the script is missing or not executable, the module still returns success with no indication that the requested cache rebuild was not performed.

Useful? React with 👍 / 👎.

@adolago adolago deleted the hpc/634-lmod-enhance branch February 17, 2026 17:28
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.

[HPC PR 19] Implement Lmod module management (SW-01)

1 participant

Comments