Skip to content

fix: register OneToOnePartition in PartitionInfo @JsonSubTypes#5033

Merged
Yicong-Huang merged 3 commits into
apache:mainfrom
Ma77Ball:fix/jsonSubTypesOnetoOne
May 13, 2026
Merged

fix: register OneToOnePartition in PartitionInfo @JsonSubTypes#5033
Yicong-Huang merged 3 commits into
apache:mainfrom
Ma77Ball:fix/jsonSubTypesOnetoOne

Conversation

@Ma77Ball
Copy link
Copy Markdown
Contributor

@Ma77Ball Ma77Ball commented May 12, 2026

What changes were proposed in this PR?

PartitionInfo's @JsonSubTypes array listed every concrete subclass except OneToOnePartition, so Jackson could not resolve that discriminator, and the round-trip was broken for any payload carrying a OneToOnePartition. This PR adds the missing new Type(value = classOf[OneToOnePartition], name = "oneToOne") entry alongside the other five subtypes. The PartitionInfoSpec test that pinned the (buggy) five-entry registration set, and its sibling pendingUntilFixed test that documented the intended six-entry set, are merged into a single assertion covering all six concrete subclasses.

Any related issues, documentation, or discussions?

Closes: #4805

How was this PR tested?

Updated PartitionInfoSpec to assert the full six-entry registration set, including OneToOnePartition. sbt scalafmtAll ran clean. CI scalatest run on workflow-core is expected to pass.

Was this PR authored or co-authored using generative AI tooling?

Co-authored with Claude Opus 4.7 in compliance with ASF

@Ma77Ball
Copy link
Copy Markdown
Contributor Author

/request-review @Yicong-Huang

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 42.83%. Comparing base (b492a62) to head (08dd8cc).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5033      +/-   ##
============================================
+ Coverage     42.79%   42.83%   +0.04%     
+ Complexity     2198     2195       -3     
============================================
  Files          1045     1031      -14     
  Lines         39985    38156    -1829     
  Branches       4217     4007     -210     
============================================
- Hits          17111    16346     -765     
+ Misses        21815    20791    -1024     
+ Partials       1059     1019      -40     
Flag Coverage Δ *Carryforward flag
access-control-service 39.53% <ø> (ø)
agent-service 33.72% <ø> (ø) Carriedforward from 6832cfa
amber 43.50% <ø> (-0.03%) ⬇️
computing-unit-managing-service 0.00% <ø> (ø)
config-service 0.00% <ø> (ø)
file-service 32.18% <ø> (ø)
frontend 33.08% <ø> (-0.96%) ⬇️ Carriedforward from 6832cfa
python 88.89% <ø> (-0.01%) ⬇️ Carriedforward from 6832cfa
workflow-compiling-service 47.72% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot requested a review from Yicong-Huang May 12, 2026 19:50
Copy link
Copy Markdown
Contributor

@Yicong-Huang Yicong-Huang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Yicong-Huang Yicong-Huang enabled auto-merge (squash) May 12, 2026 21:06
@Yicong-Huang Yicong-Huang disabled auto-merge May 12, 2026 21:08
@Ma77Ball
Copy link
Copy Markdown
Contributor Author

@Yicong-Huang, thank you for the review. When available, please merge.

@Yicong-Huang
Copy link
Copy Markdown
Contributor

Thanks. I left the PR open intentionally to test the merge queue feature. Apparently it is still not functioning yet (I don't see merge queue button). Will merge this one now and we can test on other PRs (randomly).

@Yicong-Huang Yicong-Huang merged commit 1497806 into apache:main May 13, 2026
17 checks passed
@Ma77Ball Ma77Ball deleted the fix/jsonSubTypesOnetoOne branch May 13, 2026 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PartitionInfo @JsonSubTypes is missing OneToOnePartition

3 participants