-
Notifications
You must be signed in to change notification settings - Fork 16
Replace fidesctl package with fideslang package #454
Conversation
I got them to fail locally now. Looking into it. |
I am looking into this and think I know what is happening. The version of For example, when I look at this failure, the key is it checking is With the example here I could change the test key to something like |
Great detective work @sanders41. When we integrated the shared
I'd be happy to go forward with this suggestion if all the tests continue to pass, I'll check your fork out locally and run the unsafe integration tests too. |
I have made some progress here, all tests but 1 are now passing. The |
I have found the reason The FidesopsDatasetField inherits from class DatasetField(BaseModel):
"""
The DatasetField resource model.
This resource is nested within a DatasetCollection.
"""
name: str
description: Optional[str]
data_categories: Optional[List[FidesKey]]
data_qualifier: FidesKey = Field(
default="aggregated.anonymized.unlinked_pseudonymized.pseudonymized.identified",
) Then in the latest class DatasetField(BaseModel):
"""
The DatasetField resource model.
This resource is nested within a DatasetCollection.
"""
name: str = name_field
description: Optional[str] = description_field
data_categories: Optional[List[FidesKey]] = Field(
description="Arrays of Data Categories, identified by `fides_key`, that applies to this field.",
)
data_qualifier: FidesKey = Field(
default="aggregated.anonymized.unlinked_pseudonymized.pseudonymized.identified",
description="A Data Qualifier that applies to this field. Note that this field holds a single value, therefore, the property name is singular.",
)
retention: Optional[str] = Field(
description="An optional string to describe the retention policy for a dataset. This field can also be applied more granularly at either the Collection or field level of a Dataset.",
)
fields: Optional[List[DatasetField]] = Field(
description="An optional array of objects that describe hierarchical/nested fields (typically found in NoSQL databases).",
) Specifically the issue is that |
We updated |
The |
maybe there are validators on the fideslang dataset model that are conflicting with the new |
There are validators, but removing them didn't fix the issue. |
I still haven't found a solution, but I think I have made some progress on figuring out the issue. In class DatasetField(BaseModel):
...
fields: Optional[List[DatasetField]] = Field(
description="An optional array of objects that describe hierarchical/nested fields (typically found in NoSQL databases).",
) And in class FidesopsDatasetField(DatasetField):
...
fields: Optional[List["FidesopsDatasetField"]] = [] So I think the problem is that that both model's |
I have confirmed this is the issue. I made a So now the question is what is the best way to go about this? We could go with the custom model that doesn't inherit from |
I agree, a custom model makes sense to me |
does fidesops use anything from fideslang besides the dataset? |
It also uses |
🖐️ I did this (added the I totally see the recursion issue here, which wasn't a problem at the time. I'd propose a cleaner solution- we could add |
FWIW I think we could define |
On principle I also object to injecting fidesops-specific logic into fideslang but at some point the rubber does meet the road |
@seanpreston the |
🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this very valuable increment @sanders41
* Replace fidesctl package with fideslang package * Update tests and error message in FidesKey to allow - * Replace DatasetField with DatasetFieldBase
Purpose
Replace the fidesctl package with fideslang
Changes
fidesctl
fromrequirements.txt
fideslang
torequirements.txt
Checklist
Run Unsafe PR Checks
label has been applied, and checks have passed, if this PR touches any external servicesTicket
Fixes #426