Improve variables UI
The variables view is very basic and it generally needs improving since it quickly gets hard to use when you begin adding lots of variables.
1. You have to add the same variable name for multiple environments and the ordering of environments is not the same. This is error prone and makes the list hard to parse.
2. There is no description for variables so you need to add very long names sometimes. This has already been covered, but I added it for completeness. See https://octopusdeploy.uservoice.com/forums/170787-general/suggestions/6079578-enhance-the-variable-maintenance-screen-with-varia
3. There can be different types of variables which are changed for different reasons. It would be great to have a category concept to group them with.
4. For very large numbers of variables it would be great with a search box which filters the variables as you type. It should also search in the description.
See the following mockup for an example:
Thanks everyone for your suggestions. We are happy to announce that a new version of the Variable Editor has shipped in Octopus 4.0! See https://octopus.com/blog/octopus-release-4-0 for more details.
In this first release, we have focused on providing a great variable editing experience, which we hope you will love! Although we haven’t yet been able to implement all of your great suggestions, we have been able to build an extensible variable editor that we will continue to improve in future.
Ed Haack commented
It would be nice to include an "import/export csv" feature, rather than having to use the UI. Yes, there's probably an API call you can make.
Ed Haack commented
Recently, a webinar showed the "filtering" option in the Variables page. Clicking the top/left icon brings up a filter row which can weed-out only the values you want to see (scope, name, value)... even more-so in v. 3.4
For example, in "scope" I enter "qa" and it shows all values for "qa", including values that are in other groups.
Also please fix/add keyboard shortcuts. Tabbing through gives all sorts of weirdness in Firefox where it's impossible not to add roles to a scope because the dropdown won't go away and hitting tab again autofills with the highlighted item.
John Downs commented
I agree with everything here, but also would love to be able to see - for any given combination of step/environment/tenant - what the computed value of each variable is. This would be very helpful when debugging variable scopes.
I may have missed it in here somewhere, but in this same arena it would be AWESOME to be able to create a namespace for your variables as well. overkill? maybe but currently to keep them in order I do namespace.something.<maybesomething here> but if I type the namespace wrong...
Paul Wilcox commented
I actually missed this post so ended up posting another request on this yesterday (I'd second a number of requirements in the original post and list of comments)....
Tim Ververs commented
Being able to Copy variable list is the most awesome thing i would live to have! Not being able to copy things (assign for diffrend environments) really creates alot of duplicate work.
Michael Peterson commented
So I'd actually like to vote for this as variable management is a pain especially as you add an environment including figuring out which ones to duplicate? Typing in the environment in the search returns not only the environment I included but any that don't have anything. And if I want to compare two environments... well I can't enter both because it's an "AND" instead of an "OR".
And so I'm stuck either picking another tool to manage these, or writing my code. Which is why I'm here as having it in Octopus would be awesome. But from reading the comments, and then reading the description I'm unclear of what exactly would be done if this item is worked.
All of the above
BTW, I'm assuming it's not just me (or maybe it is and it's just a plugin), but somewhere in one of the releases the adding of a variable and tab order got messed up. If I type in a name of a "new" variable and tab, I end up in the uppermost line in the "Name" field rather than in the "Value" field of that row. Fixing that would be high on my list.
Glen Boonzaier commented
Its impossible for Octopus to determine if a variable is used or not considering that the variable may only be be defined in Octopus but the usage is in a config file within a project. It would only be able to find variables that are used in Octopus. A better idea would be to track the "last used date" of a variable.
Here is an proposed example of what it could look like when a project step is making use of an undefined variable.
Octopus should show a warning before allowing the deletion/renaming of a variable that is in use within a project step or perhaps even when the variable was known to be used in the most recent release.
Variable UI needs a big overhaul. It is very cumbersome and frustrating to add variables when you have large number of them.
Matthew Hutton commented
Adam Wilks commented
On a related note, I think it would be extremely helpful to have some visibility of when variables become deprecated, possibly even an indication of which steps they are being used in.
I imagine this could be achieved by writing some sort of audit history when the deployment engine resolves variables and performs value substitution. If this history could just contain a time stamp and the name or ID of the step which was executing at the time then the data could be used to show users how their variables are being consumed.
Michael W commented
For such an advanced tool as Octopus is overall, it's difficult to understand why this area lags behind.
The variable editor is painfully slow, hard to use and makes what should be a simple task into a major chore.
I sincerely hope that the OD team can place a priority on this and start working on it. I'm sure there will be a lot of testers (myself included) out there who will be willing to try out any improved solution that is put forth.
Julian Klock commented
The variable UI could definitely need some improvements. One thing that could be added to the list of suggestions, is to view a fully "compiled/parsed" variable list for a given environment. In our projects, we often use nested variables (e.g. one variable for the database connection string, composed of two other variables: one for the server name and one for the database name). If there were an option to e.g. "View all variables in final state for environment", it would be much easier to control and review the variable list.
And one more thing - The ability to rename a variable set.
I think a tree view should be used so the many values/scopes for each variable appear under the one variable name. There is a lot of duplication creating a new variable as you have to type the name again. Instead you can just open the tree and add a new value.
Carlos Campos commented
another thing I would REALLY like to see is variable usages.
I have variable X defined but I dont know IF it is being used at all.
If it is being used, I would like to know where? which project? Which Field?
this would be awesome.
darrell tunnell commented
This is fast becoming an issue for us as our variables list is growing.
Bruce Foust commented
I agree with the description field for variables. I have wished I could document what, when, and where variable are used many times.
1. I would like to see some way to which projects use each variable set without having to walk through all the projects by hand.
2. Please fix the delete key issue by adding an "X" icon in another column or something like it. I always delete a single character before or after the cursor depending where the cursor is.
Colin Svingen commented
I too have found managing variables difficult at times. It is actually the reason that I started writing cmdlets to interact with Octopus. You can find my project at: https://github.com/Swoogan/Octopus-Cmdlets
It doesn't help with the categorization or descriptions, but you can sort and filter the variables, remove several at once, copy them from one project to another, etc...