physionet-build
physionet-build copied to clipboard
Maximum length of Google Group names is 73 characters ("Invalid Input: groupName" error)
When trying to send the MIT datathon dataset to a Google Cloud bucket using the "manage published project" tools in the console, the following error was raised. The problem is that the title of the project is used to set the group name. The maximum length of group names is 73 characters.
Internal Server Error: /console/published-projects/mit-critical-datathon-2023/1.0.0/
HttpError at /console/published-projects/mit-critical-datathon-2023/1.0.0/
<HttpError 400 when requesting https://admin.googleapis.com/admin/directory/v1/groups?alt=json returned "Invalid Input: groupName". Details: "Invalid Input: groupName">
Traceback:
File "./console/views.py" in gcp_bucket_management
979. gcp_object = GCP.objects.get(bucket_name=bucket_name)
File "/physionet/python-env/physionet/lib/python3.9/site-packages/django/db/models/manager.py" in manager_method
85. return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/physionet/python-env/physionet/lib/python3.9/site-packages/django/db/models/query.py" in get
650. raise self.model.DoesNotExist(
During handling of the above exception (GCP matching query does not exist.), another exception occurred:
File "/physionet/python-env/physionet/lib/python3.9/site-packages/django/core/handlers/exception.py" in inner
56. response = get_response(request)
File "/physionet/python-env/physionet/lib/python3.9/site-packages/django/core/handlers/base.py" in _get_response
197. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/physionet/python-env/physionet/lib/python3.9/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
23. return view_func(request, *args, **kwargs)
File "./console/views.py" in manage_published_project
892. gcp_bucket_management(request, project, user)
File "/physionet/python-env/physionet/lib/python3.9/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
23. return view_func(request, *args, **kwargs)
File "./console/views.py" in gcp_bucket_management
987. utility.create_bucket(project.slug, project.version, project.title, is_private)
File "./console/utility.py" in create_bucket
64. group = create_access_group(bucket, project, version, title)
File "./console/utility.py" in create_access_group
150. raise e
File "./console/utility.py" in create_access_group
132. creation = service.groups().insert(body={
File "/physionet/python-env/physionet/lib/python3.9/site-packages/googleapiclient/_helpers.py" in positional_wrapper
134. return wrapped(*args, **kwargs)
File "/physionet/python-env/physionet/lib/python3.9/site-packages/googleapiclient/http.py" in execute
915. raise HttpError(resp, content, uri=self.uri)
Exception Type: HttpError at /console/published-projects/mit-critical-datathon-2023/1.0.0/
Exception Value: <HttpError 400 when requesting https://admin.googleapis.com/admin/directory/v1/groups?alt=json returned "Invalid Input: groupName". Details: "Invalid Input: groupName">
In this case we manually created the google group and added the appropriate permissions (thanks @alistairewj!).