Conversation
- new version 3.5.0 - update to latest cdf-sdk v7 - adding new feature to node level to define list of space-variants - suffix at the very end (after `-spc`) - refactoring needed to not only use `node_name: str` as parameter but `node: NamespaceNode` - difference to rawdb-variants is, that it is not globally but locally configured - might mitigate the pain until "nested space access-control" is available
> .. it uses a deprecated version of `actions/cache: v3.3.2`. Please update your workflow to use v3/v4 of actions/cache to avoid interruptions
src/bootstrap/app_cache.py
Outdated
| # item = convert_time_attributes_to_datetime(self.dump()) | ||
| # return json.dumps(item, default=utils._auxiliary.json_dump_default, indent=4) |
| with_raw_capability: bool = True | ||
| with_datamodel_capability: bool = True | ||
| with_undocumented_capabilities: bool = False | ||
| group_prefix: str = "cdf" | ||
| aggregated_level_name: str = "allprojects" | ||
| dataset_suffix: str = "dataset" | ||
| space_suffix: str = "space" | ||
| rawdb_suffix: str = "rawdb" | ||
| rawdb_additional_variants: list[str] = ["state"] |
There was a problem hiding this comment.
This is a breaking change. Is it a safe change? Will clients using your library break?
There was a problem hiding this comment.
it is fully backward compatible, but from 3.5.0 onward supports a new (additional) config
semantic versioning from 3.4.1 to 3.5.0 is indicating that, and release-notes will too
There was a problem hiding this comment.
From what I understand, something that was optional before is now mandatory. I see that as breaking. Did I misunderstand how it works?
There was a problem hiding this comment.
ah you meant removal of Optional[..], that was only done where the default value was not None anyway.
A corner case could be that a yaml-config was configured with null which had before passed a pydantic value-validation
as this was never documented (and makes no sense) it is theoretical
There was a problem hiding this comment.
as all have default values it is still optional when parsed by pydantic, just not support None anymore
psalaberria002
left a comment
There was a problem hiding this comment.
I managed to review the PR since it isn't that large, but going forward I don't think we should approve such PRs. See https://cognitedata.slack.com/archives/C0425G1JP2A/p1743509263432649
Once the comments I left in this PR are resolved ping me again for a final risk review.
spex66
left a comment
There was a problem hiding this comment.
answered or resolved
| with_raw_capability: bool = True | ||
| with_datamodel_capability: bool = True | ||
| with_undocumented_capabilities: bool = False | ||
| group_prefix: str = "cdf" | ||
| aggregated_level_name: str = "allprojects" | ||
| dataset_suffix: str = "dataset" | ||
| space_suffix: str = "space" | ||
| rawdb_suffix: str = "rawdb" | ||
| rawdb_additional_variants: list[str] = ["state"] |
There was a problem hiding this comment.
ah you meant removal of Optional[..], that was only done where the default value was not None anyway.
A corner case could be that a yaml-config was configured with null which had before passed a pydantic value-validation
as this was never documented (and makes no sense) it is theoretical
| with_raw_capability: bool = True | ||
| with_datamodel_capability: bool = True | ||
| with_undocumented_capabilities: bool = False | ||
| group_prefix: str = "cdf" | ||
| aggregated_level_name: str = "allprojects" | ||
| dataset_suffix: str = "dataset" | ||
| space_suffix: str = "space" | ||
| rawdb_suffix: str = "rawdb" | ||
| rawdb_additional_variants: list[str] = ["state"] |
There was a problem hiding this comment.
as all have default values it is still optional when parsed by pydantic, just not support None anymore
src/bootstrap/app_cache.py
Outdated
| # item = convert_time_attributes_to_datetime(self.dump()) | ||
| # return json.dumps(item, default=utils._auxiliary.json_dump_default, indent=4) |
Group / Capabiltiesandspaces.applyspace-variants: ["i", "m"]-spc) like for rawdb-variantsnode_name: stras parameter butnode: NamespaceNodetechnical-debt / design-flaw
space-variantsare good to create multiple spaces easily, but they fail if access-control is required on a granular level.-spc-mtypically representing data-models-spc-itypically data-instanceswith the approach, it is not possible to separate read/write access between the two spaces.
That's a technical debt, which needs to be resolved with switching to cdf-tk approach, or once we can switch to "nested spaces access-control"