Open davidebelloni opened 4 years ago
Solved with
{% set LIST_LABELS = env['project'].split('-') %}
{% set BASE_LABELS = dict() %}
{% set x=BASE_LABELS.__setitem__('application',LIST_LABELS[0]) %}
{% set x=BASE_LABELS.__setitem__('landscape',LIST_LABELS[1]) %}
- name: test
type: gcp-types/pubsub-v1:projects.topics
properties:
topic: test
labels: {{ BASE_LABELS|tojson }}
Now I've the same problem with the cloud_function.py template ... I've converted the line
cmd = "echo '%s' | base64 -d > /function/function.zip;" % (content)
in
cmd = "echo '%s' | base64 -d > /function/function.zip;" % (content.decode('ascii'))
but is not a definitive solution
Both are good fixes. It performs the same in both Python2 and Python3. But it would be better to use 'utf-8'.
Feel free to send a PR for cloud_function template. Or I'll later update it together with others that might have the same issue.
Same issue here - how can we decipher The template produces different results with Python3 and Python2
message in a general case? It can be quite hard to understand what's different between those, esp. if the templates are using jinja..
Hi, I'm trying to apply this simple template Jinja:
but gcloud command return the following error:
How can I check the different results and resolve them?
OS/gcloud info:
Thanks you