Skip to content

Commit 36a0fb6

Browse files
authored
Merge branch 'master' into goal-timeline
2 parents a917ccd + f04266c commit 36a0fb6

36 files changed

+212
-605
lines changed

Backend.Tests/Controllers/StatisticsControllerTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,21 +151,21 @@ public async Task TestGetSemanticDomainUserCountsNoPermission()
151151
{
152152
_statsController.ControllerContext.HttpContext = PermissionServiceMock.UnauthorizedHttpContext();
153153

154-
var result = await _statsController.GetSemanticDomainUserCounts(_projId, "en");
154+
var result = await _statsController.GetSemanticDomainUserCounts(_projId);
155155
Assert.That(result, Is.InstanceOf<ForbidResult>());
156156
}
157157

158158
[Test]
159159
public async Task TestGetSemanticDomainUserCountsMissingProject()
160160
{
161-
var result = await _statsController.GetSemanticDomainUserCounts(MissingId, "en");
161+
var result = await _statsController.GetSemanticDomainUserCounts(MissingId);
162162
Assert.That(result, Is.InstanceOf<NotFoundObjectResult>());
163163
}
164164

165165
[Test]
166166
public async Task TestGetSemanticDomainUserCounts()
167167
{
168-
var result = await _statsController.GetSemanticDomainUserCounts(_projId, "en");
168+
var result = await _statsController.GetSemanticDomainUserCounts(_projId);
169169
Assert.That(result, Is.InstanceOf<OkObjectResult>());
170170
}
171171
}

Backend.Tests/Controllers/UserControllerTests.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public void TestResetPasswordRequest()
7070
// Returns Ok regardless of if user exists.
7171
var noUserResult = _userController.ResetPasswordRequest(new()).Result;
7272
Assert.That(noUserResult, Is.TypeOf<OkResult>());
73-
var username = (_userRepo.Create(new() { Username = "Imarealboy" }).Result)!.Username;
73+
var username = _userRepo.Create(new() { Username = "Imarealboy" }).Result!.Username;
7474
var yesUserResult = _userController.ResetPasswordRequest(new() { EmailOrUsername = username }).Result;
7575
Assert.That(yesUserResult, Is.TypeOf<OkResult>());
7676
}
@@ -342,14 +342,5 @@ public void TestIsEmailOrUsernameAvailable()
342342
var result5 = (ObjectResult)_userController.IsEmailOrUsernameAvailable("").Result;
343343
Assert.That(result5.Value, Is.False);
344344
}
345-
346-
[Test]
347-
public void TestIsUserSiteAdminNoPermission()
348-
{
349-
_userController.ControllerContext.HttpContext = PermissionServiceMock.UnauthorizedHttpContext();
350-
var result = _userController.IsUserSiteAdmin().Result;
351-
Assert.That(result, Is.InstanceOf<ObjectResult>());
352-
Assert.That(((ObjectResult)result).Value, Is.False);
353-
}
354345
}
355346
}

Backend/Controllers/StatisticsController.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ public async Task<IActionResult> GetSemanticDomainCounts(string projectId, strin
4848
return Ok(await _statService.GetSemanticDomainCounts(projectId, lang));
4949
}
5050

51-
5251
/// <summary> Get a list of <see cref="WordsPerDayPerUserCount"/>s of a specific project in order </summary>
5352
/// <returns> A list of <see cref="WordsPerDayPerUserCount"/>s </returns>
5453
[HttpGet("GetWordsPerDayPerUserCounts", Name = "GetWordsPerDayPerUserCounts")]
@@ -70,7 +69,6 @@ public async Task<IActionResult> GetWordsPerDayPerUserCounts(string projectId)
7069
return Ok(await _statService.GetWordsPerDayPerUserCounts(projectId));
7170
}
7271

73-
7472
/// <summary> Get a <see cref="ChartRootData"/> to generate an estimate Line Chart </summary>
7573
[HttpGet("GetProgressEstimationLineChartRoot", Name = "GetProgressEstimationLineChartRoot")]
7674
[ProducesResponseType(StatusCodes.Status200OK, Type = typeof(ChartRootData))]
@@ -91,7 +89,6 @@ public async Task<IActionResult> GetProgressEstimationLineChartRoot(string proje
9189
return Ok(await _statService.GetProgressEstimationLineChartRoot(projectId, proj.WorkshopSchedule));
9290
}
9391

94-
9592
/// <summary> Get a <see cref="ChartRootData"/> to generate a Line Chart </summary>
9693
[HttpGet("GetLineChartRootData", Name = "GetLineChartRootData")]
9794
[ProducesResponseType(StatusCodes.Status200OK, Type = typeof(ChartRootData))]
@@ -112,13 +109,11 @@ public async Task<IActionResult> GetLineChartRootData(string projectId)
112109
return Ok(await _statService.GetLineChartRootData(projectId));
113110
}
114111

115-
116-
117112
/// <summary> Get a list of <see cref="SemanticDomainUserCount"/>s of a specific project in order </summary>
118113
/// <returns> A list of <see cref="SemanticDomainUserCount"/>s </returns>
119114
[HttpGet("GetSemanticDomainUserCounts", Name = "GetSemanticDomainUserCounts")]
120115
[ProducesResponseType(StatusCodes.Status200OK, Type = typeof(List<SemanticDomainUserCount>))]
121-
public async Task<IActionResult> GetSemanticDomainUserCounts(string projectId, string lang)
116+
public async Task<IActionResult> GetSemanticDomainUserCounts(string projectId)
122117
{
123118
if (!await _permissionService.HasProjectPermission(HttpContext, Permission.Statistics, projectId))
124119
{

Backend/Controllers/UserController.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -275,13 +275,5 @@ public async Task<IActionResult> DeleteUser(string userId)
275275

276276
return await _userRepo.Delete(userId) ? Ok() : NotFound();
277277
}
278-
279-
/// <summary> Checks if current user is a site administrator. </summary>
280-
[HttpGet("issiteadmin", Name = "IsUserSiteAdmin")]
281-
[ProducesResponseType(StatusCodes.Status200OK, Type = typeof(bool))]
282-
public async Task<IActionResult> IsUserSiteAdmin()
283-
{
284-
return Ok(await _permissionService.IsSiteAdmin(HttpContext));
285-
}
286278
}
287279
}

Backend/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
############################################################
88

99
# Docker multi-stage build
10-
FROM mcr.microsoft.com/dotnet/sdk:8.0.406-jammy AS builder
10+
FROM mcr.microsoft.com/dotnet/sdk:8.0.409-jammy AS builder
1111
WORKDIR /app
1212

1313
# Copy csproj and restore (fetch dependencies) as distinct layers.
@@ -19,7 +19,7 @@ COPY . ./
1919
RUN dotnet publish -c Release -o build
2020

2121
# Build runtime image.
22-
FROM mcr.microsoft.com/dotnet/aspnet:8.0.13-jammy
22+
FROM mcr.microsoft.com/dotnet/aspnet:8.0.16-jammy
2323

2424
ENV ASPNETCORE_URLS=http://+:5000
2525
ENV COMBINE_IS_IN_CONTAINER=1

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
############################################################
88

99
# User guide build environment
10-
FROM python:3.12.8-slim-bookworm AS user_guide_builder
10+
FROM python:3.12.10-slim-bookworm AS user_guide_builder
1111

1212
ENV PYTHONDONTWRITEBYTECODE=1
1313
ENV PYTHONUNBUFFERED=1
@@ -24,7 +24,7 @@ COPY docs/user_guide docs/user_guide
2424
RUN tox -e user-guide
2525

2626
# Frontend build environment.
27-
FROM node:20.18.1-bookworm-slim AS frontend_builder
27+
FROM node:20.19.1-bookworm-slim AS frontend_builder
2828
WORKDIR /app
2929

3030
# Install app dependencies.
@@ -36,7 +36,7 @@ COPY . ./
3636
RUN npm run build
3737

3838
# Production environment.
39-
FROM nginx:1.27
39+
FROM nginx:1.28.0
4040

4141
WORKDIR /app
4242

README.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ environment. This will be denoted with the `(venv)` prefix on the prompt.
228228
With an active virtual environment, install Python development requirements for this project:
229229

230230
```bash
231-
python -m pip install --upgrade pip pip-tools
232-
python -m piptools sync dev-requirements.txt
231+
python -m pip -q install --upgrade pip pip-tools
232+
python -m piptools sync -q dev-requirements.txt
233233
```
234234

235235
The following Python scripts can now be run from the virtual environment.
@@ -246,12 +246,19 @@ To run all Python linting steps:
246246
tox
247247
```
248248

249-
To upgrade all pinned dependencies:
249+
To upgrade all pinned development dependencies:
250250

251251
```bash
252252
python -m piptools compile --upgrade dev-requirements.in
253253
```
254254

255+
To upgrade the pinned dependencies for deployment:
256+
257+
```bash
258+
cd deploy
259+
python -m piptools compile --upgrade requirements.in
260+
```
261+
255262
To upgrade the pinned dependencies for the Maintenance container:
256263

257264
```bash
@@ -976,13 +983,13 @@ Task: add an existing user to a project
976983
Run:
977984

978985
```bash
979-
kubectl exec -it deployment/maintenance -- add_user_to_proj.py --project <PROJECT_NAME> --user <USER>
986+
kubectl -n thecombine exec -it deployment/maintenance -- add_user_to_proj.py --project <PROJECT_NAME> --user <USER>
980987
```
981988

982989
For additional options, run:
983990

984991
```bash
985-
kubectl exec -it deployment/maintenance -- add_user_to_proj.py --help`
992+
kubectl -n thecombine exec -it deployment/maintenance -- add_user_to_proj.py --help
986993
```
987994

988995
#### Backup _TheCombine_
@@ -992,7 +999,7 @@ Task: Backup the CombineDatabase and the Backend files to the Amazon Simple Stor
992999
Run:
9931000

9941001
```bash
995-
kubectl exec -it deployment/maintenance -- combine_backup.py [--verbose]
1002+
kubectl -n thecombine exec -it deployment/maintenance -- combine_backup.py [--verbose]
9961003
```
9971004

9981005
Notes:
@@ -1010,7 +1017,7 @@ Task: Delete a project
10101017
Run:
10111018

10121019
```bash
1013-
kubectl exec -it deployment/maintenance -- rm_project.py <PROJECT_NAME>
1020+
kubectl -n thecombine exec -it deployment/maintenance -- rm_project.py <PROJECT_NAME>
10141021
```
10151022

10161023
You may specify more than one `<PROJECT_NAME>` to delete multiple projects.
@@ -1022,7 +1029,7 @@ Task: Restore the CombineDatabase and the Backend files from a backup stored on
10221029
Run:
10231030

10241031
```bash
1025-
kubectl exec -it deployment/maintenance -- combine_restore.py [--verbose] [BACKUP_NAME]
1032+
kubectl -n thecombine exec -it deployment/maintenance -- combine_restore.py [--verbose] [BACKUP_NAME]
10261033
```
10271034

10281035
Note:

database/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# - Intel/AMD 64-bit
66
# - ARM 64-bit
77
############################################################
8-
FROM mongo:7.0.16-jammy
8+
FROM mongo:7.0.20-jammy
99

1010
WORKDIR /
1111

deploy/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# - Intel/AMD 64-bit
66
############################################################
77

8-
FROM python:3.12.8-slim-bookworm
8+
FROM python:3.12.10-slim-bookworm
99

1010
USER root
1111

deploy/requirements.txt

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,56 +4,56 @@
44
#
55
# pip-compile requirements.in
66
#
7-
ansible==11.1.0
7+
ansible==11.6.0
88
# via -r requirements.in
9-
ansible-core==2.18.1
9+
ansible-core==2.18.6
1010
# via ansible
11-
cachetools==5.5.0
11+
cachetools==5.5.2
1212
# via google-auth
13-
certifi==2024.8.30
13+
certifi==2025.4.26
1414
# via
1515
# kubernetes
1616
# requests
1717
cffi==1.17.1
1818
# via cryptography
19-
charset-normalizer==3.4.0
19+
charset-normalizer==3.4.2
2020
# via requests
21-
cryptography==44.0.0
21+
cryptography==45.0.4
2222
# via
2323
# ansible-core
2424
# pyopenssl
25-
durationpy==0.9
25+
durationpy==0.10
2626
# via kubernetes
27-
google-auth==2.36.0
27+
google-auth==2.40.3
2828
# via kubernetes
2929
idna==3.10
3030
# via requests
31-
jinja2==3.1.4
31+
jinja2==3.1.6
3232
# via
3333
# -r requirements.in
3434
# ansible-core
3535
# jinja2-base64-filters
3636
jinja2-base64-filters==0.1.4
3737
# via -r requirements.in
38-
kubernetes==31.0.0
38+
kubernetes==33.1.0
3939
# via -r requirements.in
4040
markupsafe==3.0.2
4141
# via jinja2
4242
oauthlib==3.2.2
4343
# via
4444
# kubernetes
4545
# requests-oauthlib
46-
packaging==24.2
46+
packaging==25.0
4747
# via ansible-core
4848
pyasn1==0.6.1
4949
# via
5050
# pyasn1-modules
5151
# rsa
52-
pyasn1-modules==0.4.1
52+
pyasn1-modules==0.4.2
5353
# via google-auth
5454
pycparser==2.22
5555
# via cffi
56-
pyopenssl==24.3.0
56+
pyopenssl==25.1.0
5757
# via -r requirements.in
5858
python-dateutil==2.9.0.post0
5959
# via kubernetes
@@ -62,21 +62,23 @@ pyyaml==6.0.2
6262
# -r requirements.in
6363
# ansible-core
6464
# kubernetes
65-
requests==2.32.3
65+
requests==2.32.4
6666
# via
6767
# kubernetes
6868
# requests-oauthlib
6969
requests-oauthlib==2.0.0
7070
# via kubernetes
7171
resolvelib==1.0.1
7272
# via ansible-core
73-
rsa==4.9
73+
rsa==4.9.1
7474
# via google-auth
7575
six==1.17.0
7676
# via
7777
# kubernetes
7878
# python-dateutil
79-
urllib3==2.2.3
79+
typing-extensions==4.14.0
80+
# via pyopenssl
81+
urllib3==2.4.0
8082
# via
8183
# kubernetes
8284
# requests

deploy/scripts/setup_files/cluster_config.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,11 @@ cert-manager:
4545
name: cert-manager
4646
reference: jetstack/cert-manager
4747
namespace: cert-manager
48-
version: v1.12.3
48+
version: v1.17.1
4949
wait: true
5050
override:
51-
installCRDs: true
51+
crds:
52+
enabled: true
5253

5354
nginx-ingress-controller:
5455
repo:
@@ -68,7 +69,7 @@ rancher-ui:
6869
name: rancher
6970
reference: rancher-stable/rancher
7071
namespace: cattle-system
71-
version: 2.7.6
72+
version: 2.10.4
7273
wait: true
7374
override:
7475
hostname: rancher.thecombine.app

0 commit comments

Comments
 (0)