question-mark

Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for variables that contain dashes

See original GitHub issue

Issue Description

Currently, if a variable (or one of the child properties of a variable) in config.yaml contains a dash symbol, the deployment automatically fails. It would be very useful to at least allow child properties to contain dashes, which are natively supported by the yaml format.

Use case: I’m building a template that would have different variable values based on region name, and I would have to remove the dash symbol from the region variable that comes from the deployment pipeline.

Error example:

ERROR:k8s_handle:RuntimeError: Variable names should never include dashes, check your vars, please: us-central1, us-east1

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
seleznevcommented, Oct 16, 2020

why this limitation appeared

AFAIK, if you put something like {{ some-variable-name }} in Jinja2 template, you will receive a very unclear error message. So this limitation was added to prevent confusing error messages.

1reaction
rvadimcommented, Oct 15, 2020

Hi @nvarscar! Thank you for your report. I will check the ability to solve this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can shell variable name include a hyphen or dash (-)?
Note that some shells (e.g. modern dash, mksh, zsh) remove variables whose name they don't like from the environment.
Read more >
Add support for dashes in variable names, mangle them #2345
If CoffeeScript was an entirely new engine, we would absolutely use dashes -- but it isn't, so we have to use JS identifiers....
Read more >
Why can't environment variables with dashes be accessed in ...
Thus, no POSIX shell is required to support exporting or expanding variable names with dashes, via indirect expansion or otherwise.
Read more >
Cannot add secret variables containing dashes - GitLab.org
Hi, I'm trying to add a secret variable to my project, but cannot because dashes are prohibited in the variable name.
Read more >
Adding dashes into a string - Programming - SAS Communities
Hello, I'm trying to add dashes in the middle of a string of social security ... set have; ... Assuming ssn is a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found