rancher / dashboard

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

Project container default resource limit inputs are broken #11881

Open mantis-toboggan-md opened 6 days ago

mantis-toboggan-md commented 6 days ago

Describe the bug The unit conversion normally done by the unitinput component seems to be broken on the project create page.

To Reproduce

  1. Navigate to the projects/namespaces list and click 'create project'
  2. Navigate to the 'Container Default Resource Limit' tab
  3. Type '1' in 'Cpu Reservation'

Result CPU Reservation set to 1000

Expected Result CPU Reservation set to 1

Screenshots (I'm typing '111' in each input here)

https://github.com/user-attachments/assets/a3a2979d-902e-4d8d-a0ab-2d8b3675eca8

Additional context Skipped e2e tests should be re-enabled when this is fixed.

cnotv commented 5 days ago

In our E2E we set 1000, so maybe we should change that 😅 https://github.com/rancher/dashboard/blob/master/cypress/e2e/tests/pages/explorer2/project-namespace.spec.ts#L85

cnotv commented 4 days ago

In Dashboard v2.9.alpha2, the GPU value is not kept, not sure if there's any rule but the UX gives no hint and the server returns no errors:

https://github.com/user-attachments/assets/e6b4278b-a95f-477c-9c6d-1c0cf7692480

cnotv commented 4 days ago

Encountered a similar issue for Persistent Storage and it seems like there are misbehaviors of the props:

In other cases where these are not defined, they work properly.

https://github.com/user-attachments/assets/55efa15f-7924-4cf8-80f7-6b91feebeea6