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

merging 5744/5745/5746/5747/5752 to prod #5748

Merged
merged 11 commits into from
May 21, 2024
Merged
30 changes: 15 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ orbs:
default: false

docker:
- image: python:3.9-slim-bullseye
- image: python:3.11-slim-bullseye
working_directory: ~/repo
resource_class: large
steps:
Expand All @@ -23,9 +23,9 @@ orbs:
apt-get update && apt-get install --yes --no-install-recommends git curl
- restore_cache:
keys:
- v3.9-dependencies-{{ checksum "requirements.txt" }}
- v3.11-dependencies-{{ checksum "requirements.txt" }}
# fallback to using the latest cache if no exact match is found
- v3.9-dependencies-
- v3.11-dependencies-

- run:
name: install dependencies
Expand Down Expand Up @@ -91,7 +91,7 @@ orbs:
- save_cache:
paths:
- ./venv
key: v3.9-dependencies-{{ checksum "requirements.txt" }}
key: v3.11-dependencies-{{ checksum "requirements.txt" }}

- run:
name: Build image if needed
Expand All @@ -107,7 +107,7 @@ orbs:
jobs:
deploy:
docker:
- image: python:3.9-slim-bullseye
- image: python:3.11-slim-bullseye
working_directory: ~/repo
steps:
- run:
Expand All @@ -119,9 +119,9 @@ jobs:
# Download and cache dependencies
- restore_cache:
keys:
- v3.9-dependencies-gcloud-457-{{ checksum "requirements.txt" }}
- v3.11-dependencies-gcloud-457-{{ checksum "requirements.txt" }}
# fallback to using the latest cache if no exact match is found
- v3.9-dependencies-gcloud-457-
- v3.11-dependencies-gcloud-457-

- run:
name: install dependencies
Expand All @@ -146,7 +146,7 @@ jobs:
- save_cache:
paths:
- ./venv
key: v3.9-dependencies-gcloud-457-{{ checksum "requirements.txt" }}
key: v3.11-dependencies-gcloud-457-{{ checksum "requirements.txt" }}

- run:
name: Authenticating with google service account for kms/sops
Expand Down Expand Up @@ -236,9 +236,9 @@ jobs:
no_output_timeout: 30m

- run:
name: Deploy dev-r
name: Deploy dev
command: |
hubploy deploy --timeout 30m dev-r hub ${CIRCLE_BRANCH}
hubploy deploy --timeout 30m dev hub ${CIRCLE_BRANCH}
no_output_timeout: 30m

- run:
Expand Down Expand Up @@ -538,8 +538,8 @@ workflows:
# This has no effect yet because docker-py doesn't support buildkit.
#environment:
# DOCKER_BUILDKIT: 1
deployment: dev-r
name: dev-r image build
deployment: dev
name: dev image build
filters:
branches:
ignore:
Expand Down Expand Up @@ -701,8 +701,8 @@ workflows:
only:
- staging
- hubploy/build-image:
deployment: dev-r
name: dev-r image build
deployment: dev
name: dev image build
push: true
# Filters can only be per-job? wtf
filters:
Expand Down Expand Up @@ -805,7 +805,7 @@ workflows:
- data101 image build
- data102 image build
- datahub image build
- dev-r image build
- dev image build
- edx image build
- eecs image build
- ischool image build
Expand Down
4 changes: 2 additions & 2 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ node-placeholder-scaler:
- 'deployments/datahub/**'
'hub: dlab':
- 'deployments/dlab/**'
'hub: dev-r':
- 'deployments/dev-r/**'
'hub: dev':
- 'deployments/dev/**'
'hub: edx':
- 'deployments/edx/**'
'hub: eecs':
Expand Down
5 changes: 5 additions & 0 deletions deployments/datahub/images/default/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ dependencies:
# EPS 256, https://github.com/berkeley-dsep-infra/datahub/issues/1775
- obspy==1.4.1

# Install VSCode for ESPM courses - https://github.com/berkeley-dsep-infra/datahub/issues/5716
- nodejs=16 # code-server requires node < 17
- jupyter-vscode-proxy==0.5
- code-server==4.10.1

- pip:
# - -r /tmp/infra-requirements.txt
# Econ 148, Spring 2023 https://github.com/berkeley-dsep-infra/datahub/issues/4093
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ jupyterhub:
defaultUrl: /rstudio
profileList:
- display_name: "Dockerfile image"
description: "This is the original dev-r image."
description: "This is the original dev image."
default: true
- display_name: "repo2docker image"
description: "A newer repo2docker-based image with similar components as the primary."
kubespawner_override:
image: us-central1-docker.pkg.dev/ucb-datahub-2018/user-images/dev-r-secondary:1a64e0a
image: us-central1-docker.pkg.dev/ucb-datahub-2018/user-images/dev-secondary:1a64e0a
- display_name: "1524699: DataHub Infrastructure"
slug: "1524699"
description: "Regular image with per-course subpath."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
nfsPVC:
nfs:
shareName: shares/dev-r/prod
shareName: shares/dev/prod

jupyterhub:
ingress:
enabled: true
hosts:
- dev-r.datahub.berkeley.edu
- dev.datahub.berkeley.edu
tls:
- secretName: tls-cert
hosts:
- dev-r.datahub.berkeley.edu
- dev.datahub.berkeley.edu
hub:
db:
pvc:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
nfsPVC:
nfs:
shareName: shares/dev-r/staging
shareName: shares/dev/staging

jupyterhub:
scheduling:
Expand All @@ -12,8 +12,8 @@ jupyterhub:
ingress:
enabled: true
hosts:
- dev-r-staging.datahub.berkeley.edu
- dev-staging.datahub.berkeley.edu
tls:
- secretName: tls-cert
hosts:
- dev-r-staging.datahub.berkeley.edu
- dev-staging.datahub.berkeley.edu
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
images:
images:
- name: us-central1-docker.pkg.dev/ucb-datahub-2018/user-images/dev-r-user-image
- name: us-central1-docker.pkg.dev/ucb-datahub-2018/user-images/dev-user-image
path: images/default
- name: us-central1-docker.pkg.dev/ucb-datahub-2018/user-images/dev-r-secondary
- name: us-central1-docker.pkg.dev/ucb-datahub-2018/user-images/dev-secondary
path: images/secondary
repo2docker:
base_image: docker.io/library/buildpack-deps:jammy
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ chartpress
jupyter-repo2docker==2024.3.0
myst-parser
chardet
requests==2.31.0
6 changes: 3 additions & 3 deletions scripts/delete-unused-users.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import json
import logging
import os
import requests
import niquests
import sys

from dateutil.parser import parse
Expand Down Expand Up @@ -55,7 +55,7 @@ def retrieve_users(hub_url, headers, inactive_since):
params = {}

while next_page:
r = requests.get(url, headers=headers, params=params)
r = niquests.get(url, headers=headers, params=params)
r.raise_for_status()
resp = r.json()
user_list = resp["items"]
Expand Down Expand Up @@ -104,7 +104,7 @@ def should_delete(user, inactive_since):

def delete_user(hub_url, headers, name):
"""Delete a given user by name via JupyterHub API"""
r = requests.delete(
r = niquests.delete(
hub_url.rstrip("/") + f"/hub/api/users/{name}",
headers=headers,
)
Expand Down
Loading