Repository navigation
fix(io): write og's outputs owner-only, even when og runs outside the step scripts #486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
06cf3df
80fd494
2817f59
ce6a424
23dd4d2
8b8b1f7
7054cbb
cbfa487
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n | |
|
|
||
| ## Unreleased | ||
|
|
||
| - The files `og` writes through its atomic writer (every analysis output) are owner-only (mode 0600) whatever the umask. Before, `og` wrote each output under a temporary name with the umask's mode, so under the common umask 022 an output was readable by every user of the machine, and replacing a 0600 file made it 0644. The step scripts set umask 077, so a run through them was already owner-only; `og` run by hand or by the Nextflow pipeline was not. Now the temporary file is created mode 0600, or with the mode of the file it replaces when that is stricter (a 0400 file stays 0400). It is always a new file: a file or link already at its name is left as it is and the next name is tried, and two outputs written at once to one name in one process get two temporary files. The temporary name gains a number, `.<name>.tmp-<pid>-<n>`. When `og` runs as root and the environment variable `NXF_OWNER` holds `uid:gid` (two numbers), each of these files goes to that owner and group; without it, a file `og` writes as root stays root's, as before. The docker profile of the Nextflow pipeline runs its containers as root, and with `docker.fixOwnership` on, Nextflow sets `NXF_OWNER` in each task to the user who started the run. Nextflow's own hand-back after the task, a `chown --from root`, fails silently in images whose `chown` has no `--from` option (the busybox in biocontainers images) and leaves these files root's. Without the hand-over that user could not read an output `og` wrote there, and Nextflow could not publish it. When the hand-over fails, `og` prints one warning and the file stays root's. No output name or content changes. [Nextflow Execution](docs/nextflow.md#run-the-pipeline) now says to keep `--outdir` private. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Document the effect of the umask. With umask
|
||
| - Four commands in docs tables now copy and run as written. The docs site printed the backslash that escaped each pipe for GitHub, so the Nextflow install line in Getting started read `curl -s https://get.nextflow.io \| ...`, which is not a pipeline. That row now points at the install command in Full run. The BAM build check of the FAQ and the site table hash of Keeping versions up to date moved into code blocks under their tables, and the `readings` row of Copy Number from Depth names its separator in words. `tests/test_docs_table_pipes.sh` fails when a table row under `docs/` holds an escaped pipe inside a code span. | ||
| - The docs site: the current page in the side menu is readable, and code blocks no longer add a Tab stop per line. The menu paints the current page in the accent colour, #2563eb, on a light tint of the same blue. That was 3.1:1 on the dark page and 4.49:1 on the light one, below the 4.5:1 that WCAG AA asks of normal text. The accent now takes the link colour of each scheme: #60a5fa on dark (6.3:1) and #1d4ed8 on light (5.8:1). On dark, the text Zensical writes on the accent (the "Back to top" button and the side menu button on hover or focus) takes the page colour, #1c1917, at 6.9:1: white on #60a5fa would be 2.5:1. `zensical.toml` no longer sets `anchor_linenums`: the site shows no line numbers, yet every code line got an empty link with no name, 122 of them on the getting-started page, on 88 pages in all. Code highlighting and the copy button do not change. A cargo test, `rust/crates/og-dev/tests/docs_theme.rs`, checks the colours both ways and the anchors. | ||
| - The privacy page now says what the CPSR (step 17) and MultiQC (step 28) reports contact when you open them: nothing. Both keep their stylesheets, scripts and images inside the HTML file, and their external addresses are plain links. The page said before that these two reports were not checked. Docs only; no output changes. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Require
RUNNER_TEMPbefore using the backup path.Validate
RUNNER_TEMPbefore this copy. Use${RUNNER_TEMP:?Set RUNNER_TEMP to the runner temporary directory}. Without validation, an unset value changes the backup path to/og-io-lib.rs. Keep the validation before installing the restoration trap.As per coding guidelines, “All environment variables must require user to set them:
${VAR:?Set VAR to...}.”Source: Coding guidelines