Variable Value syntax highlighting changes back to "Plain Text"

Steps to Reproduce:

  1. Create a project variable

  2. Set its value to:

     products:
         - 
           name: shipments
           environments:
             - dev
             - test
             - prod
           httpsRedirect: true
         - 
           name: orders
           environments:
             - dev
             - stage
             - prod
           httpsRedirect: false 
    
  3. Set the value to have YAML syntax highlighting

  1. Add a space (or change/retype any char) to the value

Result: The value syntax highlighting is set to back to “Plain Text”.

Also, if you repeat steps 1-3 and then click done, when you open the variable dialog again, then the value type has reverted to “Plain Text” (the same as what happens on step 4 above).

Is there a way to keep the syntax highlighting at YAML?

(In case it matters, I am running Octopus Deploy version 2020.6.4688)

Hi @OctopusSchaff,

Thanks for getting in touch and for your report! I’m sorry for the confusion and annoyance we’ve caused with this bug. I’ve hit this myself in the past, and raised it at the following link.

Interestingly, I was unable to reproduce it in the current latest version (2021.1.7236) so it looks like this UI bug was fixed as part of another change, so I’ll have to follow up on that one.

The part that’s now fixed is only the syntax highlight reset when modifying the variable value. When re-entering the editor for a variable it still defaults to Plain Text (not what was previously set), and that’s just due to this value is not saved against variables, and is surfaced only in the editor in the UI which defaults to Plain Text.

I hope that helps, and please let us know if you have any questions or concerns going forward!

Best regards,

Kenny