Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{# comments #} replaced with # comments #618

Merged
merged 2 commits into from
Apr 1, 2018

Conversation

consideRatio
Copy link
Member

A simple syntax error with a simple fix - I think! In this PR I simply replaced {# these types of comments #} with # these types of comments.

Perhaps {# this comment syntax #} is valid, but if so it seem to have caused some indentation errors. I got an error on my helm upgrade ... command that appears to be commonly associated with indentation issues.

Error:
  UPGRADE FAILED:
    YAML parse error on z2jh-extended/charts/jupyterhub/templates/hub/deployment.yaml:
      error converting YAML to JSON: yaml: line 111: could not find expected ':'

Ping #597 @mattjbray @yuvipanda

I got faulty YAML when running a helm upgrade, perhaps they are a mistake?
@consideRatio consideRatio changed the title Comments {# #} replaced with # {# comments #} replaced with # comments Apr 1, 2018
@yuvipanda
Copy link
Collaborator

The one difference between these two is that the plain {# #} comments will never be emitted into the rendered YAML, while the # comments will be. This makes a lot of difference in some places - primarily in configmaps / other places where literal values are interpolated. We should probably make a style guide for this repo laying things like this out...

I'm not opposed to this :) Does this fix the issue, @consideRatio?

@consideRatio
Copy link
Member Author

Ah yes it did for me, but okay so then we might need to add something like {#- this? -#} perhaps in order to have it function without causing indentation errors?

I'll try!

@consideRatio
Copy link
Member Author

BTW; googling for this was tough, what are good keywords? Got an URL or similar to read about these kinds of comments?

@consideRatio
Copy link
Member Author

I tried the following combinations, only normal comment option avoided the could not find expected ':' error.

# comment 1
{# comment 2 #}
{#- comment 3 -#}
{#- comment 4 #}
{# comment 5 -#}

@yuvipanda
Copy link
Collaborator

yuvipanda commented Apr 1, 2018 via email

@yuvipanda
Copy link
Collaborator

yuvipanda commented Apr 1, 2018 via email

@consideRatio
Copy link
Member Author

Yepp! I saw it actually was {{\* *\}} and by doing that it worked!

@yuvipanda yuvipanda merged commit d7d7a58 into jupyterhub:master Apr 1, 2018
@yuvipanda
Copy link
Collaborator

LGTM, Thanks for the PR!

@consideRatio
Copy link
Member Author

@yuvipanda ❤️

@manics manics mentioned this pull request Aug 15, 2018
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants