Repository navigation
Conversation
Restore `docs/researchers/spe-with-weskit.md` as it was before af8ea05 (#155) deleted it, the latest version of the SPE tutorial of 7faca00, and its nav entry under Researchers. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Documentation build overview
|
Reviewer's GuideConfigurationRestore the SPE with WESkit page in the Researchers navigation so readers can find it.
DocumentationRestore the SPE tutorial and its entry on the researchers’ start page.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Linked issuesChecked at commit c4da38b #193 SPE with WESkit page was deleted in #155 · 3 of 4 met · 1 to check by hand
|
There was a problem hiding this comment.
Hey - I've found 9 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="docs/researchers/spe-with-weskit.md" line_range="64" />
<code_context>
+ [BiBiGrid](https://cloud.denbi.de/wiki/Tutorials/BiBiGrid/) in the
+ [de.NBI Cloud](https://www.denbi.de/cloud), or use any other Slurm cluster.
+3. **Deploy an S3 server.** Create a bucket `results`, and give all
+ authorized users read access to it.
+4. **Copy the results.** A script that runs as a cron job (see below) copies
+ the files that may leave the cluster into the bucket.
</code_context>
<issue_to_address>
**Researchers see other cohorts’ results**
When researchers authorized for different runs or data cohorts use the same SPE, the shared `results` bucket grants every authorized user access to every run, so researchers can read other cohorts’ outputs they are not permitted to see.
Restrict access to each run’s results to the researchers permitted to see that run instead of granting all authorized users access to the shared bucket.
Also at `docs/researchers/spe-with-weskit.md:105`.
</issue_to_address>
### Comment 2
<location path="docs/researchers/spe-with-weskit.md" line_range="104-106" />
<code_context>
+ local bucketname=$(basename $dir)
+ if [[ ! -f "$dir/upload_token" ]]; then
+ if [ -f "$dir/plots/quals.svg" ]; then
+ mc mb --ignore-existing local/results/$bucketname &&
+ mc cp $dir/results.csv local/results/$bucketname &&
+ touch "$dir/upload_token";
+ else
+ touch "$dir/upload_token"
</code_context>
<issue_to_address>
**Sensitive results are published without approval**
When a run produces `plots/quals.svg` and its `results.csv` contains sensitive or otherwise unapproved data, `process_directory` treats the plot marker as approval and uploads `results.csv` without checking its contents or an operator-controlled release decision, exposing the data to users authorized for the results bucket.
Require an operator-controlled release decision and check or filter `results.csv` before uploading it.
</issue_to_address>
### Comment 3
<location path="docs/researchers/spe-with-weskit.md" line_range="102" />
<code_context>
+process_directory() {
+ local dir="$1"
+ local bucketname=$(basename $dir)
+ if [[ ! -f "$dir/upload_token" ]]; then
+ if [ -f "$dir/plots/quals.svg" ]; then
+ mc mb --ignore-existing local/results/$bucketname &&
</code_context>
<issue_to_address>
**Later run results are skipped**
When multiple completed runs have log directories under the same `$dir`, `process_directory` checks and creates `upload_token` on the parent directory, so after the first run creates it, later calls return without uploading their results.
Track the upload token separately for each run and pass each run’s directory to `process_directory`.
Also at `docs/researchers/spe-with-weskit.md:117`.
</issue_to_address>
### Comment 4
<location path="docs/researchers/spe-with-weskit.md" line_range="117" />
<code_context>
+ for logsdir in "$dir".weskit/*/; do
+ if [ -d "$logsdir" ]; then
+ if [ -f "$logsdir/log.json" ]; then
+ process_directory $dir
+ fi
+ fi
</code_context>
<issue_to_address>
**Paths with spaces break uploads**
When a run directory path contains spaces, the unquoted `$dir` in the call to `process_directory` undergoes shell word splitting, so the function uses only the first path fragment and its checks and copy target the wrong path; the results are not uploaded.
Quote `$dir` in the `process_directory` call.
Also at `docs/researchers/spe-with-weskit.md:105`.
</issue_to_address>
### Comment 5
<location path="docs/researchers/spe-with-weskit.md" line_range="102-106" />
<code_context>
+process_directory() {
+ local dir="$1"
+ local bucketname=$(basename $dir)
+ if [[ ! -f "$dir/upload_token" ]]; then
+ if [ -f "$dir/plots/quals.svg" ]; then
+ mc mb --ignore-existing local/results/$bucketname &&
+ mc cp $dir/results.csv local/results/$bucketname &&
+ touch "$dir/upload_token";
+ else
+ touch "$dir/upload_token"
</code_context>
<issue_to_address>
**Concurrent cron runs upload results twice**
When two cron instances process the same completed run at the same time, both cron instances pass the missing-token check before either creates `upload_token`, so both run `mc cp` for the same run. This repeats the upload and, with bucket versioning enabled, creates duplicate object versions despite the page promising one upload per run.
Use a per-run lock or another atomic claim so only one cron instance uploads a run.
</issue_to_address>
### Comment 6
<location path="docs/researchers/spe-with-weskit.md" line_range="101-105" />
<code_context>
+
+process_directory() {
+ local dir="$1"
+ local bucketname=$(basename $dir)
+ if [[ ! -f "$dir/upload_token" ]]; then
+ if [ -f "$dir/plots/quals.svg" ]; then
+ mc mb --ignore-existing local/results/$bucketname &&
+ mc cp $dir/results.csv local/results/$bucketname &&
+ touch "$dir/upload_token";
+ else
</code_context>
<issue_to_address>
**Different runs overwrite the same result**
When two run directories under different parents have the same basename, both runs derive the same `bucketname` from their directory basename, so `mc cp` writes them to the same object key. The later upload replaces the earlier run's results, and users see only one run's file.
Build a unique destination key for each run, such as one that includes its relative path or run ID.
</issue_to_address>
### Comment 7
<location path="docs/researchers/spe-with-weskit.md" line_range="95" />
<code_context>
+adapt the paths and files to your workflow.
+
+```bash
+mc config host add local http://localhost:9000 USERNAME PASSWORD;
+
+BASE_DIR=/minio_data/data
</code_context>
<issue_to_address>
**Cron cannot reach separate S3 server**
When the cron job runs on a host other than the S3 server, when the cron job runs on the WESkit or cluster host, `localhost:9000` points to that host, not the separately deployed S3 server, so `mc` cannot connect and results are not uploaded.
Configure `mc` with the reachable address of the S3 server, or explicitly require the job to run on the S3 host and explain how it accesses the run data.
</issue_to_address>
### Comment 8
<location path="docs/researchers/spe-with-weskit.md" line_range="103" />
<code_context>
+ local dir="$1"
+ local bucketname=$(basename $dir)
+ if [[ ! -f "$dir/upload_token" ]]; then
+ if [ -f "$dir/plots/quals.svg" ]; then
+ mc mb --ignore-existing local/results/$bucketname &&
+ mc cp $dir/results.csv local/results/$bucketname &&
</code_context>
<issue_to_address>
**Cron skips every upload**
When an operator schedules the script under cron’s default POSIX shell instead of explicitly invoking Bash, the script uses Bash-only `[[ ... ]]` (and `local`), but has no shebang or instruction to invoke Bash. When cron runs it under its default POSIX shell, the conditional fails and the script never uploads the run results.
Add a Bash shebang and instruct operators to execute the script with Bash from cron.
</issue_to_address>
### Comment 9
<location path="docs/researchers/spe-with-weskit.md" line_range="13-15" />
<code_context>
+uses an SPE, and the steps for an operator who sets one up.
+
+!!! warning "Under construction"
+ No SPE is listed as a public service of the deployment. The address of
+ the environment, its web interface and the way to ask for permission are
+ not documented. Until then, write to
+ [[email protected]][elixir-on-cloud-email].
+
</code_context>
<issue_to_address>
**Public SPE is hidden**
When researchers use the deployment's Cloud Registry to find the SPE, researchers are directed to email instead of the registered BIH WESkit endpoint, so they cannot discover and follow the advertised workflow directly.
Update the warning to point to the registered WESkit service and explain how to request access.
</issue_to_address>Sourcery assessment
Needs a human reviewer. 9 findings to address first, and an operator following the cron-script example could upload results.csv to a bucket readable by all authorized users whenever the plot marker exists. Reverting the docs would stop future use, but it would not undo access to results already copied or read.
Blocking findings: docs/researchers/spe-with-weskit.md:64, docs/researchers/spe-with-weskit.md:106, docs/researchers/spe-with-weskit.md:102, docs/researchers/spe-with-weskit.md:117, docs/researchers/spe-with-weskit.md:106, and 4 more
| [BiBiGrid](https://cloud.denbi.de/wiki/Tutorials/BiBiGrid/) in the | ||
| [de.NBI Cloud](https://www.denbi.de/cloud), or use any other Slurm cluster. | ||
| 3. **Deploy an S3 server.** Create a bucket `results`, and give all | ||
| authorized users read access to it. |
There was a problem hiding this comment.
🟠 High · Researchers see other cohorts’ results
When researchers authorized for different runs or data cohorts use the same SPE, the shared results bucket grants every authorized user access to every run, so researchers can read other cohorts’ outputs they are not permitted to see.
Restrict access to each run’s results to the researchers permitted to see that run instead of granting all authorized users access to the shared bucket.
Also at docs/researchers/spe-with-weskit.md:105.
Prompt for AI agents
In `docs/researchers/spe-with-weskit.md` at line 64:
**Researchers see other cohorts’ results**
When researchers authorized for different runs or data cohorts use the same SPE, the shared `results` bucket grants every authorized user access to every run, so researchers can read other cohorts’ outputs they are not permitted to see.
Restrict access to each run’s results to the researchers permitted to see that run instead of granting all authorized users access to the shared bucket.
Also at `docs/researchers/spe-with-weskit.md:105`.| mc mb --ignore-existing local/results/$bucketname && | ||
| mc cp $dir/results.csv local/results/$bucketname && | ||
| touch "$dir/upload_token"; |
There was a problem hiding this comment.
🟠 High · Sensitive results are published without approval
When a run produces plots/quals.svg and its results.csv contains sensitive or otherwise unapproved data, process_directory treats the plot marker as approval and uploads results.csv without checking its contents or an operator-controlled release decision, exposing the data to users authorized for the results bucket.
Require an operator-controlled release decision and check or filter results.csv before uploading it.
Prompt for AI agents
In `docs/researchers/spe-with-weskit.md` at lines 104-106:
**Sensitive results are published without approval**
When a run produces `plots/quals.svg` and its `results.csv` contains sensitive or otherwise unapproved data, `process_directory` treats the plot marker as approval and uploads `results.csv` without checking its contents or an operator-controlled release decision, exposing the data to users authorized for the results bucket.
Require an operator-controlled release decision and check or filter `results.csv` before uploading it.| process_directory() { | ||
| local dir="$1" | ||
| local bucketname=$(basename $dir) | ||
| if [[ ! -f "$dir/upload_token" ]]; then |
There was a problem hiding this comment.
🟠 High · Later run results are skipped
When multiple completed runs have log directories under the same $dir, process_directory checks and creates upload_token on the parent directory, so after the first run creates it, later calls return without uploading their results.
Track the upload token separately for each run and pass each run’s directory to process_directory.
Also at docs/researchers/spe-with-weskit.md:117.
Prompt for AI agents
In `docs/researchers/spe-with-weskit.md` at line 102:
**Later run results are skipped**
When multiple completed runs have log directories under the same `$dir`, `process_directory` checks and creates `upload_token` on the parent directory, so after the first run creates it, later calls return without uploading their results.
Track the upload token separately for each run and pass each run’s directory to `process_directory`.
Also at `docs/researchers/spe-with-weskit.md:117`.| for logsdir in "$dir".weskit/*/; do | ||
| if [ -d "$logsdir" ]; then | ||
| if [ -f "$logsdir/log.json" ]; then | ||
| process_directory $dir |
There was a problem hiding this comment.
🟡 Medium · Paths with spaces break uploads
When a run directory path contains spaces, the unquoted $dir in the call to process_directory undergoes shell word splitting, so the function uses only the first path fragment and its checks and copy target the wrong path; the results are not uploaded.
Quote $dir in the process_directory call.
Also at docs/researchers/spe-with-weskit.md:105.
Prompt for AI agents
In `docs/researchers/spe-with-weskit.md` at line 117:
**Paths with spaces break uploads**
When a run directory path contains spaces, the unquoted `$dir` in the call to `process_directory` undergoes shell word splitting, so the function uses only the first path fragment and its checks and copy target the wrong path; the results are not uploaded.
Quote `$dir` in the `process_directory` call.
Also at `docs/researchers/spe-with-weskit.md:105`.| if [[ ! -f "$dir/upload_token" ]]; then | ||
| if [ -f "$dir/plots/quals.svg" ]; then | ||
| mc mb --ignore-existing local/results/$bucketname && | ||
| mc cp $dir/results.csv local/results/$bucketname && | ||
| touch "$dir/upload_token"; |
There was a problem hiding this comment.
🟡 Medium · Concurrent cron runs upload results twice
When two cron instances process the same completed run at the same time, both cron instances pass the missing-token check before either creates upload_token, so both run mc cp for the same run. This repeats the upload and, with bucket versioning enabled, creates duplicate object versions despite the page promising one upload per run.
Use a per-run lock or another atomic claim so only one cron instance uploads a run.
Prompt for AI agents
In `docs/researchers/spe-with-weskit.md` at lines 102-106:
**Concurrent cron runs upload results twice**
When two cron instances process the same completed run at the same time, both cron instances pass the missing-token check before either creates `upload_token`, so both run `mc cp` for the same run. This repeats the upload and, with bucket versioning enabled, creates duplicate object versions despite the page promising one upload per run.
Use a per-run lock or another atomic claim so only one cron instance uploads a run.| local bucketname=$(basename $dir) | ||
| if [[ ! -f "$dir/upload_token" ]]; then | ||
| if [ -f "$dir/plots/quals.svg" ]; then | ||
| mc mb --ignore-existing local/results/$bucketname && | ||
| mc cp $dir/results.csv local/results/$bucketname && |
There was a problem hiding this comment.
🟠 High · Different runs overwrite the same result
When two run directories under different parents have the same basename, both runs derive the same bucketname from their directory basename, so mc cp writes them to the same object key. The later upload replaces the earlier run's results, and users see only one run's file.
Build a unique destination key for each run, such as one that includes its relative path or run ID.
Prompt for AI agents
In `docs/researchers/spe-with-weskit.md` at lines 101-105:
**Different runs overwrite the same result**
When two run directories under different parents have the same basename, both runs derive the same `bucketname` from their directory basename, so `mc cp` writes them to the same object key. The later upload replaces the earlier run's results, and users see only one run's file.
Build a unique destination key for each run, such as one that includes its relative path or run ID.| adapt the paths and files to your workflow. | ||
|
|
||
| ```bash | ||
| mc config host add local http://localhost:9000 USERNAME PASSWORD; |
There was a problem hiding this comment.
🟡 Medium · Cron cannot reach separate S3 server
When the cron job runs on a host other than the S3 server, when the cron job runs on the WESkit or cluster host, localhost:9000 points to that host, not the separately deployed S3 server, so mc cannot connect and results are not uploaded.
Configure mc with the reachable address of the S3 server, or explicitly require the job to run on the S3 host and explain how it accesses the run data.
Prompt for AI agents
In `docs/researchers/spe-with-weskit.md` at line 95:
**Cron cannot reach separate S3 server**
When the cron job runs on a host other than the S3 server, when the cron job runs on the WESkit or cluster host, `localhost:9000` points to that host, not the separately deployed S3 server, so `mc` cannot connect and results are not uploaded.
Configure `mc` with the reachable address of the S3 server, or explicitly require the job to run on the S3 host and explain how it accesses the run data.| local dir="$1" | ||
| local bucketname=$(basename $dir) | ||
| if [[ ! -f "$dir/upload_token" ]]; then | ||
| if [ -f "$dir/plots/quals.svg" ]; then |
There was a problem hiding this comment.
🟡 Medium · Cron skips every upload
When an operator schedules the script under cron’s default POSIX shell instead of explicitly invoking Bash, the script uses Bash-only [[ ... ]] (and local), but has no shebang or instruction to invoke Bash. When cron runs it under its default POSIX shell, the conditional fails and the script never uploads the run results.
Add a Bash shebang and instruct operators to execute the script with Bash from cron.
Prompt for AI agents
In `docs/researchers/spe-with-weskit.md` at line 103:
**Cron skips every upload**
When an operator schedules the script under cron’s default POSIX shell instead of explicitly invoking Bash, the script uses Bash-only `[[ ... ]]` (and `local`), but has no shebang or instruction to invoke Bash. When cron runs it under its default POSIX shell, the conditional fails and the script never uploads the run results.
Add a Bash shebang and instruct operators to execute the script with Bash from cron.| No SPE is listed as a public service of the deployment. The address of | ||
| the environment, its web interface and the way to ask for permission are | ||
| not documented. Until then, write to |
There was a problem hiding this comment.
🟡 Medium · Public SPE is hidden
When researchers use the deployment's Cloud Registry to find the SPE, researchers are directed to email instead of the registered BIH WESkit endpoint, so they cannot discover and follow the advertised workflow directly.
Update the warning to point to the registered WESkit service and explain how to request access.
Prompt for AI agents
In `docs/researchers/spe-with-weskit.md` at lines 13-15:
**Public SPE is hidden**
When researchers use the deployment's Cloud Registry to find the SPE, researchers are directed to email instead of the registered BIH WESkit endpoint, so they cannot discover and follow the advertised workflow directly.
Update the warning to point to the registered WESkit service and explain how to request access.
uniqueg
left a comment
There was a problem hiding this comment.
Thanks Valentin, and thanks for restoring this so quickly! The page wasn't lost by accident: #155 removed it because it names no service, address or access process of the deployment. The reasoning, and what's needed to bring it back, are in this comment on #89: #89 (comment)
One small change and we can merge:
- Please replace the "Under construction" warning with the actual entry point. The Cloud Registry now lists BIH's WESkit (https://weskit.bihealth.org/ga4gh/wes/v1) and a Funnel TES at spe4hd.tes.bihealth.org. If those are the SPE, please name the WESkit address (and the web interface, if it's public) and say in one or two sentences how a researcher asks for access (whom to contact, what's needed). The sentence "No SPE is listed as a public service of the deployment" is no longer true.
Two things GitHub needs before the merge:
- Your commits are signed but show as "Unverified", because your charite.de address isn't on your GitHub account. Adding the email (and the signing key) in your GitHub settings fixes it without a re-push.
- The Sourcery threads need resolving. The findings on the copy script are fair but predate this PR: feel free to resolve them with a pointer to #195, where we track them.
The red Docs check is a registry timeout; we'll re-run it.
Closes #193
Restores the SPE tutorial (first added in 7faca00) that af8ea05 (#155) deleted.
docs/researchers/spe-with-weskit.mdas it was right before docs: fill the gaps in the researcher pages #155 deleted it (the latest version).docs/researchers/index.md).Waiting on the reason for the deletion in #155 before merging.
🤖 Generated with Claude Code and modified by Valentin
Summary by Sourcery
Restore the SPE with WESkit documentation and make it discoverable from the Researchers section.
New Features:
Enhancements:
Documentation: