This is an automated email from the ASF dual-hosted git repository. lfrolov pushed a commit to branch DLAB-1612 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
commit 29ba942ccfc599d88639f32100800ba51ead7ee8 Author: leonidfrolov <[email protected]> AuthorDate: Fri Mar 6 10:04:35 2020 +0200 [DLAB-1612]: added replacement of uppercase letters and underscores in additional tags --- .../general/scripts/gcp/common_notebook_configure_dataengine-service.py | 2 +- .../src/general/scripts/gcp/common_prepare_notebook.py | 2 +- .../src/general/scripts/gcp/dataengine-service_prepare.py | 2 +- .../src/general/scripts/gcp/dataengine_prepare.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/infrastructure-provisioning/src/general/scripts/gcp/common_notebook_configure_dataengine-service.py b/infrastructure-provisioning/src/general/scripts/gcp/common_notebook_configure_dataengine-service.py index 0f5ab39..b87a415 100644 --- a/infrastructure-provisioning/src/general/scripts/gcp/common_notebook_configure_dataengine-service.py +++ b/infrastructure-provisioning/src/general/scripts/gcp/common_notebook_configure_dataengine-service.py @@ -64,7 +64,7 @@ if __name__ == "__main__": else: application = os.environ['application'] - additional_tags = os.environ['tags'].replace("': u'", ":").replace("', u'", ",").replace("{u'", "" ).replace("'}", "") + additional_tags = os.environ['tags'].replace("': u'", ":").replace("', u'", ",").replace("{u'", "" ).replace("'}", "").lower().replace('_', '-') notebook_config['cluster_labels'] = { os.environ['notebook_instance_name']: "configured", diff --git a/infrastructure-provisioning/src/general/scripts/gcp/common_prepare_notebook.py b/infrastructure-provisioning/src/general/scripts/gcp/common_prepare_notebook.py index 96ea2da..d5df68e 100644 --- a/infrastructure-provisioning/src/general/scripts/gcp/common_prepare_notebook.py +++ b/infrastructure-provisioning/src/general/scripts/gcp/common_prepare_notebook.py @@ -132,7 +132,7 @@ if __name__ == "__main__": data = {"notebook_name": notebook_config['instance_name'], "error": ""} json.dump(data, f) - additional_tags = os.environ['tags'].replace("': u'", ":").replace("', u'", ",").replace("{u'", "" ).replace("'}", "") + additional_tags = os.environ['tags'].replace("': u'", ":").replace("', u'", ",").replace("{u'", "" ).replace("'}", "").lower().replace('_', '-') print('Additional tags will be added: {}'.format(additional_tags)) notebook_config['labels'] = {"name": notebook_config['instance_name'], diff --git a/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_prepare.py b/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_prepare.py index 4fc3028..d79aab0 100644 --- a/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_prepare.py +++ b/infrastructure-provisioning/src/general/scripts/gcp/dataengine-service_prepare.py @@ -77,7 +77,7 @@ if __name__ == "__main__": dataproc_conf['endpoint_name']) dataproc_conf['release_label'] = os.environ['dataproc_version'] - additional_tags = os.environ['tags'].replace("': u'", ":").replace("', u'", ",").replace("{u'", "" ).replace("'}", "") + additional_tags = os.environ['tags'].replace("': u'", ":").replace("', u'", ",").replace("{u'", "" ).replace("'}", "").lower().replace('_', '-') dataproc_conf['cluster_labels'] = { os.environ['notebook_instance_name']: "not-configured", diff --git a/infrastructure-provisioning/src/general/scripts/gcp/dataengine_prepare.py b/infrastructure-provisioning/src/general/scripts/gcp/dataengine_prepare.py index 5088de1..60ec18e 100644 --- a/infrastructure-provisioning/src/general/scripts/gcp/dataengine_prepare.py +++ b/infrastructure-provisioning/src/general/scripts/gcp/dataengine_prepare.py @@ -144,7 +144,7 @@ if __name__ == "__main__": data_engine['network_tag'] = '{0}-{1}-ps'.format(data_engine['service_base_name'], data_engine['project_name']) - additional_tags = os.environ['tags'].replace("': u'", ":").replace("', u'", ",").replace("{u'", "" ).replace("'}", "") + additional_tags = os.environ['tags'].replace("': u'", ":").replace("', u'", ",").replace("{u'", "" ).replace("'}", "").lower().replace('_', '-') data_engine['slave_labels'] = {"name": data_engine['cluster_name'], "sbn": data_engine['service_base_name'], --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
