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

Deployment Manager Python Bug #508

Open
swilliams11 opened this issue Jun 4, 2021 · 0 comments
Open

Deployment Manager Python Bug #508

swilliams11 opened this issue Jun 4, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@swilliams11
Copy link
Contributor

This is a bug that needs to be filed with the Marketplace/Deployment Manager team.

I receive the following error when I attempt to pass the cluster version as a string to the cluster.py file.
image

I've tried a couple of different iterations to ensure that clusterVersion is a string when its passed to cluster.py, but it continues to generate the error above.

cluster_version = '' + str(context.properties['clusterVersion']) + ''
cluster_version_num = context.properties['clusterVersion'] # this causes an error
cluster_version = '' + str(cluster_version_num) + ''

clusterVersion is marked as a string in cluster.py.schema.

properties:
  clusterVersion:
    type: string
    description: Initial number of nodes desired in the cluster.
    default: "1.18"

I pass the cluster version from datashare-vm.jinja as shown below.

- name: datashare-cluster-manager
    type: cluster.py
    metadata:
      dependsOn:
      - {{ project }}{{ installStorageBucketSuffix }}
      - delete-api
    properties:
      zone: {{ gkeZone }}
      clusterVersion: {{ clusterVersion }}

clusterVersion is set as:

{% set clusterVersion = "1.18" %}

In spite of this configuration it continues to generate the error above. I've seen a similar error for a different property before, and it seems that there is some bug related to type handling in Jinja/Python.

However, it works when I remove clusterVersion from the datashare-vm.jinja file.
image
As long as I don't set the clusterVersion within datashare-vm.jinja, then the default version (1.18) listed in the cluster.py.schema file is used and the correct data type appears to be correct as well.

The current workaround is to update the default cluster version in the cluster.py.schema file until Deployment Manager team resolves the bug.

@swilliams11 swilliams11 added the bug Something isn't working label Jun 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant