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.

String "yes" is interpreted wrong

See original GitHub issue

Given a Kubernetes MySQL deployment file:

apiVersion: extensions/v1beta1
kind: Deployment
# ...
spec:
  # ...
  template:
    # ...
    spec:
      containers:
        - env:
            - name: MYSQL_RANDOM_ROOT_PASSWORD
              value: "yes"
          # ...

The value yes is a string. However, I am getting the following error in VSCode:

Incorrect type. Expected “string”.

Probably the string "yes" is incorrectly marked as a boolean.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
JPinkneycommented, Dec 6, 2018

The fix hasn’t been released yet. I won’t be able to do a release until December 20th but that release will include the fix.

0reactions
JPinkneycommented, Dec 22, 2018

This should be fixed now!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Converting from a string to boolean in Python - Stack Overflow
def strtobool (val): """Convert a string representation of truth to true (1) or false (0). True values are 'y', 'yes', 't', 'true', 'on',...
Read more >
Codewars 8 kyu Convert Boolean Values to Strings ... - YouTube
Codewars 8 kyu Convert Boolean Values to Strings ' Yes ' or 'No' Javascript. 57 views 3 months ago. codeManS practice videos.
Read more >
Check if a given string is a valid number (Integer or Floating ...
Validate if a given string is numeric. Examples: Input : str = "11.5" Output : true Input : str = "abc" Output :...
Read more >
7. Strings — How to Think Like a Computer Scientist
It causes the runtime error IndexError: string index out of range. The reason is that there is no ... if word == "banana":...
Read more >
User's Manual: Functions and Variables - Apache JMeter
JavaScript: Error processing Javascript: [Math.max(2] org.mozilla.javascript. ... I.e.: $1$, or $2$. Your template can be any string. Yes. Third argument.
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