Variables views shows variable that does not exist

Hi,

I wasn’t sure what title to put here, I’ll try to describe what I’m seeing as best as I can :slight_smile:

I have an application with multiple service. on those services I have variables defined with default values.

lets take 2 exemples: at the application level, I have a smarterfridge service with a CONFIG variable and a ui.x11 service with TOUCHSCREEN_NAME variable:

When I go on a device, the TOUCHSCREEN values appears global (All services):

When I go to the variables view on a device CONFIG has a global value too and a default there but it should not. and no default value at the service level where it should:

In the smarterfridge container it has the false value and in other containers the other value.

I guess the mess on the second variable was caused by someone trying to override the CONFIG variable and doing it on the global variable that shouldn’t have existed (as we can see on the 3rd screenshot)


Am I missing something or is there a bug here ?

Hi there, thanks for the screenshots, they help explain the porblem really well!

For the TOUCHSCREEN variable, is it appearing as a global (all services) variable on all devices in your fleet? (assuming you have multiple devices that is)
Same for the CONFIG variable.

Also, I think it’s worth SSH’ing into the containers and using env command to check to see if the TOUCHSCREEN variable is actually visible in all services.

So far I’m not sure if its a bug or something that’s been caused by someones actions but I think we can figure it out together here

Hi there, I’ve done some testing with one of my own devices here – I set service variables at the application level, and when I looked at my device, the dashboard was reporting that this variable was for all services. However when I went into the service and checked, the variables were only visible in the service they were defined for at the application level.

So I have a feeling that there could be a dashboard bug, where the device level view of env vars is incorrectly reporting what services those variables are defined for. Let me know if you see the same on your device.

It looks like it’s the same for all devices, for a variable defined at the application level I think there is 3 cases:

  • when there is no override on the device: it appears as a “All services” variable. but it’s only available on the service it’s defined in at the application level. probably a dashboard bug only
  • when the variable is overriden on the device in the same service: it’s available only on the service it’s defined in correctly and It’s shown as intended on the dashboard, I did not put a screenshot of this case before, here is one:

  • when the variable has been overriden globally instead of in the same service: it appears twice on the dashboard, the value of the env var inside the container matches what we see on the dashboard. except for the default “Application value” being shown in the “All service” line instead of the “single service” one, it’s as expect. I guess fixing the first bug would fix this one as well

And as you said, I think the only bug is the level shown on the dashboard for variable not overriden in the device. however a consequence of this is that when we override the variable from the dashboard it set it for all services too instead of the service it’s originaly defined in

That’s great, thanks for bringing it up. I’ve raised it with the UI team and we’ve got an issue set up to track it. When it’s been fixed, someone should re-open this thread and let you know.

1 Like

Hi there, an patch has just been pushed through that should fix the original issue of variables being displayed as “all services” when they shouldn’t be - however any variables previously created might still have the same problem. It should work with any newly created variables. Let us know if you still see any issues, thanks

1 Like

Hi @rcooke-warwick !

yes it’s working fine now. I did not expect this to fix the previsously created variables don’t worry :wink: