Fix Jackson OffsetDateTime serialization for Nextflow 24.10+ (#321) - #322
Merged
Conversation
Nextflow 24.10+ returns java.time.OffsetDateTime for workflow start/complete timestamps in WorkflowMetadata.toMap(). The bare ObjectMapper failed to serialize these, causing writeMapToPackage to silently drop config.json, params.json, and workflow.json from published packages. Closes #321 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
🦙 MegaLinter status: ✅ SUCCESS
See detailed report in MegaLinter reports |
…-8601 Per Greptile review on #322: JavaTimeModule alone emits epoch decimals. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
nf-core-gallery was deleted to save cost; switch to udp-spec/nf-quilt/source (the same package dyn-test uses). pkg-test passes end-to-end against Nextflow 24.10.3 with the OffsetDateTime fix. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Member
Author
There was a problem hiding this comment.
Pull request overview
Fixes JSON serialization of Nextflow 24.10+ workflow metadata containing java.time.OffsetDateTime, ensuring config.json, params.json, and workflow.json are written correctly by the nf-quilt plugin.
Changes:
- Register Jackson
JavaTimeModuleand disable timestamp serialization on the sharedObjectMapper. - Add
jackson-datatype-jsr310:2.19.0to match the existing Jackson databind version. - Bump plugin version to
0.9.2, update changelog, and refresh the examplemain.nfinput package.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| plugins/nf-quilt/src/resources/META-INF/MANIFEST.MF | Bumps plugin version to 0.9.2. |
| plugins/nf-quilt/src/main/nextflow/quilt/QuiltProduct.groovy | Configures Jackson for Java time types to prevent OffsetDateTime serialization failures. |
| build.gradle | Adds jackson-datatype-jsr310 dependency for Java time support. |
| main.nf | Updates example/test input package URI. |
| CHANGELOG.md | Records the release notes for the serialization fix and input package change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Delete wf/main.gallery.nf (referenced deleted nf-core-gallery bucket) - Bump VERSION in README-DEV.md to 0.9.2 to match manifest - Add regression test for OffsetDateTime ISO-8601 serialization (#321) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Member
Author
This was referenced Apr 29, 2026
Merged
drernie
added a commit
that referenced
this pull request
Apr 30, 2026
## Summary First release published to the [Nextflow Plugin Registry](https://registry.nextflow.io). Bumps the plugin version to `1.0.0`, consolidating the unpublished `0.9.2` intermediate into the registry-migration release. This is the final PR in the migration tracked by #323. It bundles three previously-merged PRs: - #322 — Jackson `OffsetDateTime` serialization fix for Nextflow 24.10+ - #324 — Migrate to the new `io.nextflow.nextflow-plugin` Gradle build system - #327 — Docs refresh + restore JaCoCo 70% line-coverage gate ## Changes - `build.gradle`: `version = '0.9.2'` -> `'1.0.0'` - `CHANGELOG.md`: rename `[0.9.2]` section to `[1.0.0]` and add note about Nextflow Plugin Registry as the publishing channel - `README-DEV.md`: bump example `nf-quilt@0.9.2` references to `@1.0.0` The `dest-1.0.0` test package has been pre-published to `s3://udp-spec` so `QuiltPkgTest > should confirm contents of dest URI` passes in CI. ## Post-merge manual steps (human) The actual registry publish is intentionally NOT automated in this PR: 1. `git tag 1.0.0 && git push origin 1.0.0` 2. `export NPR_API_KEY=... && ./gradlew releasePlugin` 3. Verify the plugin appears on https://registry.nextflow.io 4. Close #321 with the registry URL ## Test plan - [x] `./gradlew test` passes - [x] `./gradlew check` passes (JaCoCo gate satisfied) - [x] `./gradlew packagePlugin` produces `build/distributions/nf-quilt-1.0.0.zip` - [x] `make pkg-test WRITE_BUCKET=udp-spec` published `nf-quilt/dest-1.0.0` to `udp-spec` - [ ] CI green Closes #323 Closes #321 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- greptile_comment --> <h3>Greptile Summary</h3> This PR bumps the plugin version from `0.9.2` to `1.0.0` across `build.gradle`, `CHANGELOG.md`, and `README-DEV.md` in preparation for the first publish to the Nextflow Plugin Registry. All `0.9.2` references have been consistently updated and no stale occurrences remain in the repository. <h3>Confidence Score: 4/5</h3> Safe to merge — changes are purely a version bump with no functional code modifications. Only P2 finding (stale comment in build.gradle); no logic, security, or correctness issues present. No files require special attention beyond the minor stale comment in build.gradle line 17. <h3>Important Files Changed</h3> | Filename | Overview | |----------|----------| | build.gradle | Version bumped from 0.9.2 to 1.0.0; stale "until the 1.0.0 release" comment left in place (P2) | | CHANGELOG.md | Section heading renamed from [0.9.2] to [1.0.0]; registry publication note prepended — no issues found | | README-DEV.md | Four nf-quilt version references updated from 0.9.2 to 1.0.0 in example commands — no issues found | </details> <h3>Flowchart</h3> ```mermaid %%{init: {'theme': 'neutral'}}%% flowchart TD A["build.gradle\nversion = '1.0.0'"] --> B["./gradlew packagePlugin\nnf-quilt-1.0.0.zip"] B --> C["git tag 1.0.0\ngit push origin 1.0.0"] C --> D["./gradlew releasePlugin\nNPR_API_KEY set"] D --> E["Nextflow Plugin Registry\nregistry.nextflow.io"] F["CHANGELOG.md\n1.0.0 section"] -.-> B G["README-DEV.md\nnf-quilt at 1.0.0"] -.-> E ``` <sub>Reviews (1): Last reviewed commit: ["Release 1.0.0"](c7e63de) | [Re-trigger Greptile](https://app.greptile.com/api/retrigger?id=30280267)</sub> > Greptile also left **1 inline comment** on this PR. <!-- /greptile_comment --> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
JavaTimeModuleand disableWRITE_DATES_AS_TIMESTAMPSon theObjectMapperused bywriteMapToPackage, sojava.time.OffsetDateTime(returned by Nextflow 24.10+WorkflowMetadata.toMap()forstart/complete) serializes as ISO-8601 strings.jackson-datatype-jsr310:2.19.0dependency to match the existingjackson-databindversion.nf-core-gallerywas deleted; switched toudp-spec/nf-quilt/source).Why
Without the module registered,
toJsonthrewJava 8 date/time type java.time.OffsetDateTime not supported by default. The exception was caught inwriteMapToPackage, so the pipeline appeared to finish — butnf-quilt/config.json,params.json, andworkflow.jsonwere never written, producing packages with degraded metadata.Closes #321
Test plan
s3://udp-spec/nf-quilt/dest-0.9.2/nf-quilt/{config,params,workflow}.jsonstart/completeinworkflow.jsonare ISO-8601 strings (e.g.2026-04-29T08:09:29.334938-07:00), not epoch decimalsNXF_VER=24.10.3🤖 Generated with Claude Code
Greptile Summary
This PR fixes a Jackson serialization failure for
java.time.OffsetDateTimevalues returned by Nextflow 24.10+ workflow metadata, which silently preventedconfig.json,params.json, andworkflow.jsonfrom being written to published packages. The fix registersJavaTimeModuleand disablesWRITE_DATES_AS_TIMESTAMPSon the staticObjectMapper, adds the matchingjackson-datatype-jsr310:2.19.0dependency, adds a targeted regression test, updates the test input package reference, and bumps the version to 0.9.2.Confidence Score: 5/5
Safe to merge — the fix is correct, well-tested, and self-contained with no side effects on existing serialization behaviour.
All changes are focused and correct: JavaTimeModule + disabling WRITE_DATES_AS_TIMESTAMPS is the standard Jackson pattern for ISO-8601 OffsetDateTime output; the dependency version matches jackson-databind; a regression test covers both the positive and negative cases; the previous thread's concern about WRITE_DATES_AS_TIMESTAMPS was already addressed in the current HEAD.
No files require special attention.
Important Files Changed
Sequence Diagram
sequenceDiagram participant NF as Nextflow 24.10+ participant QP as QuiltProduct participant OM as ObjectMapper participant JTM as JavaTimeModule participant PKG as QuiltPackage NF->>QP: WorkflowMetadata.toMap()<br/>(start/complete as OffsetDateTime) QP->>OM: toJson(map) OM->>JTM: serialize(OffsetDateTime) JTM-->>OM: "2026-04-29T08:09:29.334938-07:00" OM-->>QP: JSON string (ISO-8601) QP->>PKG: writeMapToPackage(workflow.json) PKG-->>NF: Package published with metadataReviews (3): Last reviewed commit: "address PR review feedback" | Re-trigger Greptile