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

NAS-132733 / 25.10 / Convert pool.dataset.* #15946

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Conversation

creatorcary
Copy link
Contributor

The changes to model.py fix the previous issue of not being able to set ForUpdateMetaclass on a model that inherits from a model that uses NotRequired, or vice versa. This was necessary in order to use NotRequired in PoolDatasetCreate (probably the most involved schema conversion I've seen so far) and still use ForUpdateMetaclass on PoolDatasetUpdate. Instead of inheriting serializer mixins, we can set model serializers on models directly. The changes also simplify our models' MROs by removing the redundant model created in our metaclasses with create_model.

Please weigh in on whether we should require the pool.dataset.create.type parameter--I'm thinking that we should.

In the future I'm sure we can clean up some of the legacy validation even more, but the purpose of this PR was mainly to convert everything with as little disturbance as possible.

http://jenkins.eng.ixsystems.net:8080/job/tests/job/api_tests/3463/

@creatorcary creatorcary requested review from themylogin and a team March 9, 2025 20:36
@bugclerk
Copy link
Contributor

bugclerk commented Mar 9, 2025

@bugclerk bugclerk changed the title Convert pool.dataset.* NAS-132733 / 25.10 / Convert pool.dataset.* Mar 9, 2025
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.

2 participants