I noticed that these two flags in pkg/device/enflame/config.go are using the same variable:
--enflame-drs-gcu-resource-name
--enflame-vgcu-resource-name
Both are bound to EnflameResourceNameDRSGCU.
So if both flags are passed, the last one wins. tor example, this:
--enflame-drs-gcu-resource-name=custom-a --enflame-vgcu-resource-name=custom-b
gives custom-b, while reversing them gives custom-a.
This is because both flags are registered on the same FlagSet and Go's flag package doesn't care that they're pointing to the same variable.
This could be an issue for users migrating from the old VGCU flag since the final resource name can change just based on argument order.
I also noticed that:
--enflame-vgcu-legacy-resource-name
--enflame-vgcu-percentage-resource-name
seem to be unused. They're assigned in InitEnflameDevice, but I couldn't find anywhere reading those values afterwards.
I think we should define which flag takes precedence here and add a test for it. The unused flags probably also need to be checked to see if they're still needed.
No Enflame hardware should be needed since this can be tested at the config/flag level.
I noticed that these two flags in
pkg/device/enflame/config.goare using the same variable:Both are bound to
EnflameResourceNameDRSGCU.So if both flags are passed, the last one wins. tor example, this:
gives
custom-b, while reversing them givescustom-a.This is because both flags are registered on the same
FlagSetand Go'sflagpackage doesn't care that they're pointing to the same variable.This could be an issue for users migrating from the old VGCU flag since the final resource name can change just based on argument order.
I also noticed that:
seem to be unused. They're assigned in
InitEnflameDevice, but I couldn't find anywhere reading those values afterwards.I think we should define which flag takes precedence here and add a test for it. The unused flags probably also need to be checked to see if they're still needed.
No Enflame hardware should be needed since this can be tested at the config/flag level.