Hello,
when I run command: balena env add EDITOR vim --fleet DEV-DC-Faxe-NodeRed-LenzeDH
it is inserted:
however when I try to assign service:
balena env add EDITOR2 vim --fleet DEV-DC-Faxe-NodeRed-LenzeDH --service faxe
I receive error: “Application not found: DEV-DC-Faxe-NodeRed-LenzeDH, fleet: DEV-DC-Faxe-NodeRed-LenzeDH”
What am I missing? I’m following example: balena CLI Documentation - Balena Documentation
Hi, could you please confirm whether using the fleet slug instead of the name works? Please also check if putting the service name in quotes (and slug in quotes if a combination of everything else doesn’t work) improves anything
just to clarify by slug you mean --fleet → -f, --service ->-s?
In that case I’ve tried combinations --fleet/ -f/ --service/ -s with quotes or without, I always get the same error if I add --service/ -s.
balena env add EDITOR2 vim -f “DEV-DC-Faxe-NodeRed-LenzeDH” works fine.
I’ve also checked other fleets, but it is the same behavior.
Just to mention, commands like balena env add NewVariable --device 6a4fca63a46679a2cd5958a8d5606df1 --service faxe works fine. It seems it just doesn’t like fleet and service combination 
just to clarify by slug you mean --fleet → -f, --service ->-s?
No, slug
is a unique identifier for your fleet composed of your org handle and the fleet’s name, like this: ORG_HANDLE/FLEET_NAME
. You can find it in the dashboard when viewing a fleet/list of fleets or by fetching the fleet’s info via the CLI. I would like to make sure that the behavior you are seeing is for fleets as a whole and not just an issue with fleet name vs slug
Also, could you please tell us which CLI version you are using?
Meanwhile, I’ll try to reproduce the issue on my end
Okay I’ve managed to reproduce. I indeed see the issue, however it is as I assumed: the issue appears to only occur when using fleet name instead of slug. Let me try with a newer version of the CLI to see if it has been patched yet. If not, I will look into the issue
Okay I’ve confirmed the issue is present in the latest CLI version, looking into it
Thanks, for your help, at least there is an workaround with ORG_HANDLE/FLEET_NAME
. Looking forward to see an issue being fixed.
No problem. Just an update: I have found the cause of the issue, just confirming with my colleagues before proceeding whether this was intentional or indeed a bug
A fix has been merged. Version 16.2.2 of the CLI should be available soon with the fix for the bug. It makes it possible to use fleet names for setting environment variables. However, please note that in the next major version of the CLI we plan to remove support for using fleet names in favor of only using fleet slugs.
Thanks, as long as it matches documentation - fine by me 