Skip to content

Commit ccccb9f

Browse files
authored
Release 26 01 27 (#1329)
2 parents b6f3c4b + 8821abd commit ccccb9f

File tree

202 files changed

+2728
-4030
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

202 files changed

+2728
-4030
lines changed

.github/workflows/rebase-prs-with-develop.yml renamed to .github/workflows/update-prs-with-develop.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Rebase PRs with develop
1+
name: Update PRs with develop
22

33
on:
44
push:
@@ -7,6 +7,8 @@ on:
77

88
jobs:
99
sync-prs:
10+
# Disabled until we can push with a PAT that has workflow scope; otherwise CI stays in "Waiting".
11+
if: ${{ false }}
1012
runs-on: ubuntu-latest
1113

1214
steps:
@@ -20,7 +22,9 @@ jobs:
2022
git config --global user.name "github-actions[bot]"
2123
git config --global user.email "github-actions[bot]@users.noreply.github.com"
2224
23-
- name: Rebase all open non-Dependabots PRs with develop branch as base
25+
- name: Merge develop into all open non-Dependabot PRs
26+
# TODO: Re-enable once we replace the default GITHUB_TOKEN with a PAT that has repo+workflow scopes
27+
# so that downstream PR checks trigger automatically after the bot pushes merge commits.
2428
env:
2529
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2630
run: |
@@ -32,14 +36,14 @@ jobs:
3236
gh pr checkout $pr
3337
git fetch origin develop
3438
35-
# Attempt rebase
36-
if git rebase origin/develop; then
37-
echo "PR #$pr rebased successfully. Pushing changes..."
38-
git push --force-with-lease
39+
# Attempt merge
40+
if git merge --no-edit origin/develop; then
41+
echo "PR #$pr merged successfully. Pushing changes..."
42+
git push
3943
else
40-
echo "Conflict in PR #$pr. Rebase aborted."
41-
git rebase --abort
44+
echo "Conflict in PR #$pr. Merge aborted."
45+
git merge --abort
4246
# Optional: Notify author
43-
gh pr comment $pr --body "⚠️ Automatic rebase failed due to conflicts. Please rebase manually."
47+
gh pr comment $pr --body "⚠️ Automatic merge of \`develop\` into this PR failed due to conflicts. Please resolve the conflicts and update your branch."
4448
fi
4549
done

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ apps/backend/node_modules
66
apps/frontend/src/generated
77
apps/backend/generated
88
.DS_Store
9+
documentation/.venv
10+
documentation/site/
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
DO
2+
$$
3+
BEGIN
4+
IF register_patch('DropUsersUsernameKey.sql', 'jekabskarklins', 'Deprecate username constraint. This fix is needed for the broken integration that is underway', '2025-12-11') THEN
5+
BEGIN
6+
ALTER TABLE IF EXISTS public.users
7+
DROP CONSTRAINT users_username_key;
8+
END;
9+
END IF;
10+
END;
11+
$$
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
-- 0181_RemoveUserColumns.sql
2+
DO
3+
$$
4+
BEGIN
5+
IF register_patch(
6+
'0182_RemoveUserColumns2.sql',
7+
'Fredrik Bolmsten',
8+
'Remove gender, telephone, username, position, placeholder, birthdate and department columns from users table',
9+
'2025-05-12'
10+
) THEN
11+
BEGIN
12+
-- now drop the unwanted columns
13+
ALTER TABLE public.users
14+
DROP COLUMN username,
15+
DROP COLUMN gender,
16+
DROP COLUMN birthdate,
17+
DROP COLUMN department,
18+
DROP COLUMN position,
19+
DROP COLUMN telephone;
20+
END;
21+
END IF;
22+
END;
23+
$$
24+
LANGUAGE plpgsql;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
DO
2+
$$
3+
BEGIN
4+
IF register_patch(
5+
'0205_DropTableRedeemCodes.sql',
6+
'Yoganandan Pandiyan',
7+
'Drop table redeem_codes',
8+
'2026-01-21'
9+
) THEN
10+
BEGIN
11+
DROP TABLE IF EXISTS public.redeem_codes;
12+
END;
13+
END IF;
14+
END;
15+
$$
16+
LANGUAGE plpgsql;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
DO
2+
$$
3+
BEGIN
4+
IF register_patch(
5+
'0206_DeleteFeatureEmailInviteLegacy.sql',
6+
'Yoganandan Pandiyan',
7+
'Delete feature EMAIL_INVITE_LEGACY',
8+
'2026-01-21'
9+
) THEN
10+
BEGIN
11+
DELETE FROM features WHERE feature_id = 'EMAIL_INVITE_LEGACY';
12+
END;
13+
END IF;
14+
END;
15+
$$
16+
LANGUAGE plpgsql;

apps/backend/db_patches/db_seeds/0002_InstrumentScientists.sql

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,25 @@ $DO$
33
BEGIN
44

55
INSERT INTO users(
6-
user_id, user_title, firstname, lastname, username, preferredname, oidc_sub, oauth_refresh_token, gender, birthdate, department, "position", email,
7-
telephone, created_at, updated_at, institution_id, placeholder)
8-
VALUES (100, '', 'Instrument', 'Scientist1', 'instr.sci1', '-', 'instr.sci1.oauthsub', 'dummy-refresh-token', 'e2e user', '2020-10-10', 'IT', '', 'instr.sci1@local.host', '', NOW(), NOW(), 1, false);
6+
user_id, user_title, firstname, lastname, preferredname, oidc_sub, oauth_refresh_token, email, created_at, updated_at, institution_id
7+
)
8+
VALUES (100, '', 'Instrument', 'Scientist1', '-', 'instr.sci1.oauthsub', 'dummy-refresh-token', 'instr.sci1@local.host', NOW(), NOW(), 1);
99

1010
INSERT INTO users(
11-
user_id, user_title, firstname, lastname, username, preferredname, oidc_sub, oauth_refresh_token, gender, birthdate, department, "position", email,
12-
telephone, created_at, updated_at, institution_id, placeholder)
13-
VALUES (101, '', 'Instrument', 'Scientist2', 'instr.sci2', '-', 'instr.sci2.oauthsub', 'dummy-refresh-token', 'e2e user', '2020-10-10', 'IT', '', 'instr.sci2@local.host', '', NOW(), NOW(), 1, false);
11+
user_id, user_title, firstname, lastname, preferredname, oidc_sub, oauth_refresh_token, email, created_at, updated_at, institution_id
12+
)
13+
VALUES (101, '', 'Instrument', 'Scientist2', '-', 'instr.sci2.oauthsub', 'dummy-refresh-token', 'instr.sci2@local.host', NOW(), NOW(), 1);
1414

1515
-- user account with every roles except instrument scientist and user officer
1616
INSERT INTO users(
17-
user_id, user_title, firstname, lastname, username, preferredname, oidc_sub, oauth_refresh_token, gender, birthdate, department, "position", email,
18-
telephone, created_at, updated_at, institution_id, placeholder)
19-
VALUES (102, '', 'Not', 'Scientist', 'not.instr.sci', '-', 'not.instr.sci.oauthsub', 'dummy-refresh-token', 'e2e user', '2020-10-10', 'IT', '', 'not.instr.sci@local.host', '', NOW(), NOW(), 1, false);
17+
user_id, user_title, firstname, lastname, preferredname, oidc_sub, oauth_refresh_token, email, created_at, updated_at, institution_id
18+
)
19+
VALUES (102, '', 'Not', 'Scientist', '-', 'not.instr.sci.oauthsub', 'dummy-refresh-token', 'not.instr.sci@local.host', NOW(), NOW(), 1);
2020

2121
-- user account with experiment safety reviewer
2222
INSERT INTO users(
23-
user_id, user_title, firstname, lastname, username, preferredname, oidc_sub, oauth_refresh_token, gender, birthdate, department, "position", email,
24-
telephone, created_at, updated_at, institution_id, placeholder)
25-
VALUES (103, '', 'Experiment', 'Safety', 'experiment.safety', '-', 'experiment.safety.oauthsub', 'dummy-refresh-token', 'e2e user', '2020-10-10', 'IT', '', 'experiment.safety@local.host', '', NOW(), NOW(), 1, false);
23+
user_id, user_title, firstname, lastname, preferredname, oidc_sub, oauth_refresh_token, email, created_at, updated_at, institution_id)
24+
VALUES (103, '', 'Experiment', 'Safety', 'experiment.safety', 'experiment.safety.oauthsub', 'dummy-refresh-token', 'experiment.safety@local.host', NOW(), NOW(), 1);
2625

2726
INSERT INTO role_user(
2827
role_id, user_id)

apps/backend/db_patches/db_seeds/0006_RedeemCodes.sql

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
DO
2+
$DO$
3+
DECLARE
4+
invite_id_var1 int;
5+
invite_id_var2 int;
6+
invite_id_var3 int;
7+
invite_id_var4 int;
8+
BEGIN
9+
10+
INSERT INTO invites (code, email, created_by, created_at, claimed_by, claimed_at, is_email_sent, expires_at, template_id)
11+
VALUES ('DAVE001', 'david@teleworm.us', 1, NOW(), NULL, NULL, false, NULL, 'user-office-registration-invitation-co-proposer');
12+
13+
SELECT invite_id
14+
INTO invite_id_var1
15+
FROM invites
16+
WHERE email = 'david@teleworm.us' AND code = 'DAVE001';
17+
18+
INSERT INTO invites (code, email, created_by, created_at, claimed_by, claimed_at, is_email_sent, expires_at, template_id)
19+
VALUES ('BEN001', 'ben@inbox.com', 1, NOW(), NULL, NULL, false, NULL, 'user-office-registration-invitation-co-proposer');
20+
21+
SELECT invite_id
22+
INTO invite_id_var2
23+
FROM invites
24+
WHERE email = 'ben@inbox.com' AND code = 'BEN001';
25+
26+
INSERT INTO co_proposer_claims (invite_id, proposal_pk) VALUES (invite_id_var1, 1);
27+
INSERT INTO co_proposer_claims (invite_id, proposal_pk) VALUES (invite_id_var2, 1);
28+
29+
INSERT INTO invites (code, email, created_by, created_at, claimed_by, claimed_at, is_email_sent, expires_at, template_id)
30+
VALUES ('DAVE002', 'david@teleworm.us', 1, NOW(), NULL, NULL, false, NULL, '');
31+
32+
SELECT invite_id
33+
INTO invite_id_var3
34+
FROM invites
35+
WHERE email = 'david@teleworm.us' AND code = 'DAVE002';
36+
37+
INSERT INTO invites (code, email, created_by, created_at, claimed_by, claimed_at, is_email_sent, expires_at, template_id)
38+
VALUES ('BEN002', 'ben@inbox.com', 1, NOW(), NULL, NULL, false, NULL, '');
39+
40+
SELECT invite_id
41+
INTO invite_id_var4
42+
FROM invites
43+
WHERE email = 'ben@inbox.com' AND code = 'BEN002';
44+
45+
INSERT INTO co_proposer_claims (invite_id, proposal_pk) VALUES (invite_id_var3, 2);
46+
INSERT INTO co_proposer_claims (invite_id, proposal_pk) VALUES (invite_id_var4, 2);
47+
48+
END;
49+
$DO$
50+
LANGUAGE plpgsql;

apps/backend/docker-compose-stfc.e2e.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
clam-antivirus:
3-
image: clamav/clamav:0.104
3+
image: clamav/clamav:1.5.1
44
ports:
55
- "3310:3310"
66

@@ -40,13 +40,13 @@ services:
4040
- "4500:4500"
4141
cap_add:
4242
- SYS_ADMIN
43-
43+
4444
mockServer:
4545
image: mockserver/mockserver:5.13.0
4646
command: -logLevel ERROR -serverPort 1080
4747
ports:
4848
- 1080:1080
49-
49+
5050
mockserver-client:
5151
image: "ghcr.io/userofficeproject/stfc-mockserver-client:master"
5252
command: sh -c "sleep 5 && node src/mockserver.js"

0 commit comments

Comments
 (0)