Skip to content

Commit c3f1a1e

Browse files
authored
Merge branch 'main' into fix_full_buffer
2 parents b710d29 + 14b605e commit c3f1a1e

File tree

19 files changed

+252
-92
lines changed

19 files changed

+252
-92
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# The Nebari Maintenance Team will be the default owners for everything in the repo.
2+
# The Maintenance team will be assigned to review by default when someone opens a pull request.
3+
* @nebari-dev/maintenance-team

RELEASE.md

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This file is copied to nebari-dev/nebari-docs using a GitHub Action. -->
99

1010
---
1111

12-
## Release 2025.1.1 - January 27, 2025
12+
## Release 2025.2.1 - February 7, 2025
1313

1414
> NOTE: In this release, we have updated our maximum supported Kubernetes version from
1515
> 1.29 to 1.31. we strongly recommend updating the Kubernetes version
@@ -18,30 +18,34 @@ This file is copied to nebari-dev/nebari-docs using a GitHub Action. -->
1818
> Remember that Kubernetes minor versions must be upgraded incrementally (1.29 → 1.30 →
1919
> 1.31).
2020
21-
## What's Changed
22-
* fix bug to allow --import-plugin to work by @Adam-D-Lewis in https://github.com/nebari-dev/nebari/pull/2864
23-
* Add azure kubernetes policy add-on by @viniciusdc in https://github.com/nebari-dev/nebari/pull/2888
24-
* Yaml config sets by @Adam-D-Lewis in https://github.com/nebari-dev/nebari/pull/2876
25-
* Add ability to list user installed plugins from the CLI by @soapy1 in https://github.com/nebari-dev/nebari/pull/2891
26-
* [AUTO] Update CLI doc by @nebari-sensei in https://github.com/nebari-dev/nebari/pull/2841
27-
* [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/nebari-dev/nebari/pull/2896
28-
* [ENH] - Include "--attempt-fixes" flag from Nebari upgrade CLI in upgrade steps logic by @smokestacklightnin in https://github.com/nebari-dev/nebari/pull/2839
29-
* add authorized ip range variable for azure by @dcmcand in https://github.com/nebari-dev/nebari/pull/2880
30-
* Upgrade conda-store to 2024.11.2 by @marcelovilla in https://github.com/nebari-dev/nebari/pull/2815
31-
* Handle default value for azure addon policy by @viniciusdc in https://github.com/nebari-dev/nebari/pull/2905
32-
* Update conda-store-ui tests for updated page verbiage by @soapy1 in https://github.com/nebari-dev/nebari/pull/2911
33-
* Remove unintended character at the end of the TF_LOG variable by @marcelovilla in https://github.com/nebari-dev/nebari/pull/2912
34-
* Update k8s max version by @dcmcand in https://github.com/nebari-dev/nebari/pull/2903
35-
* [ENH] - Use GitHub secrets instead of Vault by @smokestacklightnin in https://github.com/nebari-dev/nebari/pull/2889
36-
* adds info command text display & change the order of command display by @kernel-loophole in https://github.com/nebari-dev/nebari/pull/2916
37-
* [AUTO] Update CLI doc by @nebari-sensei in https://github.com/nebari-dev/nebari/pull/2921
38-
39-
## New Contributors
40-
* @soapy1 made their first contribution in https://github.com/nebari-dev/nebari/pull/2891
41-
* @smokestacklightnin made their first contribution in https://github.com/nebari-dev/nebari/pull/2839
42-
* @kernel-loophole made their first contribution in https://github.com/nebari-dev/nebari/pull/2916
43-
44-
**Full Changelog**: https://github.com/nebari-dev/nebari/compare/2024.12.1...2025.1.1
21+
### What's Changed
22+
- fix bug to allow --import-plugin to work by @Adam-D-Lewis in https://github.com/nebari-dev/nebari/pull/2864
23+
- Add azure kubernetes policy add-on by @viniciusdc in https://github.com/nebari-dev-nebari/pull/2888
24+
- Yaml config sets by @Adam-D-Lewis in https://github.com/nebari-dev/nebari/pull/287-
25+
- Add ability to list user installed plugins from the CLI by @soapy1 in https://githu-.com/nebari-dev/nebari/pull/2891
26+
- [ENH] - Include "--attempt-fixes" flag from Nebari upgrade CLI in upgrade steps log-c by @smokestacklightnin in https://github.com/nebari-dev/nebari/pull/2839
27+
- add authorized ip range variable for azure by @dcmcand in https://github.com/nebari-dev/nebari/pull/2880
28+
- Upgrade conda-store to 2024.11.2 by @marcelovilla in https://github.com/nebari-dev/-ebari/pull/2815
29+
- Handle default value for azure addon policy by @viniciusdc in https://github.com/ne-ari-dev/nebari/pull/2905
30+
- Update conda-store-ui tests for updated page by @soapy1 in https://github.com/nebar--dev/nebari/pull/2911
31+
- Remove unintended character at the end of the TF_LOG variable by @marcelovilla in h-tps://github.com/nebari-dev/nebari/pull/2912
32+
- Update k8s max version by @dcmcand in https://github.com/nebari-dev/nebari/pull/290-
33+
- [ENH] - Use GitHub secrets instead of Vault by @smokestacklightnin in https://github.com/nebari-d-v/nebari/pull/2889
34+
- adds info command text display & change the order of command display by @kernel-loophole in https-//github.com/nebari-dev/nebari/pull/2916
35+
- `2025.1.1` Upgrade step and version bump by @viniciusdc in https://github.com/nebari-dev/nebari/p-ll/2924
36+
- Retrieve all conda-store environments by @soapy1 in https://github.com/nebari-dev/nebari/pull/291-
37+
- [BUG] - Make sure to get envs when the number of envs is less than page limit by @soapy1 in https://github.com/nebar--dev/nebari/pull/2939
38+
- Fix Playwright CI errors & update local instructions by @viniciusdc in https://github.com/nebari-dev/nebari/pull/294-
39+
- Update conda-store-server image + use public auth_schema module for AuthenticationToken by @soapy1 in https://github.com/nebari-dev/nebari/pull/2931-
40+
41+
### New Contributors
42+
43+
- @soapy1 made their first contribution in https://github.com/nebari-dev/nebari/pull2891
44+
- @smokestacklightnin made their first contribution in https://github.com/nebari-dev
45+
/nebari/pull/2839
46+
- @kernel-loophole made their first contribution in https://github.com/nebari-dev/nebari/pull/2916
47+
48+
**Full Changelog**: https://github.com/nebari-dev/nebari/compare/2024.12.1...2025.2.1
4549

4650
## Release 2024.12.1 - December 13, 2024
4751

@@ -96,7 +100,7 @@ This file is copied to nebari-dev/nebari-docs using a GitHub Action. -->
96100

97101
> NOTE: This hotfix addresses several major bugs identified in the 2024.9.1 release. For a detailed overview, please refer to the related discussion at #2798. Users should upgrade directly from 2024.7.1 to 2024.11.1.
98102
99-
## What's Changed
103+
### What's Changed
100104

101105
- fix `CHECK_URL` in kuberhealthy checks to respect namespaces by @dcmcand in https://github.com/nebari-dev/nebari/pull/2779
102106
- fix bug where `check_immutable_fields` throws error with old version of Nebari by @Adam-D-Lewis in https://github.com/nebari-dev/nebari/pull/2796

src/_nebari/constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CURRENT_RELEASE = "2025.1.1"
1+
CURRENT_RELEASE = "2025.2.1"
22

33
HELM_VERSION = "v3.15.3"
44
KUSTOMIZE_VERSION = "5.4.3"
@@ -16,7 +16,7 @@
1616
DEFAULT_NEBARI_IMAGE_TAG = CURRENT_RELEASE
1717
DEFAULT_NEBARI_WORKFLOW_CONTROLLER_IMAGE_TAG = CURRENT_RELEASE
1818

19-
DEFAULT_CONDA_STORE_IMAGE_TAG = "2024.11.2"
19+
DEFAULT_CONDA_STORE_IMAGE_TAG = "2025.2.1"
2020

2121
LATEST_SUPPORTED_PYTHON_VERSION = "3.10"
2222

src/_nebari/stages/infrastructure/template/gcp/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ data "google_compute_zones" "gcpzones" {
55

66
module "registry-jupyterhub" {
77
source = "./modules/registry"
8+
9+
repository_id = "${var.name}-${var.environment}"
10+
location = var.region
811
}
912

1013

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
resource "google_container_registry" "registry" {
2-
location = var.location
1+
resource "google_artifact_registry_repository" "registry" {
2+
# https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/artifact_registry_repository#argument-reference
3+
repository_id = var.repository_id
4+
location = var.location
5+
format = var.format
36
}
Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
variable "location" {
2-
# https://cloud.google.com/container-registry/docs/pushing-and-pulling#pushing_an_image_to_a_registry
2+
# https://cloud.google.com/artifact-registry/docs/docker/pushing-and-pulling
33
description = "Location of registry"
44
type = string
5-
default = "US"
5+
}
6+
7+
variable "format" {
8+
# https://cloud.google.com/artifact-registry/docs/reference/rest/v1/projects.locations.repositories#Format
9+
description = "The format of packages that are stored in the repository"
10+
type = string
11+
default = "DOCKER"
12+
}
13+
14+
variable "repository_id" {
15+
description = "Name of repository"
16+
type = string
617
}

src/_nebari/stages/infrastructure/template/gcp/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
google = {
44
source = "hashicorp/google"
5-
version = "4.8.0"
5+
version = "6.14.1"
66
}
77
}
88
required_version = ">= 1.0"

src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/conda-store/config/conda_store_config.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
import requests
1313
from conda_store_server import api
14-
from conda_store_server._internal import schema
1514
from conda_store_server._internal.server.dependencies import get_conda_store
15+
from conda_store_server.server import schema as auth_schema
1616
from conda_store_server.server.auth import GenericOAuthAuthentication
1717
from conda_store_server.storage import S3Storage
1818

@@ -357,7 +357,7 @@ def _get_conda_store_client_roles_for_user(
357357
return client_roles_rich
358358

359359
def _get_current_entity_bindings(self, username):
360-
entity = schema.AuthenticationToken(
360+
entity = auth_schema.AuthenticationToken(
361361
primary_namespace=username, role_bindings={}
362362
)
363363
self.log.info(f"entity: {entity}")
@@ -387,7 +387,7 @@ async def authenticate(self, request):
387387

388388
# superadmin gets access to everything
389389
if "conda_store_superadmin" in user_data.get("roles", []):
390-
return schema.AuthenticationToken(
390+
return auth_schema.AuthenticationToken(
391391
primary_namespace=username,
392392
role_bindings={"*/*": {"admin"}},
393393
)
@@ -425,7 +425,7 @@ async def authenticate(self, request):
425425
if _namespace is None:
426426
api.ensure_namespace(db, name=namespace)
427427

428-
return schema.AuthenticationToken(
428+
return auth_schema.AuthenticationToken(
429429
primary_namespace=username,
430430
role_bindings=role_bindings,
431431
)

src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/jupyterhub/files/jupyterhub/02-spawner.py

Lines changed: 53 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
from kubespawner import KubeSpawner # noqa: E402
1212

13+
# conda-store default page size
14+
DEFAULT_PAGE_SIZE_LIMIT = 100
15+
1316

1417
@gen.coroutine
1518
def get_username_hook(spawner):
@@ -23,25 +26,66 @@ def get_username_hook(spawner):
2326
)
2427

2528

29+
def get_total_records(url: str, token: str) -> int:
30+
import urllib3
31+
32+
http = urllib3.PoolManager()
33+
response = http.request("GET", url, headers={"Authorization": f"Bearer {token}"})
34+
decoded_response = json.loads(response.data.decode("UTF-8"))
35+
return decoded_response.get("count", 0)
36+
37+
38+
def generate_paged_urls(base_url: str, total_records: int, page_size: int) -> list[str]:
39+
import math
40+
41+
urls = []
42+
# pages starts at 1
43+
for page in range(1, math.ceil(total_records / page_size) + 1):
44+
urls.append(f"{base_url}?size={page_size}&page={page}")
45+
46+
return urls
47+
48+
49+
# TODO: this should get unit tests. Currently, since this is not a python module,
50+
# adding tests in a traditional sense is not possible. See https://github.com/soapy1/nebari/tree/try-unit-test-spawner
51+
# for a demo on one approach to adding test.
2652
def get_conda_store_environments(user_info: dict):
53+
import os
54+
2755
import urllib3
28-
import yarl
56+
57+
# Check for the environment variable `CONDA_STORE_API_PAGE_SIZE_LIMIT`. Fall
58+
# back to using the default page size limit if not set.
59+
page_size = os.environ.get(
60+
"CONDA_STORE_API_PAGE_SIZE_LIMIT", DEFAULT_PAGE_SIZE_LIMIT
61+
)
2962

3063
external_url = z2jh.get_config("custom.conda-store-service-name")
3164
token = z2jh.get_config("custom.conda-store-jhub-apps-token")
3265
endpoint = "conda-store/api/v1/environment"
3366

34-
url = yarl.URL(f"http://{external_url}/{endpoint}/")
35-
67+
base_url = f"http://{external_url}/{endpoint}/"
3668
http = urllib3.PoolManager()
37-
response = http.request(
38-
"GET", str(url), headers={"Authorization": f"Bearer {token}"}
39-
)
4069

41-
# parse response
42-
j = json.loads(response.data.decode("UTF-8"))
70+
# get total number of records from the endpoint
71+
total_records = get_total_records(base_url, token)
72+
73+
# will contain all the environment info returned from the api
74+
env_data = []
75+
76+
# generate a list of urls to hit to build the response
77+
urls = generate_paged_urls(base_url, total_records, page_size)
78+
79+
# get content from urls
80+
for url in urls:
81+
response = http.request(
82+
"GET", url, headers={"Authorization": f"Bearer {token}"}
83+
)
84+
decoded_response = json.loads(response.data.decode("UTF-8"))
85+
env_data += decoded_response.get("data", [])
86+
4387
# Filter and return conda environments for the user
44-
return [f"{env['namespace']['name']}-{env['name']}" for env in j.get("data", [])]
88+
return [f"{env['namespace']['name']}-{env['name']}" for env in env_data]
4589

4690

4791
c.Spawner.pre_spawn_hook = get_username_hook

src/_nebari/stages/terraform_state/template/gcp/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ terraform {
2424
required_providers {
2525
google = {
2626
source = "hashicorp/google"
27-
version = "4.83.0"
27+
version = "6.14.1"
2828
}
2929
}
3030
required_version = ">= 1.0"

0 commit comments

Comments
 (0)