Skip to content

Improve atlas build - #8

Merged
p-hoffmann merged 1 commit into
developfrom
p-hoffmann/publish-results-viewer-runtime
Jul 21, 2026
Merged

Improve atlas build#8
p-hoffmann merged 1 commit into
developfrom
p-hoffmann/publish-results-viewer-runtime

Conversation

@p-hoffmann

Copy link
Copy Markdown
Member

The publish workflow built the package on a plain Node runner where shinylive-export/ (gitignored) never exists; vite's copy step silently skips it, so a published package would have been a JS shell with no viewer runtime.

  • Dockerfile: new rv-runtime scratch stage exposing the r-builder outputs (shinylive-export/ + r-packages/) for --output type=local extraction.
  • publish-results-viewer.yml: build that stage (gha-cached — cache hit unless the R inputs changed) and stage its outputs into the package before build:pkg; npm ci now gets NODE_AUTH_TOKEN (@ohdsi/atlas-ui 401s without it).
  • prepublishOnly guard: refuses to publish a dist/ missing the shinylive runtime or shim r-packages, so a runtime-less package can never publish again.

Resulting package: ~152 MB dist/ with shinylive/ + r-packages/ folded in — the exact shape d2e's atlas postinstall copies to /atlas/plugins/results-viewer/. After merge, dispatch the workflow (or tag results-viewer-v*) to publish the first version; OHDSI/d2e then switches its file: dep to the published package and drops the R toolchain requirement from its atlas build (companion PR in d2e).

The publish workflow ran npm ci + build:pkg on a plain Node runner, where
shinylive-export/ (gitignored) never exists, and vite's copy step silently
skips it — so a published package would be a JS shell with no viewer runtime.

- Dockerfile: add a scratch rv-runtime stage exposing the r-builder outputs
  (shinylive-export/ + r-packages/) for local-output extraction.
- publish-results-viewer.yml: build that stage (gha-cached) and stage its
  outputs into the package before build:pkg; auth npm ci (@ohdsi/atlas-ui
  requires a token even for reads).
- prepublishOnly guard: refuse to publish a dist/ missing the shinylive
  runtime or the shim r-packages.
@p-hoffmann
p-hoffmann merged commit 6593d88 into develop Jul 21, 2026
2 checks passed
@p-hoffmann p-hoffmann changed the title Publish @ohdsi/results-viewer with the WebR/shinylive runtime included Improve atlas build Jul 21, 2026
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.

1 participant