Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix phantom missing fields for triggers schemas #15792

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

zzstoatzz
Copy link
Collaborator

@zzstoatzz zzstoatzz commented Oct 24, 2024

on main, an example like this will complain about missing fields even though the schema has defaults the user doesn't need to pass

from prefect.events import DeploymentEventTrigger

if __name__ == "__main__":
    DeploymentEventTrigger(expect={"weeeeeee"})

it seems to be because pydantic needs default= in the Field definitions to recognize the default value as "not required" by the constructor of the instance


this might be a bug related to multiple-inheritance to report to pydantic but for now, this is a QoL improvement

@zzstoatzz zzstoatzz added the development Tech debt, refactors, CI, tests, and other related work. label Oct 24, 2024
@zzstoatzz zzstoatzz self-assigned this Oct 24, 2024
Copy link

codspeed-hq bot commented Oct 24, 2024

CodSpeed Performance Report

Merging #15792 will not alter performance

Comparing fix-events-schemas-phantom-missing-fields (4dce3a9) with main (02b8219)

Summary

✅ 3 untouched benchmarks

Copy link
Member

@desertaxle desertaxle left a comment

Choose a reason for hiding this comment

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

@zzstoatzz zzstoatzz merged commit 1e6cb80 into main Oct 24, 2024
42 checks passed
@zzstoatzz zzstoatzz deleted the fix-events-schemas-phantom-missing-fields branch October 24, 2024 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Tech debt, refactors, CI, tests, and other related work.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants