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

Notebook: refactor blueprint business logic to core #429

Merged
merged 16 commits into from
Oct 17, 2024

Conversation

sgaist
Copy link
Collaborator

@sgaist sgaist commented Sep 27, 2024

Describe your changes

This PR extracts the business logic of the JupyterServer related endpoints from the notebooks blueprints to core.py so that it follows other modules implementation.

Issue ticket number and link

Part of #303
Fixes #399

@sgaist sgaist requested a review from a team as a code owner September 27, 2024 08:50
@sgaist sgaist requested a review from olevski September 27, 2024 11:43
@sgaist sgaist changed the title Notebook blueprint refactor to core Notebook: refactor blueprint business logic to core Sep 27, 2024
@olevski olevski force-pushed the release-amaltheas-migration branch 6 times, most recently from d2b2d48 to a932966 Compare October 8, 2024 13:59
While most of the tests are written in functions, moving those
requiring a cluster into a class allows the use of a class
scoped fixtures for the cluster creation. This has the advantage
of reducing the run time of the tests since the cluster will only
be created for tests that actually requires one so if someone
needs to re-test a particular endpoint that has nothing to do
with kubernetes, they will not incur the useless creation and
destruction time which is not trivial.

The class has been put in utils because it will be used later
for the sessions tests.
No tests requiring a cluster are currently run.
This allows to use a permanent cluster during development so
running tests does incure the setup and teardown delay.
This happened during cherry-pick conflict cleanup.
@sgaist sgaist merged commit e45fd62 into release-amaltheas-migration Oct 17, 2024
15 checks passed
@sgaist sgaist deleted the feature/notebook-refactor branch October 17, 2024 13:06
olevski pushed a commit that referenced this pull request Oct 22, 2024
The move of business logic out of the blueprint allows the code to
be reusable without having to go through the web API. It also allows
for tests to be added without the web complexity.

Tests have been refactored so that test clusters will be created only
when testing endpoints that actually require a cluster. This has the
advantage of speeding up test time. This is especially useful when
doing development.

Finally, a new test option has been added so one can use a local
cluster in place of re-creating one each time tests are run.
olevski pushed a commit that referenced this pull request Oct 28, 2024
The move of business logic out of the blueprint allows the code to
be reusable without having to go through the web API. It also allows
for tests to be added without the web complexity.

Tests have been refactored so that test clusters will be created only
when testing endpoints that actually require a cluster. This has the
advantage of speeding up test time. This is especially useful when
doing development.

Finally, a new test option has been added so one can use a local
cluster in place of re-creating one each time tests are run.
olevski pushed a commit that referenced this pull request Oct 28, 2024
The move of business logic out of the blueprint allows the code to
be reusable without having to go through the web API. It also allows
for tests to be added without the web complexity.

Tests have been refactored so that test clusters will be created only
when testing endpoints that actually require a cluster. This has the
advantage of speeding up test time. This is especially useful when
doing development.

Finally, a new test option has been added so one can use a local
cluster in place of re-creating one each time tests are run.
olevski pushed a commit that referenced this pull request Oct 30, 2024
The move of business logic out of the blueprint allows the code to
be reusable without having to go through the web API. It also allows
for tests to be added without the web complexity.

Tests have been refactored so that test clusters will be created only
when testing endpoints that actually require a cluster. This has the
advantage of speeding up test time. This is especially useful when
doing development.

Finally, a new test option has been added so one can use a local
cluster in place of re-creating one each time tests are run.
olevski pushed a commit that referenced this pull request Oct 31, 2024
The move of business logic out of the blueprint allows the code to
be reusable without having to go through the web API. It also allows
for tests to be added without the web complexity.

Tests have been refactored so that test clusters will be created only
when testing endpoints that actually require a cluster. This has the
advantage of speeding up test time. This is especially useful when
doing development.

Finally, a new test option has been added so one can use a local
cluster in place of re-creating one each time tests are run.
olevski pushed a commit that referenced this pull request Nov 1, 2024
The move of business logic out of the blueprint allows the code to
be reusable without having to go through the web API. It also allows
for tests to be added without the web complexity.

Tests have been refactored so that test clusters will be created only
when testing endpoints that actually require a cluster. This has the
advantage of speeding up test time. This is especially useful when
doing development.

Finally, a new test option has been added so one can use a local
cluster in place of re-creating one each time tests are run.
olevski pushed a commit that referenced this pull request Nov 4, 2024
The move of business logic out of the blueprint allows the code to
be reusable without having to go through the web API. It also allows
for tests to be added without the web complexity.

Tests have been refactored so that test clusters will be created only
when testing endpoints that actually require a cluster. This has the
advantage of speeding up test time. This is especially useful when
doing development.

Finally, a new test option has been added so one can use a local
cluster in place of re-creating one each time tests are run.
olevski pushed a commit that referenced this pull request Nov 6, 2024
The move of business logic out of the blueprint allows the code to
be reusable without having to go through the web API. It also allows
for tests to be added without the web complexity.

Tests have been refactored so that test clusters will be created only
when testing endpoints that actually require a cluster. This has the
advantage of speeding up test time. This is especially useful when
doing development.

Finally, a new test option has been added so one can use a local
cluster in place of re-creating one each time tests are run.
olevski pushed a commit that referenced this pull request Nov 8, 2024
The move of business logic out of the blueprint allows the code to
be reusable without having to go through the web API. It also allows
for tests to be added without the web complexity.

Tests have been refactored so that test clusters will be created only
when testing endpoints that actually require a cluster. This has the
advantage of speeding up test time. This is especially useful when
doing development.

Finally, a new test option has been added so one can use a local
cluster in place of re-creating one each time tests are run.
olevski pushed a commit that referenced this pull request Nov 11, 2024
The move of business logic out of the blueprint allows the code to
be reusable without having to go through the web API. It also allows
for tests to be added without the web complexity.

Tests have been refactored so that test clusters will be created only
when testing endpoints that actually require a cluster. This has the
advantage of speeding up test time. This is especially useful when
doing development.

Finally, a new test option has been added so one can use a local
cluster in place of re-creating one each time tests are run.
olevski pushed a commit that referenced this pull request Nov 11, 2024
The move of business logic out of the blueprint allows the code to
be reusable without having to go through the web API. It also allows
for tests to be added without the web complexity.

Tests have been refactored so that test clusters will be created only
when testing endpoints that actually require a cluster. This has the
advantage of speeding up test time. This is especially useful when
doing development.

Finally, a new test option has been added so one can use a local
cluster in place of re-creating one each time tests are run.
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.

2 participants