Skip to content

Conversation

@kzr-at-amazon
Copy link
Contributor

Problem

  • Upgrading Space from Toolkit from ml.t3.medium to ml.t3.large does not update the Space properties. It only creates a new app with the updated instance type.

Solution

  • Make sure to update Space before creating App when it is needed

  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@kzr-at-amazon kzr-at-amazon requested a review from a team as a code owner October 11, 2025 00:54
@amazon-inspector-ohio
Copy link

⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done

@github-actions
Copy link

  • This pull request implements a feat or fix, so it must include a changelog entry (unless the fix is for an unreleased feature). Review the changelog guidelines.
    • Note: beta or "experiment" features that have active users should announce fixes in the changelog.
    • If this is not a feature or fix, use an appropriate type from the title guidelines. For example, telemetry-only changes should use the telemetry type.

@amazon-inspector-ohio
Copy link

✅ I finished the code review, and didn't find any security or code quality issues.

const instanceTypeChanged = requestedResourceSpec?.InstanceType !== instanceType

if (needsRemoteAccess || instanceTypeChanged) {
const settingsPropName = appType === 'JupyterLab' ? 'JupyterLabAppSettings' : 'CodeEditorAppSettings'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make these checks case insensitive just to be safe? Just lowercase everything and then check. And while it works now to do an either condition, it will break if a new AppType gets added for example. So lets just keep a mapping of JuypyterLab: JupyterLabAppSettings, CodeEditor : CodeEditorAppSettings

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is fixed. Used a map for App specific setting name, and used AppType for app types.

Comment on lines +198 to +204
DefaultResourceSpec: {
InstanceType: instanceType,
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there were other values in DefaultResourceSpec already (eg - ImageArn), would this overwrite it or leave it as is and only update instance type?
If it overwrites, that is not the behavior we want, we should only be updating instance type and not the other params.

@kzr-at-amazon
Copy link
Contributor Author

Ignore this and create a new PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants