-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: Special launcher for training projects #1133
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1133 +/- ##
==========================================
+ Coverage 72.83% 72.86% +0.02%
==========================================
Files 162 162
Lines 5345 5391 +46
Branches 601 611 +10
==========================================
+ Hits 3893 3928 +35
- Misses 1321 1327 +6
- Partials 131 136 +5 ☔ View full report in Codecov by Sentry. |
88dd108
to
4007c43
Compare
1d0d6ec
to
f9db517
Compare
352aeaf
to
336fe63
Compare
8e02c2a
to
eea4952
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for this nice PR. There are a few comments from my side, hopefully all more or less understandable and sensible.
Also, there are a few things in Sonar that should be addressed as well (some of them are somehow included in my suggestions). So it might make sense to go through the comments first and see if there are any outstanding points from Sonar at the end.
backend/capellacollab/alembic/versions/2827788b8d2d_add_slugs_for_tools_and_versions.py
Outdated
Show resolved
Hide resolved
frontend/src/app/projects/project-detail/project-details.component.html
Outdated
Show resolved
Hide resolved
...s/user-sessions-wrapper/create-session/provision-workspace/provision-workspace.component.css
Outdated
Show resolved
Hide resolved
...ns/user-sessions-wrapper/create-session/provision-workspace/provision-workspace.component.ts
Outdated
Show resolved
Hide resolved
...ns/user-sessions-wrapper/create-session/provision-workspace/provision-workspace.component.ts
Outdated
Show resolved
Hide resolved
29d5a40
to
ddbb960
Compare
8d4d93e
to
fccb578
Compare
8dc8674
to
8705102
Compare
SonarCloud Quality Gate failed. 2 Bugs No Coverage information Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
@@ -542,6 +566,149 @@ def create_database_and_guacamole_session( | |||
) | |||
|
|||
|
|||
@project_router.post( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new endpoint is good, however, we should merge it with the read-only
endpoint. They have many lines in common and we should reduce code duplication as best as possible.
As described in #1004, pre-provisioned sessions shall replace read-only sessions. pre-provisioned
sessions have the same logic like read-only sessions. The only difference is that no persistent volume is passed.
This doesn't apply to the backend route. Also, the frontend components shall be merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like to keep them separate endpoints for now. This PR focuses on spawning training sessions. Doing a rewrite of read-only sessions will blow up the scope of this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the two endpoints due to the code duplication, which we try to avoid. The duplication increases future code maintainability and the effort to merge those is not too high. The provision endpoint is very similar to the read-only
endpoint. The provision endpoint shall take a list of models instead of the project name anyway as decided in #1004.
Given this, there is only one flag to add: persistent
, which is a boolean that can be set to true or false. With this flag, we get rid of the code duplication and have one merged endpoint.
Since this PR implements #1004, which explicitly mentions that we want to merge both endpoints, I don't see it out of scope.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some last comments from my side and also saw one open comment from @MoritzWeber0
Unfortunately, I am currently getting an error when building the backend image. Rebasing on main should resolve this. So after the rebase I will try out the functionality and when everything works fine, I'll approve it.
.../user-sessions-wrapper/create-session/provision-workspace/provision-workspace.component.html
Outdated
Show resolved
Hide resolved
.../user-sessions-wrapper/create-session/provision-workspace/provision-workspace.component.html
Outdated
Show resolved
Hide resolved
.../user-sessions-wrapper/create-session/provision-workspace/provision-workspace.component.html
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to my below comments I have two other more general comments/questions:
- Currently, this component is only shown in case
projectType === 'training'
. By the components name I suspect that we do want to either use this component somewhere else or also for general projects in the future? - Currently the button text is fixed to
Start this training
. In case we do want to also use the component for non training projects, we should make this text conditional on whether we have a training or general project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not want to make to many assumptions on what we're going to do with this component. It supports starting training sessions.
bdb75f3
to
5a9d6d9
Compare
Co-authored-by: dominik003 <[email protected]>
Co-authored-by: dominik003 <[email protected]>
Co-authored-by: dominik003 <[email protected]>
So the flow of the provision route is more clear.
So we do not spin up a lot of sessions.
Co-authored-by: dominik003 <[email protected]>
Co-authored-by: dominik003 <[email protected]>
Co-authored-by: dominik003 <[email protected]>
Co-authored-by: dominik003 <[email protected]>
Co-authored-by: dominik003 <[email protected]>
6d7514c
to
ec9725a
Compare
The pull request does not conform to the conventional commit specification. Please ensure that your commit messages follow the spec: https://www.conventionalcommits.org/. This is the commit validation log:
Here are some examples of valid commit messages:
|
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
We'll wait for the web-based tool support, which has merged the persistent and read-only routes, but also prepared the interface for pre-provisioned workspaces. After #1355 is merged, we can rebase this PR. |
Due to the number of conflicts and the status of the PR, I will close the PR. It can still be used as inspiration for an implementation in the future. |
This MR introduces a special launcher for training sessions:
This launcher will launch all models in the training project.
TODO:
See #1004.
Open questions
Out of scope