-
Notifications
You must be signed in to change notification settings - Fork 96
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
Retrieve all conda-store environments #2910
base: main
Are you sure you want to change the base?
Conversation
I took a look around the code base to find where unit tests for this should go, but I could not find anything obvious. Would love some advice on where a good spot for a test would be. Thanks 🐎 |
...etes_services/template/modules/kubernetes/services/jupyterhub/files/jupyterhub/02-spawner.py
Outdated
Show resolved
Hide resolved
...etes_services/template/modules/kubernetes/services/jupyterhub/files/jupyterhub/02-spawner.py
Outdated
Show resolved
Hide resolved
1a489d9
to
d7a3b32
Compare
I was following up on the discussion and had a meeting with Chuck as well; right now, nebari does not have a good architecture to test internal I do like the overall idea and the sound of that, though this might be something to another PR, my suggestion would be to implement the pure method @dcmcand commented above for the URL string list generation and leave there for another PR where we make it possible to be unit-tested. Regarding the discussion for the default value of |
358de37
to
d517a1d
Compare
@soapy1 we had a discussion about this at the Nebari community meeting and the consensus was for now, the simplest way forward would be to use importlib to import the filepath into the unit test file. |
Using importlib was also my first thought to resolving the testing issue. I commented earlier with a link to my test branch https://github.com/soapy1/nebari/compare/get-all-cs-env...soapy1:nebari:try-unit-test-spawner?expand=1. This approach is not really going to work (in a straight forward way) because the 02-spawner file is a traitlets config file and has all these
IMO I think if tests are not getting added then it doesn't make sense to refactor things so that it might be easier to write tests in the future. For a couple reasons:
|
0c96971
to
e3a7ada
Compare
3e5ed69
to
c174a45
Compare
Calling out that this PR uses the v1 api for environments which has this known bug conda-incubator/conda-store#859. v2 of the api implements cursor based pagination and resolves this issue. It will be available in the next release of conda-store. |
Reference Issues or PRs
Fixes #2599
What does this implement/fix?
Put a
x
in the boxes that applyTesting
How to test this PR?
a. an installation of Nebari with jhub apps enabled
b. at least 100 conda-store environments (or decrease the
size_limit
var in the PR to a sufficiently small number, like 2)deploy app
buttonAny other comments?
Note, that this API endpoint has the following known bug conda-incubator/conda-store#859.
Users may be able to get around this issue by refreshing the page to get the updated set of environments.