aws / amazon-sagemaker-feedback

Amazon SageMaker Public Feedback Dashboard
Creative Commons Attribution Share Alike 4.0 International
6 stars 1 forks source link

Trying to open a space and cannot open with this issue: TypeError: Cannot read properties of undefined (reading 'AppType') #30

Open IRISDavidD opened 10 months ago

IRISDavidD commented 10 months ago

Product Version

Issue Description

image

Expected Behavior

No response

Observed Behavior

No response

Product Category

No response

Feedback Category

Configuration and Setup

Other Details

No response

niteshsrivats commented 10 months ago

Is there any other way to use shared spaces while this is being fixed?

Edit: Found a temporary fix.

RUN aws --region your-region sagemaker describe-domain --domain-id your-domain-id to copy the "SageMakerImageArn". Make sure it's v3.

{
    "DomainName": "your-domain-name",
    "DefaultUserSettings": {
        "JupyterServerAppSettings": {
            "DefaultResourceSpec": {
                "SageMakerImageArn": "arn:aws:sagemaker:us-east-1:081325390199:image/jupyter-server-3",
                "InstanceType": "system"
            }
        }
    }
}

RUN aws --region your-region sagemaker list-spaces --domain-id your-domain-id to copy the shared space name. Also notice AppType is missing in the shared space.

{
    "Spaces": [
        {
            "DomainId": "d-id",
            "SpaceName": "private-test",
            "Status": "InService",
            "CreationTime": "2024-01-14T20:31:22.148000+05:30",
            "LastModifiedTime": "2024-01-14T20:31:36.346000+05:30",
            "SpaceSettingsSummary": {
                "AppType": "JupyterLab",
                "SpaceStorageSettings": {
                    "EbsStorageSettings": {
                        "EbsVolumeSizeInGb": 50
                    }
                }
            },
            "SpaceSharingSettingsSummary": {
                "SharingType": "Private"
            },
            "OwnershipSettingsSummary": {
                "OwnerUserProfileName": "owner-522"
            }
        },
        {
            "DomainId": "d-id",
            "SpaceName": "space-name",
            "Status": "InService",
            "CreationTime": "2024-01-14T20:15:39.744000+05:30",
            "LastModifiedTime": "2024-01-14T22:58:12.323000+05:30",
            "SpaceSettingsSummary": {},
            "SpaceSharingSettingsSummary": {
                "SharingType": "Shared"
            },
            "OwnershipSettingsSummary": {
                "OwnerUserProfileName": "owner-522"
            }
        }
    ]
}

RUN aws --region your-region sagemaker update-space --domain-id your-domain-id --space-name your-shared-space-name --space-settings '{ "JupyterServerAppSettings": { "DefaultResourceSpec": { "SageMakerImageArn": "SageMakerImageArn you copied earlier", "InstanceType": "system" } } }'

This doesn't add an AppType but for some reason does fix the issue.

matthewponzio commented 9 months ago

@niteshsrivats Amazing find on the workaround!! Man, how much time did you spend figuring that out?! Anyway, we absolutely observed the same exact problem and your workaround worked like a charm. So I'll +1 that this MAJOR bug still exists and needs to be fixed ASAP.

Expected Behavior

Observed Behavior

Additional Detail

AFTER creating Shared Space in Studio UI - Notice no SpaceSettings

aws sagemaker describe-space --region us-east-1 --domain-id d-aat48bboh1lw --space-name mySharedSpace
{
    "DomainId": "d-aat48bboh1lw",
    "SpaceArn": "arn:aws:sagemaker:us-east-1:159592657235:space/d-aat48bboh1lw/mySharedSpace",
    "SpaceName": "mySharedSpace",
    "HomeEfsFileSystemUid": "200040",
    "Status": "InService",
    "LastModifiedTime": "2024-02-06T16:23:13.541000-05:00",
    "CreationTime": "2024-02-06T16:23:11.442000-05:00"
}

Apply the workaround specified above - running aws sagemaker update-space:

aws sagemaker update-space \
    --region us-east-1 \
    --domain-id d-aat48bboh1lw \
    --space-name mySharedSpace \
    --space-settings '{ "JupyterServerAppSettings": { "DefaultResourceSpec": { "SageMakerImageArn": "arn:aws:sagemaker:us-east-1:081325390199:image/jupyter-server-3", "InstanceType": "system" } } }'
{
    "SpaceArn": "arn:aws:sagemaker:us-east-1:159592657235:space/d-aat48bboh1lw/mySharedSpace"
}

NOTICE that SpaceSettings is now specified:

aws sagemaker describe-space --region us-east-1 --domain-id d-aat48bboh1lw --space-name mySharedSpace
{
    "DomainId": "d-aat48bboh1lw",
    "SpaceArn": "arn:aws:sagemaker:us-east-1:159592657235:space/d-aat48bboh1lw/mySharedSpace",
    "SpaceName": "mySharedSpace",
    "HomeEfsFileSystemUid": "200040",
    "Status": "InService",
    "LastModifiedTime": "2024-02-06T16:29:13.352000-05:00",
    "CreationTime": "2024-02-06T16:23:11.442000-05:00",
    "SpaceSettings": {
        "JupyterServerAppSettings": {
            "DefaultResourceSpec": {
                "SageMakerImageArn": "arn:aws:sagemaker:us-east-1:081325390199:image/jupyter-server-3",
                "InstanceType": "system"
            }
        }
    }
}

NOW you can successfully Open the Shared Space

khushbsr commented 7 months ago

This issue is fixed. Please test this feature and let us know. Thanks!