Skip to content

Commit db4ca4e

Browse files
Magnus SchiederMagnus Schieder
authored andcommitted
Merge staging/4.2.24 into stable/4.2.x. Update 20251027
2 parents 2a864ca + b1bb367 commit db4ca4e

32 files changed

+229
-161
lines changed

.github/startup-test/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ services:
1717

1818
datastore-reader:
1919
build:
20-
context: "https://github.com/OpenSlides/openslides-datastore-service.git#main"
20+
context: "https://github.com/OpenSlides/openslides-datastore-service.git#${COMPOSE_REFERENCE_BRANCH:-main}"
2121
args:
2222
MODULE: "reader"
2323
PORT: "9010"
@@ -31,7 +31,7 @@ services:
3131

3232
datastore-writer:
3333
build:
34-
context: "https://github.com/OpenSlides/openslides-datastore-service.git#main"
34+
context: "https://github.com/OpenSlides/openslides-datastore-service.git#${COMPOSE_REFERENCE_BRANCH:-main}"
3535
args:
3636
MODULE: "writer"
3737
PORT: "9011"

Makefile

Lines changed: 63 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,86 @@
1-
SERVICE=auth
1+
override SERVICE=auth
2+
override TEST_DC=CONTEXT="tests" docker compose -f docker-compose.dev.yml
3+
4+
# Build images for different contexts
25

36
build-prod:
4-
docker build ./ --tag "openslides-$(SERVICE)" --build-arg CONTEXT="prod" --target "prod"
7+
docker build ./ $(ARGS) --tag "openslides-$(SERVICE)" --build-arg CONTEXT="prod" --target "prod"
58

69
build-dev:
7-
docker build ./ --tag "openslides-$(SERVICE)-dev" --build-arg CONTEXT="dev" --target "dev"
8-
9-
build-test:
10-
docker build ./ --tag "openslides-$(SERVICE)-tests" --build-arg CONTEXT="tests" --target "tests"
10+
docker build ./ $(ARGS) --tag "openslides-$(SERVICE)-dev" --build-arg CONTEXT="dev" --target "dev"
1111

12-
run-dev-standalone: | build-dev
13-
CONTEXT="dev" docker compose -f docker-compose.dev.yml up
14-
stop-dev
12+
build-tests:
13+
docker build ./ $(ARGS) --tag "openslides-$(SERVICE)-tests" --build-arg CONTEXT="tests" --target "tests"
1514

16-
run-cleanup: | build-dev
17-
CONTEXT="dev" docker compose -f docker-compose.dev.yml up -d
18-
CONTEXT="dev" docker compose -f docker-compose.dev.yml exec auth ./wait-for.sh auth:9004
19-
CONTEXT="dev" docker compose -f docker-compose.dev.yml exec auth npm run cleanup
20-
CONTEXT="dev" docker compose -f docker-compose.dev.yml down
15+
# Tests
16+
run-tests:
17+
bash dev/run-tests.sh
2118

22-
run-pre-test: | build-test
23-
CONTEXT="tests" docker compose -f docker-compose.dev.yml up -d
24-
CONTEXT="tests" docker compose -f docker-compose.dev.yml exec -T auth ./wait-for.sh auth:9004
19+
lint:
20+
bash dev/run-lint.sh -l
2521

26-
run-bash run-dev: | run-pre-test
27-
USER_ID=$$(id -u $${USER}) GROUP_ID=$$(id -g $${USER}) CONTEXT="dev" docker compose -f docker-compose.dev.yml exec auth sh
22+
run-test-ci: | run-pre-test
23+
@echo "########################################################################"
24+
@echo "###################### Start full system tests #########################"
25+
@echo "########################################################################"
26+
$(TEST_DC) exec -T auth npm run test
27+
$(TEST_DC) exec -T auth pytest
2828

29-
run-check-lint: | run-pre-test
30-
CONTEXT="tests" docker compose -f docker-compose.dev.yml exec -T auth npm run lint-check
29+
# Cleanup
3130

32-
run-check-prettify: | run-pre-test
33-
CONTEXT="tests" docker compose -f docker-compose.dev.yml exec -T auth npm run prettify-check
31+
run-cleanup:
32+
make dev-detached ARGS="auth"
33+
make dev-exec ARGS="auth ./wait-for.sh auth:9004"
34+
make dev-exec ARGS="auth npm run cleanup"
35+
make dev-stop
3436

35-
run-check-black: | run-pre-test
36-
CONTEXT="tests" docker compose -f docker-compose.dev.yml exec -w /app/libraries/pip-auth/ -T auth black --check --diff authlib/ tests/
37+
########################## Deprecation List ##########################
3738

38-
run-check-isort: | run-pre-test
39-
CONTEXT="tests" docker compose -f docker-compose.dev.yml exec -w /app/libraries/pip-auth/ -T auth isort --check-only --diff authlib/ tests/
39+
deprecation-warning:
40+
@echo "\033[1;33m DEPRECATION WARNING: This make command is deprecated and will be removed soon! \033[0m"
4041

41-
run-check-flake8: | run-pre-test
42-
CONTEXT="tests" docker compose -f docker-compose.dev.yml exec -w /app/libraries/pip-auth/ -T auth flake8 authlib/ tests/
42+
deprecation-warning-alternative: | deprecation-warning
43+
@echo "\033[1;33m Please use the following command instead: $(ALTERNATIVE) \033[0m"
4344

44-
run-check-mypy: | run-pre-test
45-
CONTEXT="tests" docker compose -f docker-compose.dev.yml exec -w /app/libraries/pip-auth/ -T auth mypy authlib/ tests/
45+
run-dev run-dev-attach run-dev-attached run-dev-standalone run-bash run-dev-interactive stop-dev:
46+
@make deprecation-warning-alternative ALTERNATIVE="dev and derivative maketargets are now only available in main repository. (use 'make dev-help' in main repository for more information)"
4647

47-
run-tests:
48+
run-test:
49+
@make deprecation-warning-alternative ALTERNATIVE="run-tests"
4850
bash dev/run-tests.sh
4951

50-
run-test-ci: | run-pre-test
51-
@echo "########################################################################"
52-
@echo "###################### Start full system tests #########################"
53-
@echo "########################################################################"
54-
CONTEXT="tests" docker compose -f docker-compose.dev.yml exec -T auth npm run test
55-
CONTEXT="tests" docker compose -f docker-compose.dev.yml exec -T auth pytest
56-
57-
run-cleanup-ci: | build-dev
58-
CONTEXT="tests" docker compose -f docker-compose.dev.yml up -d
59-
CONTEXT="tests" docker compose -f docker-compose.dev.yml exec auth ./wait-for.sh auth:9004
60-
CONTEXT="tests" docker compose -f docker-compose.dev.yml exec auth npm run cleanup
61-
CONTEXT="tests" docker compose -f docker-compose.dev.yml down
62-
63-
run-test-and-stop: | run-test
52+
run-test-and-stop: | deprecation-warning run-test
6453
stop-dev
6554

66-
run-test-prod: | build-prod
55+
run-test-prod: | deprecation-warning build-prod
6756
docker compose -f .github/startup-test/docker-compose.yml up -d
6857
docker compose -f .github/startup-test/docker-compose.yml exec -T auth ./wait-for.sh auth:9004
6958
docker compose -f .github/startup-test/docker-compose.yml down
7059

71-
stop-dev:
72-
CONTEXT="dev" docker compose -f docker-compose.dev.yml down
60+
run-pre-test: | deprecation-warning build-tests
61+
$(TEST_DC) up -d
62+
$(TEST_DC) exec -T auth ./wait-for.sh auth:9004
63+
64+
run-check-lint: | deprecation-warning run-pre-test
65+
$(TEST_DC) exec -T auth npm run lint-check
66+
67+
run-check-prettify: | deprecation-warning run-pre-test
68+
$(TEST_DC) exec -T auth npm run prettify-check
69+
70+
run-check-black: | deprecation-warning run-pre-test
71+
$(TEST_DC) exec -w /app/libraries/pip-auth/ -T auth black --check --diff osauthlib/ tests/
72+
73+
run-check-isort: | deprecation-warning run-pre-test
74+
$(TEST_DC) exec -w /app/libraries/pip-auth/ -T auth isort --check-only --diff osauthlib/ tests/
75+
76+
run-check-flake8: | deprecation-warning run-pre-test
77+
$(TEST_DC) exec -w /app/libraries/pip-auth/ -T auth flake8 osauthlib/ tests/
78+
79+
run-check-mypy: | deprecation-warning run-pre-test
80+
$(TEST_DC) exec -w /app/libraries/pip-auth/ -T auth mypy osauthlib/ tests/
81+
82+
run-cleanup-ci: | deprecation-warning build-dev
83+
$(TEST_DC) up -d
84+
$(TEST_DC) exec auth ./wait-for.sh auth:9004
85+
$(TEST_DC) exec auth npm run cleanup
86+
$(TEST_DC) down

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ The pip-library has the following API:
236236

237237
````python
238238
# The class `AuthHandler` and the constants `AUTHENTICATION_HEADER`, `AUTHORIZATION_HEADER`, `COOKIE_NAME` are exported
239-
from authlib import AuthHandler, AUTHENTICATION_HEADER, AUTHORIZATION_HEADER, COOKIE_NAME
239+
from osauthlib import AuthHandler, AUTHENTICATION_HEADER, AUTHORIZATION_HEADER, COOKIE_NAME
240240

241241
authhandler = AuthHandler(debug_fn?) # Optional: a function to print debug information can be passed.
242242
access_token = requests.headers.get(HEADER_NAME, NONE)

auth/libraries/pip-auth/cleanup.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#/bin/bash
22

33
printf "Autoflake:\n"
4-
autoflake authlib/ tests/
4+
autoflake osauthlib/ tests/
55
printf "Black:\n"
6-
black authlib/ tests/
6+
black osauthlib/ tests/
77
printf "Isort:\n"
8-
isort authlib/ tests/
8+
isort osauthlib/ tests/
99
printf "Flake8:\n"
10-
flake8 authlib/ tests/
10+
flake8 osauthlib/ tests/
1111
printf "Mypy:\n"
12-
mypy authlib/ tests/
12+
mypy osauthlib/ tests/
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)