You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running into an odd error with the nebari-self-registration extension and changing its config values when core nebari is 2024.9.1
Starting with a config block like the one below, I am unable to change the value of the self_registration.values.images.tag field
self_registration:
namespace: self-registration
It seems to me that the check_immutable_fields() runs into a problem specifically because the values key schema definition is values: Optional[Dict[str, Any]] = {}
( this is because the whole block is just passed to helm chart values so it would be a headache to define the whole thing explicilty)
I'm unsure about how all of the Pydantic + pluggy schema building magic works, but this is my conclusion since changing fields that are key-value pairs (for example self_registration.namespace ) doesn't encounter this problem
I think there are other values fields in the core Nebari schema that will have the same problem this extension is having. I'll try and recreate the issue with one of those and comment here.
Expected behavior
Changing the values of anything under the values key should be allowed
OS and architecture in which you are running Nebari
MacOS Sequoia (Apple Silicon ARM)
How to Reproduce the problem?
Deploy Nebari 2024.9.1 with the nebari-self-registration extension plugin installed and config in the values block like in the description above
Try to change any of the content in self_registration.values and redeploy
Command output
AttributeError: 'CommentedMap' object has no attribute 'model_fields'
We are assuming that all the parts of the Nebari config file are a pydantic model, but in this case it is not. I agree that there are probably other places in Nebari core codeabse where this will be an issue. E.g. I think any of the overrides keys would cause this issue.
If you want to declare some part of the schema as immutable, then it would need to be a pydantic model (as we currently have it), but I think that's a reasonable restriction. We could loosen the restriction of requiring pydantic models or alternatively you could make the values key a blank pydantic model which allows extra fields (e.g. https://docs.pydantic.dev/latest/concepts/models/#extra-fields).
Describe the bug
I'm running into an odd error with the nebari-self-registration extension and changing its config values when core nebari is 2024.9.1
Starting with a config block like the one below, I am unable to change the value of the self_registration.values.images.tag field
self_registration:
namespace: self-registration
The end of the trace for the error is:
It seems to me that the check_immutable_fields() runs into a problem specifically because the values key schema definition is values: Optional[Dict[str, Any]] = {}
( this is because the whole block is just passed to helm chart values so it would be a headache to define the whole thing explicilty)
I'm unsure about how all of the Pydantic + pluggy schema building magic works, but this is my conclusion since changing fields that are key-value pairs (for example self_registration.namespace ) doesn't encounter this problem
I think there are other values fields in the core Nebari schema that will have the same problem this extension is having. I'll try and recreate the issue with one of those and comment here.
Expected behavior
Changing the values of anything under the
values
key should be allowedOS and architecture in which you are running Nebari
MacOS Sequoia (Apple Silicon ARM)
How to Reproduce the problem?
Deploy Nebari 2024.9.1 with the nebari-self-registration extension plugin installed and config in the
values
block like in the description aboveTry to change any of the content in
self_registration.values
and redeployCommand output
Versions and dependencies used.
Nebari 2024.9.1
nebari-plugin-self-registration 0.0.9
Python 3.12.5
Compute environment
None
Integrations
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: