Skip to content

fix: Handle all firecrest FS types#1124

Draft
sambuc wants to merge 4 commits into
feat/secrets-and-dc-in-hpc-sessionsfrom
sambuc/handle-all-fc-fs-types
Draft

fix: Handle all firecrest FS types#1124
sambuc wants to merge 4 commits into
feat/secrets-and-dc-in-hpc-sessionsfrom
sambuc/handle-all-fc-fs-types

Conversation

@sambuc
Copy link
Copy Markdown
Contributor

@sambuc sambuc commented May 20, 2026

  • Simplify the logic, as we only want to handle specifically the "Users" fs type for now.
  • For "Users" fs, use fs.Path/${USER} instead of letting the user see a huge list of inaccessible private folders.
  • Add a check on the length of secretPath and add it only if the string is not empty.

@sambuc sambuc requested review from a team and olevski as code owners May 20, 2026 06:12
@sambuc sambuc marked this pull request as draft May 20, 2026 06:12
sambuc added 4 commits May 20, 2026 14:38
Simplify the logic, as we only want to handle specifically the "Users"
fs type for now.

Also add a check on the length of secretPath and add it only if the
string is not empty.
@sambuc sambuc force-pushed the sambuc/handle-all-fc-fs-types branch from 157cd43 to 0e81035 Compare May 20, 2026 12:39
if home != nil {
mounts = append(mounts, fmt.Sprintf("%s:/home%s:ro", home.Path, home.Path))
// Add the secrets mount
if len(secretsPath) > 0 {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Effective go:

Suggested change
if len(secretsPath) > 0 {
if secretsPath != "" {

home = &fs
// TODO: Try to mount home at its location (need to handle ~/.bashrc)
// TODO: Alternatively, copy the contents in the container
mounts = append(mounts, fmt.Sprintf("%s/${USER}:/home%s/${USER}:ro", fs.Path, fs.Path))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please don't interpolate ${USER}. This is potentially breaking.

Suggested change
mounts = append(mounts, fmt.Sprintf("%s/${USER}:/home%s/${USER}:ro", fs.Path, fs.Path))
mounts = append(mounts, fmt.Sprintf("%s:/home%s:ro", fs.Path, fs.Path))

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