Skip to content

Commit

Permalink
IM2/Slurm: Fixes two separate bugs
Browse files Browse the repository at this point in the history
requestDynamicParameters no longer crashes in certain scenarios

Lmod module parsing is now more roboust
  • Loading branch information
DanThrane committed Mar 11, 2025
1 parent e774f9e commit 1bfceef
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion backend/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2025.2.106
2025.2.107
16 changes: 9 additions & 7 deletions provider-integration/im2/macos_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ docker exec -it ucloud-im2-macos-builder-arm64 bash -c '
CGO_ENABLED=1 go build -o bin/ucloud_aarch64 -trimpath ucloud.dk/cmd/ucloud-im
'

version=`cat ../../backend/version.txt`
docker buildx build \
-f macosbuilder.Dockerfile \
--push \
--tag dreg.cloud.sdu.dk/ucloud/im2:${version} \
--platform linux/arm64/v8,linux/amd64 \
.
if [ -z "NO_DOCKER" ]; then
version=`cat ../../backend/version.txt`
docker buildx build \
-f macosbuilder.Dockerfile \
--push \
--tag dreg.cloud.sdu.dk/ucloud/im2:${version} \
--platform linux/arm64/v8,linux/amd64 \
.
fi
1 change: 1 addition & 0 deletions provider-integration/im2/pkg/im/services/slurm/compute.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ func requestDynamicParameters(owner orc.ResourceOwner, app *orc.Application) []o
Applications: ServiceConfig.Compute.Applications,
RequiredApplications: appsToLoad,
VersionPolicy: "loose",
PreviouslyLoaded: make(map[orc.NativeApplication]appCfgAndVersion),
}

var failedToLoad []string
Expand Down
10 changes: 5 additions & 5 deletions provider-integration/im2/pkg/im/services/slurm/slurm_modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (
)

type LmodModuleGroup struct {
Versions []LmodModule `json:"versions"`
Package string `json:"package"`
Url util.Option[string] `json:"url"`
DefaultVersionName string `json:"defaultVersionName"`
Description string `json:"description"`
Versions []LmodModule `json:"versions"`
Package string `json:"package"`
Url util.Option[string] `json:"url"`
Description string `json:"description"`
// NOTE(Dan): defaultVersionName very rarely sends "defaultVersionName": false which breaks the naive implementation
}

type LmodModule struct {
Expand Down

0 comments on commit 1bfceef

Please sign in to comment.