rancher / dashboard

The Rancher UI
https://rancher.com
Apache License 2.0
452 stars 257 forks source link

Role template: Switching from Config to YAML editor breaks #12073

Open cnotv opened 2 days ago

cnotv commented 2 days ago

Describe the bug

When switching editor between Config and YAML for the Role Template, it breaks. The issue may be related to https://github.com/rancher/dashboard/issues/12052, although the UI does not break in that case.

To Reproduce

Result

Nothing happens, error in console:

entry-helpers.js:40 Error: Cannot find resourceFields for Schema management.cattle.io.templateversion (schemaDefinitions have not been fetched) 
    at get resourceFields (steve-schema.ts:103:1)

Expected Result It switches the view, just as it does for all the other resources.

Screenshots

https://github.com/user-attachments/assets/46de3314-2d04-47bd-91c0-92817215ee45

Additional context

Cluster editor, Workload editor and probably all the other work as expected.

gaktive commented 1 day ago

@richard-cox does this look like part of your schema diet changes? Was this one of the schemas that was removed?

richard-cox commented 12 hours ago

It means the resource's schema model's resourceFields was accessed without the call to /schemaDefinition to populate it. There's plumbing in generic components that handle this though, so if it's a vue3 regression there's probably a hook somewhere that's not being called