Skip to content

fix: restore payload_builder wrapping for dict schemas#910

Merged
abhishekmadan30 merged 1 commit intotaskcluster:mainfrom
abhishekmadan30:payload-builder-fix
Feb 18, 2026
Merged

fix: restore payload_builder wrapping for dict schemas#910
abhishekmadan30 merged 1 commit intotaskcluster:mainfrom
abhishekmadan30:payload-builder-fix

Conversation

@abhishekmadan30
Copy link
Contributor

No description provided.

@abhishekmadan30 abhishekmadan30 requested a review from a team as a code owner February 18, 2026 17:18
@abhishekmadan30 abhishekmadan30 requested a review from ahal February 18, 2026 17:18
Copy link
Contributor

@jcristau jcristau left a comment

Choose a reason for hiding this comment

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

Can we add test coverage for this?

@abhishekmadan30
Copy link
Contributor Author

Can we add test coverage for this?

Yep !

@abhishekmadan30 abhishekmadan30 force-pushed the payload-builder-fix branch 4 times, most recently from 698ca57 to 5659659 Compare February 18, 2026 18:45
elif isinstance(schema, type):
msgspec.convert(obj, schema)
# Handle plain dict schemas (e.g. from downstream payload builders)
elif isinstance(schema, dict):
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the plan for plain-dict schemas going forward? Will they be removed in favour of msgspec ones? Will this block need to be updated to convert them to msgspec schemas?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Eventually yes since all plain dict seems get convert to voluptuous. For cross compatibility we will still need to support them for the time being

schema = LegacySchema(
{
voluptuous.Required("implementation"): name,
voluptuous.Optional("os"): str,
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure I understand why we're adding these fields for plain-dict schemas. Wouldn't the incoming schemas have them if they are required?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was existing behavior, this is from the v18.1 of taskgraph : https://github.com/taskcluster/taskgraph/blob/18.1.0/src/taskgraph/transforms/task.py#L437 . We can eventually drop support for this once everything is converted over

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, thank you - I was unable to dig up that reference. sgtm

@abhishekmadan30 abhishekmadan30 merged commit 8583282 into taskcluster:main Feb 18, 2026
20 checks passed
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.

3 participants

Comments