Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Byo vpc mlstudio #894

Merged
merged 39 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
045f701
Start work on byo vpc ml studio
noah-paige Nov 21, 2023
86de123
Add Payload
noah-paige Nov 24, 2023
866548c
Add backend logic deploy mlstudio custom vpc
noah-paige Nov 28, 2023
b717f25
lint
noah-paige Nov 28, 2023
f110930
Merge branch 'os-main' into byo-vpc-mlstudio
noah-paige Nov 29, 2023
0b2d6a7
Test new ML Studio Domain Views
noah-paige Nov 29, 2023
dc8a412
Test new ML Studio Domain Views - add missing files
noah-paige Nov 29, 2023
973386a
Test new ML Studio Domain Views - add missing files
noah-paige Nov 29, 2023
2de32a4
Write backend resolvers for ml studio domain apis
noah-paige Nov 30, 2023
9212012
Fixes to API params and permissions checks
noah-paige Nov 30, 2023
56099d6
Add Stack Deploy on create/delete studio domain
noah-paige Nov 30, 2023
ecb9be0
Fix Migration script and clean up naming and lint checks
noah-paige Nov 30, 2023
3280a05
Create Studio Domain on Env Create/Update, rework Frontend Views
noah-paige Dec 1, 2023
6909b9d
Remove unused API list domains
noah-paige Dec 1, 2023
50a90b3
add tests mlstudio domain apis
noah-paige Dec 1, 2023
4eb4858
Clean Up
noah-paige Dec 1, 2023
2acfdfe
Clean up get studio domain and update migration script
noah-paige Dec 4, 2023
4215ff4
Edit text when ML Studio disabled
noah-paige Dec 4, 2023
95db11b
Fix coverage tests
noah-paige Dec 4, 2023
2dc0e1a
Revert migration script
noah-paige Dec 4, 2023
5cb1d8b
Handle null values Edit form
noah-paige Dec 5, 2023
32bc04d
Move EC2 to base, clean up unused code, move APIs to shared, add dele…
noah-paige Dec 6, 2023
f9e522d
Move EC2 to base, clean up unused code, move APIs to shared, add dele…
noah-paige Dec 6, 2023
cec2afe
Move EC2 to base, clean up unused code, move APIs to shared, add dele…
noah-paige Dec 6, 2023
47241c6
fix import paths
noah-paige Dec 6, 2023
c50e345
Fix tests patch
noah-paige Dec 6, 2023
f2a8350
delete domain before deleting env
noah-paige Dec 6, 2023
e5cc43f
Add delete ml studio domain as part of delete env backend env resource
noah-paige Dec 6, 2023
3aa03b3
Fix delete_env
noah-paige Dec 6, 2023
57f0e8b
Change method of create / delete ml studio to not call 2 APIs on envi…
noah-paige Dec 6, 2023
9287d16
Clean up tests
noah-paige Dec 7, 2023
513e691
Add default vpc info, SAML Group Name to domain, and Fix EnvironmentM…
noah-paige Dec 7, 2023
cc77b4e
Fix downgrade migration and add saml group name to models
noah-paige Dec 7, 2023
4bbba28
Fix tests to add samlgroupname
noah-paige Dec 7, 2023
cd4fe7f
fix migration script downgrade then upgrade
noah-paige Dec 7, 2023
9417ab9
Final fixes
noah-paige Dec 7, 2023
33b035f
Fix unknown vpc type integration tests
noah-paige Dec 7, 2023
19c194e
lint
noah-paige Dec 7, 2023
31f250a
only use domain RDS record on imported vpc for mlstudio extension stack
noah-paige Dec 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions backend/dataall/modules/mlstudio/db/mlstudio_repositories.py
Copy link
Contributor

Choose a reason for hiding this comment

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

Love this change, it was my main concern with the PR

Copy link
Contributor

Choose a reason for hiding this comment

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

The final implementation is way cleaner and more elegant :) :)

Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ def update_env(session, environment):
previous_mlstudio_enabled = True if domain else False
return current_mlstudio_enabled != previous_mlstudio_enabled

@staticmethod
def delete_env(session, environment):
domain = SageMakerStudioRepository.get_sagemaker_studio_domain_by_env_uri(session, env_uri=environment.environment_uri)
if domain:
session.delete(domain)
return True

@staticmethod
def save_sagemaker_studio_user(session, user):
"""Save SageMaker Studio user to the database"""
Expand Down
12 changes: 1 addition & 11 deletions frontend/src/modules/Environments/views/EnvironmentView.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
useSettings
} from 'design';
import { SET_ERROR, useDispatch } from 'globalErrors';
import { deleteEnvironmentMLStudioDomain, useClient } from 'services';
import { useClient } from 'services';
import { archiveEnvironment, getEnvironment } from '../services';
import { KeyValueTagList, Stack, StackStatus } from 'modules/Shared';
import {
Expand Down Expand Up @@ -104,16 +104,6 @@ const EnvironmentView = () => {
};

const archiveEnv = async () => {
if (isModuleEnabled(ModuleNames.MLSTUDIO)) {
const response2 = await client.mutate(
deleteEnvironmentMLStudioDomain({
environmentUri: env.environmentUri
})
);
if (response2.errors) {
dispatch({ type: SET_ERROR, error: response.errors[0].message });
}
}
const response = await client.mutate(
archiveEnvironment({
environmentUri: env.environmentUri,
Expand Down