Fix newsletter proposal HTML: duplicate pipelines and wrong accepted status - #4342
Fix newsletter proposal HTML: duplicate pipelines and wrong accepted status#4342ewels wants to merge 12 commits into
Conversation
…status Two bugs in the newsletter "New pipelines & proposals" section: - A pipeline proposal was marked "accepted" whenever its issue was closed on GitHub with state_reason "completed". But nf-core/proposals closes rejected/withdrawn proposals as "completed" too, so e.g. dragen (#137, labelled "proposed") showed up as accepted. Acceptance is actually tracked with the "accepted" label, so key on that instead. A proposal closed without the label and not opened that month now drops out entirely, as intended. - When a pipeline proposal is accepted, its repo is created the same month and already appears under "New pipeline repositories", so the pipeline was listed twice (e.g. pathogenepidemiology). Drop the proposal entry when a matching new repo is present for that month. Update the getProposalsForMonth unit test to cover label-based acceptance and the completed-but-not-accepted case. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X2KaU4537UFKLW6Kw1rSSt
✅ Deploy Preview for nf-core-main-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@nf-core-bot fix linting |
Playwright 1.62's config loader resolves the `extends` of sites/main-site/tsconfig.json but cannot follow the bare package specifier "astro/tsconfigs/base" when astro is hoisted to the workspace root node_modules. This made `playwright test` fail at config-load time with "Failed to resolve extends path", so no tests ran at all. Point `extends` at the hoisted location via a relative path so the config loads. astro/editors/tsc all resolve relative extends natively, and npm workspaces always hoist astro to the repo-root node_modules. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X2KaU4537UFKLW6Kw1rSSt
| @@ -1,5 +1,5 @@ | |||
| { | |||
| "extends": "astro/tsconfigs/base", | |||
| "extends": "../../node_modules/astro/tsconfigs/base.json", | |||
There was a problem hiding this comment.
@mashehu this looks a bit dodgy to me? Wanted to flag it. Otherwise the rest of the PR is fairly uncontroversial I think.
There was a problem hiding this comment.
🤖 explanation:
The Playwright CI job was failing before this — not on a test, but at config-load time:
Failed to resolve "extends" path "astro/tsconfigs/base"
referenced from sites/main-site/tsconfig.json
So playwright test died before running a single test. Cause: Playwright 1.62's tsconfig loader resolves extends through the package's exports map, and astro's package.json doesn't expose the ./tsconfigs/base subpath. tsc, astro and the editor use classic/their-own resolution and find the file fine, which is why only Playwright trips over it. It's made worse by npm workspaces hoisting astro up to the repo-root node_modules, so it isn't in sites/main-site/node_modules for a naive lookup either.
Pointing extends straight at the hoisted file sidesteps the exports map and resolves for every tool. It's ugly but deterministic (workspaces always hoist astro to root).
Cleaner alternatives if we'd rather not hardcode the path:
- Bump Playwright to a version whose loader resolves the bare package
extendsagain — smallest conceptual change, but a dependency bump to validate across the suite. - Give Playwright its own tsconfig: leave
tsconfig.jsonextendingastro/tsconfigs/basefor astro/editors, and point Playwright at a tiny dedicated tsconfig that just carries the@utils/*etc. path aliases (no astro extends). Keeps the shared file untouched; adds one small config file. - Skip the extends for Playwright entirely — the config only needs the path aliases, not astro's compiler options.
There was a problem hiding this comment.
I am not too sure about the relative path. Will need to double check that it doesn't break other builds.
There was a problem hiding this comment.
Yup you're right, I think they'd be borked. Reverted and did option (2) instead in 771681b
Revert sites/main-site/tsconfig.json back to `extends: astro/tsconfigs/base` so it is identical to every other subsite again and no Netlify site build sees a changed config. The previous relative-path hack lived in the shared file, which risked the other per-subsite builds. Confine the workaround to Playwright: add a self-contained tsconfig.playwright.json (just the path aliases, no astro extends) and run `playwright test --tsconfig=tsconfig.playwright.json`. Playwright 1.62 uses that single tsconfig for config + tests, so it never tries to resolve the `astro/tsconfigs/base` package specifier that its loader chokes on, while astro/editors keep using the untouched shared tsconfig. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X2KaU4537UFKLW6Kw1rSSt
The same Playwright 1.62 failure that hit main-site applies to every subsite: each tsconfig.json extends `astro/tsconfigs/base`, which Playwright's config loader can't resolve when astro is hoisted to the workspace root, so `playwright test` aborts before running any test (verified: docs/configs/modules-subworkflows/pipeline-results/pipelines all fail to load otherwise). Mirror the main-site fix for each: add a self-contained tsconfig.playwright.json (that site's own path aliases, no astro extends) and pass `--tsconfig=tsconfig.playwright.json` on the test script. The shared tsconfig.json files are left untouched, so astro/editors and the per-subsite Netlify builds are unaffected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X2KaU4537UFKLW6Kw1rSSt
Only main-site's tests import a path alias (@utils, which transitively pulls in @components etc.); every other subsite's tests import just @playwright/test. So a single self-contained tsconfig at sites/ — with main-site's alias set resolved relative to that dir — covers all sites. Replace the six per-site tsconfig.playwright.json files with one shared sites/tsconfig.playwright.json and point each test script at `--tsconfig=../tsconfig.playwright.json`. Shared tsconfig.json files stay untouched. Verified: main-site's 21 unit tests pass and every subsite's config loads through the shared file. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X2KaU4537UFKLW6Kw1rSSt
There was a problem hiding this comment.
why does playwright need compilerOptions with path aliases? that feels wrong? if it just needs to have some dummy tsconfig I would just make an empty one.
There was a problem hiding this comment.
The test file sites/main-site/tests/newsletter.spec.ts does import { … } from "@utils/newsletter", and without the paths entries in tsconfig, Playwright's TS resolution will fail with a module-not-found error before any test runs.
There was a problem hiding this comment.
ok if I use relative paths in the newsletter test file then it can be empty. I thought that going back to relative paths like this would break stuff but Claude assures me that it should be fine. Will push now.
There was a problem hiding this comment.
Nope, it broke everything as I suspected. Reverting..
|
Now hanging during playwright browser install for some reason 🙈 |
Done on my phone in a campsite, so please forgive the AI blurb description. 'cc @jfy133 who reported.
Two bugs in the newsletter "New pipelines & proposals" section:
A pipeline proposal was marked "accepted" whenever its issue was closed
on GitHub with state_reason "completed". But nf-core/proposals closes
rejected/withdrawn proposals as "completed" too, so e.g. dragen (New: website search functionality #137,
labelled "proposed") showed up as accepted. Acceptance is actually
tracked with the "accepted" label, so key on that instead. A proposal
closed without the label and not opened that month now drops out
entirely, as intended.
When a pipeline proposal is accepted, its repo is created the same
month and already appears under "New pipeline repositories", so the
pipeline was listed twice (e.g. pathogenepidemiology). Drop the
proposal entry when a matching new repo is present for that month.
Update the getProposalsForMonth unit test to cover label-based
acceptance and the completed-but-not-accepted case.
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01X2KaU4537UFKLW6Kw1rSSt
@netlify /blog/2026/tools-4_1_0