You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by lf...@apache.org on 2022/09/27 12:10:03 UTC
[incubator-datalab] branch develop updated: [DATALAB-3076]: Fix for unsuccessful notebook creation
This is an automated email from the ASF dual-hosted git repository.
lfrolov pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
The following commit(s) were added to refs/heads/develop by this push:
new 5ef5fab86 [DATALAB-3076]: Fix for unsuccessful notebook creation
new d1dda0596 Merge pull request #1748 from OleksandrRepnikov/DATALAB-3076
5ef5fab86 is described below
commit 5ef5fab867d02018c81f250360e9fc4d4dfc1aea
Author: orepnikov <60...@users.noreply.github.com>
AuthorDate: Tue Sep 27 15:07:29 2022 +0300
[DATALAB-3076]: Fix for unsuccessful notebook creation
---
.../src/general/scripts/aws/common_prepare_notebook.py | 8 +++++---
.../src/general/scripts/azure/common_prepare_notebook.py | 8 +++++---
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/infrastructure-provisioning/src/general/scripts/aws/common_prepare_notebook.py b/infrastructure-provisioning/src/general/scripts/aws/common_prepare_notebook.py
index b16dfcd86..7f6eadafe 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/common_prepare_notebook.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/common_prepare_notebook.py
@@ -72,9 +72,11 @@ if __name__ == "__main__":
notebook_config['exploratory_name'] = os.environ['exploratory_name'].lower()
except:
notebook_config['exploratory_name'] = ''
- notebook_config['custom_tag'] = json.loads(os.environ['tags'].replace("'", '"'))['custom_tag']
- if notebook_config['custom_tag']:
- notebook_config['custom_tag'] = ';custom_tag:{}'.format(notebook_config['custom_tag'])
+ notebook_config['custom_tag'] = ''
+ if 'custom_tag' in os.environ['tags']:
+ notebook_config['custom_tag'] = json.loads(os.environ['tags'].replace("'", '"'))['custom_tag']
+ if notebook_config['custom_tag']:
+ notebook_config['custom_tag'] = ';custom_tag:{}'.format(notebook_config['custom_tag'])
notebook_config['instance_type'] = os.environ['aws_notebook_instance_type']
notebook_config['key_name'] = os.environ['conf_key_name']
notebook_config['instance_name'] = '{}-{}-{}-nb-{}-{}'.format(notebook_config['service_base_name'],
diff --git a/infrastructure-provisioning/src/general/scripts/azure/common_prepare_notebook.py b/infrastructure-provisioning/src/general/scripts/azure/common_prepare_notebook.py
index 122be0e39..206c291e5 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/common_prepare_notebook.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/common_prepare_notebook.py
@@ -68,9 +68,11 @@ if __name__ == "__main__":
"endpoint_tag": notebook_config['endpoint_tag'],
"Exploratory": notebook_config['exploratory_name'],
"product": "datalab"}
- notebook_config['custom_tag'] = json.loads(os.environ['tags'].replace("'", '"'))['custom_tag']
- if notebook_config['custom_tag']:
- notebook_config['tags']['custom_tag'] = notebook_config['custom_tag']
+ notebook_config['custom_tag'] = ''
+ if 'custom_tag' in os.environ['tags']:
+ notebook_config['custom_tag'] = json.loads(os.environ['tags'].replace("'", '"'))['custom_tag']
+ if notebook_config['custom_tag']:
+ notebook_config['tags']['custom_tag'] = notebook_config['custom_tag']
notebook_config['network_interface_name'] = notebook_config['instance_name'] + "-nif"
notebook_config['security_group_name'] = '{}-{}-{}-nb-sg'.format(notebook_config['service_base_name'],
notebook_config['project_name'],
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org