Compare commits

...

15 Commits

Author SHA1 Message Date
9490a06303 Merge branch 'automated/npins-update-20260123' into 'main'
chore: update npins dependencies

See merge request oceanbox/Poseidon!147
2026-01-23 13:34:02 +01:00
5fb1ae0678 Merge branch 'main' into 'automated/npins-update-20260123'
# Conflicts:
#   nix/sources.json
2026-01-23 13:13:42 +01:00
97c03e216b chore: update npins dependencies
Automated update of Nix dependencies via npins.

    Updated packages:
    +      "hash": "sha256-XH6awru9NnBc/m+2YhRNT8r1PAKEiPGF3gs//F3ods0="
+      "revision": "a1ef738813b15cf8ec759bdff5761b027e3e1d23",
+      "hash": "sha256-Efs3VUPelRduf3PpfPP2ovEB4CXT7vHf8W+xc49RL/U="
2026-01-23 12:11:33 +00:00
semantic-release-bot
bab4490847 chore(release): 1.40.5
## [1.40.5](https://gitlab.com/oceanbox/Poseidon/compare/v1.40.4...v1.40.5) (2026-01-21)

### Bug Fixes

* **xtractor:** Reduce to 4 cores per task ([8e824d4](8e824d4afa))
2026-01-21 12:52:40 +00:00
8e824d4afa fix(xtractor): Reduce to 4 cores per task 2026-01-21 13:49:19 +01:00
semantic-release-bot
777cf1a31d chore(release): 1.40.4
## [1.40.4](https://gitlab.com/oceanbox/Poseidon/compare/v1.40.3...v1.40.4) (2026-01-21)

### Bug Fixes

* **xtractor:** Reduce core requirement to 8 ([efacb2a](efacb2a332))
2026-01-21 09:41:49 +00:00
efacb2a332 fix(xtractor): Reduce core requirement to 8
This means we can run 8 in parallelle on the 64 core nodes.
Since it's very IO heavy.
2026-01-21 10:38:06 +01:00
semantic-release-bot
17c4e9dd22 chore(release): 1.40.3
## [1.40.3](https://gitlab.com/oceanbox/Poseidon/compare/v1.40.2...v1.40.3) (2026-01-20)

### Bug Fixes

* **inbox|xtracto:** Delete/Read msg and allow non-ascii xtractor names ([d8d5e07](d8d5e076ba))
* **multiauth:** Add clientId to redirect on signout ([54c40d7](54c40d7acc))
2026-01-20 14:41:54 +00:00
503ccbb2ad Merge branch 'mrtz/oae' into 'main'
fix(inbox|xtractor): Delete/Read msg and allow non-ascii xtractor names

See merge request oceanbox/Poseidon!146
2026-01-20 15:39:09 +01:00
54c40d7acc fix(multiauth): Add clientId to redirect on signout
Previously we used `id_token_hint`, but it's saved in the cookie.
This will instead require a client_id (which identifies your application),
so Keycloak knows which application you’re requesting a redirect for.
2026-01-20 14:04:46 +01:00
d8d5e076ba fix(inbox|xtracto): Delete/Read msg and allow non-ascii xtractor names 2026-01-20 13:35:48 +01:00
semantic-release-bot
fd2b3fe691 chore(release): 1.40.2
## [1.40.2](https://gitlab.com/oceanbox/Poseidon/compare/v1.40.1...v1.40.2) (2026-01-19)

### Bug Fixes

* **xtract:** Disabled if not allowed to simulate transport ([e429a85](e429a855e5))
2026-01-19 19:06:55 +00:00
6ae7a7dac8 Merge branch 'mrtz/disable-xtract' into 'main'
fix(xtract): Disabled if not allowed to simulate transport

See merge request oceanbox/Poseidon!145
2026-01-19 20:04:00 +01:00
e429a855e5 fix(xtract): Disabled if not allowed to simulate transport 2026-01-19 19:43:24 +01:00
semantic-release-bot
9ed60b7cc8 chore(release): 1.40.1
## [1.40.1](https://gitlab.com/oceanbox/Poseidon/compare/v1.40.0...v1.40.1) (2026-01-19)

### Bug Fixes

* fix tilt build on net10 ([d5cde19](d5cde19250))
2026-01-19 16:15:18 +00:00
11 changed files with 82 additions and 56 deletions

View File

@@ -1,5 +1,41 @@
# Changelog
## [1.40.5](https://gitlab.com/oceanbox/Poseidon/compare/v1.40.4...v1.40.5) (2026-01-21)
### Bug Fixes
* **xtractor:** Reduce to 4 cores per task ([8e824d4](https://gitlab.com/oceanbox/Poseidon/commit/8e824d4afa0b03f59e006d3a0d50fb216e71483e))
## [1.40.4](https://gitlab.com/oceanbox/Poseidon/compare/v1.40.3...v1.40.4) (2026-01-21)
### Bug Fixes
* **xtractor:** Reduce core requirement to 8 ([efacb2a](https://gitlab.com/oceanbox/Poseidon/commit/efacb2a3322de0ced45db4eec240846f4e371a75))
## [1.40.3](https://gitlab.com/oceanbox/Poseidon/compare/v1.40.2...v1.40.3) (2026-01-20)
### Bug Fixes
* **inbox|xtracto:** Delete/Read msg and allow non-ascii xtractor names ([d8d5e07](https://gitlab.com/oceanbox/Poseidon/commit/d8d5e076baf8b559200f2da91237f9874678b216))
* **multiauth:** Add clientId to redirect on signout ([54c40d7](https://gitlab.com/oceanbox/Poseidon/commit/54c40d7accc4bbc43f66dda0df647ccac482a2b0))
## [1.40.2](https://gitlab.com/oceanbox/Poseidon/compare/v1.40.1...v1.40.2) (2026-01-19)
### Bug Fixes
* **xtract:** Disabled if not allowed to simulate transport ([e429a85](https://gitlab.com/oceanbox/Poseidon/commit/e429a855e5bd00493e2f99647092aebce9c99a2a))
## [1.40.1](https://gitlab.com/oceanbox/Poseidon/compare/v1.40.0...v1.40.1) (2026-01-19)
### Bug Fixes
* fix tilt build on net10 ([d5cde19](https://gitlab.com/oceanbox/Poseidon/commit/d5cde19250847f7b091cfa5f65eb703405c202b6))
# [1.40.0](https://gitlab.com/oceanbox/Poseidon/compare/v1.39.2...v1.40.0) (2026-01-16)

View File

@@ -1 +1 @@
1.40.0
1.40.5

View File

@@ -28,8 +28,8 @@
"nixpkgs": {
"type": "Channel",
"name": "nixpkgs-unstable",
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.05pre927565.13868c071cc7/nixexprs.tar.xz",
"hash": "sha256-wufp5c0nWh/87f9eK7xy1eZXms5zd4yl6S4SR+LfA08="
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.05pre930822.ed142ab1b3a0/nixexprs.tar.xz",
"hash": "sha256-XH6awru9NnBc/m+2YhRNT8r1PAKEiPGF3gs//F3ods0="
},
"pre-commit": {
"type": "Git",
@@ -40,9 +40,9 @@
},
"branch": "master",
"submodules": false,
"revision": "f0927703b7b1c8d97511c4116eb9b4ec6645a0fa",
"url": "https://github.com/cachix/git-hooks.nix/archive/f0927703b7b1c8d97511c4116eb9b4ec6645a0fa.tar.gz",
"hash": "sha256-6MkqajPICgugsuZ92OMoQcgSHnD6sJHwk8AxvMcIgTE="
"revision": "a1ef738813b15cf8ec759bdff5761b027e3e1d23",
"url": "https://github.com/cachix/git-hooks.nix/archive/a1ef738813b15cf8ec759bdff5761b027e3e1d23.tar.gz",
"hash": "sha256-Efs3VUPelRduf3PpfPP2ovEB4CXT7vHf8W+xc49RL/U="
}
},
"version": 7

View File

@@ -24,7 +24,7 @@ pkgs.mkShellNoCC {
# JavaScript
pkgs.bun
pkgs.nodejs
pkgs.nodejs_25
# Devlopment tools
pkgs.npins

View File

@@ -14,7 +14,7 @@ pack_path := "../../packages"
vite_prod := "bunx --bun vite build -c ../../vite.config.js -m production --emptyOutDir --outDir " + "../../dist/public"
vite_dev := "bunx --bun vite build -c ../../vite.config.js -m development --minify false --sourcemap true --emptyOutDir --outDir " + "../../dist/public"
vite := "bunx --bun vite -c ../../vite.config.js -m development "
vite := "bunx vite -c ../../vite.config.js -m development "
# Default recipe - show available commands
default:

View File

@@ -43,16 +43,16 @@ let inboxDialog
let table = document.getElementById "inbox-table"
async {
let! mbox = Remoting.inboxApi().getMessages ()
// if mbox.Length = 0 then
// table?items <- [| {
// id = Guid.Empty
// content = ""
// unread = false
// type' = MessageType.Note
// created = DateTime.Now
// } |]
// else
table?items <- mbox
if mbox.Length = 0 then
table?items <- [| {
id = Guid.Empty
content = ""
unread = false
type' = MessageType.Note
created = DateTime.Now
} |]
else
table?items <- mbox
} |> Async.StartImmediate
Hook.useEffectOnChange(arg.unread, loadMessages)
@@ -65,30 +65,18 @@ let inboxDialog
|> Set.ofSeq
|> setSelected
let doDelete _ =
let doDelete selected _ =
let table = document.getElementById "inbox-table"
let selectedSet : Guid JS.Set = table?selectedSet
let items: InboxItem array = table?items
async {
let toDelete =
items
|> Array.filter (fun item -> selectedSet.has(item.id))
|> Array.map (fun item -> item.id)
console.debug("Deleting", toDelete.Length, "messages")
items
|> Array.filter (fun item -> Set.contains item.id selected)
|> Array.iter (fun item ->
console.log("Delete: %A", item.content)
do arg.deleteMessage item.id
)
for id in toDelete do
arg.deleteMessage id
// Clear selection immediately
selectedSet.clear()
setSelected Set.empty
// Wait a bit for server to process, then reload
do! Async.Sleep 200
let! mbox = Remoting.inboxApi().getMessages ()
table?items <- mbox
} |> Async.StartImmediate
loadMessages ()
let doRead selected _ =
let table = document.getElementById "inbox-table"
@@ -118,7 +106,7 @@ let inboxDialog
html $"""
<sp-field-group horizontal>
<sp-action-button
@click={Ev(doDelete)}
@click={Ev(doDelete selected)}
?disabled={selected.Count = 0}>
<sp-icon-delete slot="icon"></sp-icon-delete> Delete selected
</sp-action-button>
@@ -308,11 +296,8 @@ let inboxDialog
let sortFn = if sortDir = "asc" then Array.sortBy else Array.sortByDescending
table?items
|> sortFn (fun item -> JS.expr_js $"{item}[{sortKey}]")
|> fun items -> table?items <- items))
let table =
html $"""
"""
|> fun items -> table?items <- items)
)
html $"""
<div class="inbox-dialog">

View File

@@ -100,7 +100,7 @@ let private simAccordion (dispatch: Msg -> unit) model =
console.debug $"policies: %A{model.simPolicies}"
let disabled = model.archive.id = Guid.Empty
// TODO(mrtz): Create custom policy for plumes, for now just inherit from drifters.
// TODO(mrtz): Create custom policy for plume and xtract, for now just inherit from drifters.
let disabledPlume =
model.simPolicies |> Array.contains (DriftersPolicy.SubmitTransport false)
let disabledXtract =
@@ -189,7 +189,7 @@ let private simAccordion (dispatch: Msg -> unit) model =
<sp-action-button
static="primary"
style="flex-grow: 1"
?disabled={disabled}
?disabled={disabledXtract }
@click={Ev (chooseMode (DataExtraction DefaultXtract))}
>
Extract Data

View File

@@ -84,7 +84,7 @@ type XtractActor(host: ActorHost, slurm: SlurmClient, settings: Common.Settings,
let grp = if g.Length > 0 then g[0] else ""
let dep = None
let part = partition |> Option.defaultValue "short"
let cpt = 16
let cpt = 4
taskResult {
let! archiveName =

View File

@@ -101,20 +101,20 @@ type IPrincipalActor =
inherit IActor
abstract IsActive: unit: unit -> Task<bool>
abstract IsRegistered: unit: unit -> Task<bool>
abstract GetGroups: unit: unit -> Task<string[]>
abstract GetRoles: unit: unit -> Task<string[]>
abstract GetGroups: unit: unit -> Task<string array>
abstract GetRoles: unit: unit -> Task<string array>
abstract Register: unit: unit -> Task<bool>
abstract Activate: unit: unit -> Task<bool>
abstract Disable: unit: unit -> Task<bool>
type UserCredentials = { username: string; password: string }
// needed by signalr
// NOTE: Needed by signalr
type UserIdProvider() =
interface IUserIdProvider with
member this.GetUserId(ctx: HubConnectionContext) =
let uid = ctx.User.Identity.Name
Log.Verbose $"UserIdProvider: {uid}"
Log.Verbose $"UserIdProvider: %s{uid}"
uid
[<RequireQualifiedAccess>]
@@ -130,6 +130,7 @@ let tryStr str =
None
else
Some str
let tryGetEnv =
Environment.GetEnvironmentVariable
>> tryStr
@@ -140,7 +141,7 @@ let authorize: HttpHandler =
let addGroupsAndRoles (principal: ClaimsPrincipal) : Async<bool> =
let addToIdentity (identity: ClaimsIdentity) ctype cc =
eprintfn $"[MultiAuth] Adding claim {ctype} to principal: %A{cc}"
eprintfn $"[MultiAuth] Adding claim %s{ctype} to principal: %A{cc}"
cc
|> Array.choose (fun g ->
if not (principal.HasClaim (fun claim -> claim.Type = ctype && claim.Value = g)) then
@@ -295,14 +296,18 @@ let oidOptions (settings: MultiAuthSettings) (o: OpenIdConnectOptions) =
fun e ->
task {
eprintfn "[MultiAuth] RedirectToIdentityProvider: %A" e.Request.Host.Value
// hack for https behind proxy
e.ProtocolMessage.ClientId <- settings.oidc.clientId
// HACK: For https behind proxy
e.ProtocolMessage.RedirectUri <- $"https://{e.Request.Host.Value}/signin-oidc"
return ()
}
o.Events.OnRedirectToIdentityProviderForSignOut <-
fun e ->
task {
// hack for https behind proxy
eprintfn "[MultiAuth] OnRedirectToIdentityProviderForSignOut: %A" e.Request.Host.Value
// HACK: Avoid saving tokens
e.ProtocolMessage.ClientId <- settings.oidc.clientId
// HACK: For https behind proxy
e.ProtocolMessage.PostLogoutRedirectUri <- $"https://{e.Request.Host.Value}/signout-callback-oidc"
return ()
}

View File

@@ -4,7 +4,7 @@
<OutputType>Library</OutputType>
<TargetFramework>net10.0</TargetFramework>
<PackageId>Oceanbox.ServerPack</PackageId>
<Version>1.40.0</Version>
<Version>1.40.5</Version>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IsPackable>true</IsPackable>

View File

@@ -251,7 +251,7 @@ module Xtract =
Log.Debug $"Sorcerer.Xtract.downloadZip: user={username}, archiveId={archiveId}, jobId={jobId}"
let fileName = $"/data/archives/xtract/{username}/{jobId}/xtract.zip"
if File.Exists fileName then
(setHttpHeader "Content-Disposition" $"attachment; filename={outname}.zip" >=> streamFile true fileName None None) next ctx
(setHttpHeader "Content-Disposition" $"attachment; filename=site-report.zip" >=> streamFile true fileName None None) next ctx
else
Log.Warning $"Xtract file not found: {fileName}"
RequestErrors.NOT_FOUND "File not found" next ctx