events: fix lint (#7700)

* events: fix lint

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* test without explicit poetry env use?

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* delete previous poetry env

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* prevent invalid cached poetry envs

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* run test-from-stable as matrix and make required

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* fix missing postgres version

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* sigh

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* idk

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
# Conflicts:
#	.github/actions/setup/action.yml
#	.github/workflows/ci-main.yml
This commit is contained in:
Jens L 2023-11-23 23:59:42 +01:00 committed by Jens Langhammer
parent acc3b59869
commit fcd6dc1d60
No known key found for this signature in database
13 changed files with 1473 additions and 1772 deletions

View File

@ -2,7 +2,7 @@ name: "Setup authentik testing environment"
description: "Setup authentik testing environment"
inputs:
postgresql_tag:
postgresql_version:
description: "Optional postgresql image tag"
default: "12"
@ -33,9 +33,8 @@ runs:
- name: Setup dependencies
shell: bash
run: |
export PSQL_TAG=${{ inputs.postgresql_tag }}
export PSQL_TAG=${{ inputs.postgresql_version }}
docker-compose -f .github/actions/setup/docker-compose.yml up -d
poetry env use python3.11
poetry install
cd web && npm ci
- name: Generate config

View File

@ -91,14 +91,13 @@ jobs:
git checkout $GITHUB_SHA
# Delete previous poetry env
rm -rf $(poetry env info --path)
poetry install
- name: Setup authentik env (ensure latest deps are installed)
uses: ./.github/actions/setup
with:
postgresql_version: ${{ matrix.psql }}
- name: migrate to latest
run: |
poetry install
poetry run python -m lifecycle.migrate
run: poetry run python -m lifecycle.migrate
test-unittest:
name: test-unittest - PostgreSQL ${{ matrix.psql }}
runs-on: ubuntu-latest

View File

@ -164,9 +164,10 @@ def sanitize_item(value: Any) -> Any:
if isinstance(value, (bool, int, float, NoneType, list, tuple, dict)):
return value
try:
return DjangoJSONEncoder.default(value)
finally:
return DjangoJSONEncoder().default(value)
except TypeError:
return str(value)
return str(value)
def sanitize_dict(source: dict[Any, Any]) -> dict[Any, Any]:

View File

@ -6038,32 +6038,11 @@ Bindings to groups/users are checked against the user of the event.</source>
<trans-unit id="s32babfed740fd3c1">
<source>User type used for newly created users.</source>
</trans-unit>
<trans-unit id="s4a34a6be4c68ec87">
<source>Users created</source>
</trans-unit>
<trans-unit id="s275c956687e2e656">
<source>Failed logins</source>
</trans-unit>
<trans-unit id="sb35c08e3a541188f">
<source>Also known as Client ID.</source>
</trans-unit>
<trans-unit id="sd46fd9b647cfea10">
<source>Also known as Client Secret.</source>
</trans-unit>
<trans-unit id="s4476e9c50cfd13f4">
<source>Global status</source>
</trans-unit>
<trans-unit id="sd21a971eea208533">
<source>Vendor</source>
</trans-unit>
<trans-unit id="sadadfe9dfa06d7dd">
<source>No sync status.</source>
</trans-unit>
<trans-unit id="s2b1c81130a65a55b">
<source>Sync currently running.</source>
</trans-unit>
<trans-unit id="sf36170f71cea38c2">
<source>Connectivity</source>
</trans-unit>
</body>
</file>

View File

@ -6319,32 +6319,11 @@ Bindings to groups/users are checked against the user of the event.</source>
<trans-unit id="s32babfed740fd3c1">
<source>User type used for newly created users.</source>
</trans-unit>
<trans-unit id="s4a34a6be4c68ec87">
<source>Users created</source>
</trans-unit>
<trans-unit id="s275c956687e2e656">
<source>Failed logins</source>
</trans-unit>
<trans-unit id="sb35c08e3a541188f">
<source>Also known as Client ID.</source>
</trans-unit>
<trans-unit id="sd46fd9b647cfea10">
<source>Also known as Client Secret.</source>
</trans-unit>
<trans-unit id="s4476e9c50cfd13f4">
<source>Global status</source>
</trans-unit>
<trans-unit id="sd21a971eea208533">
<source>Vendor</source>
</trans-unit>
<trans-unit id="sadadfe9dfa06d7dd">
<source>No sync status.</source>
</trans-unit>
<trans-unit id="s2b1c81130a65a55b">
<source>Sync currently running.</source>
</trans-unit>
<trans-unit id="sf36170f71cea38c2">
<source>Connectivity</source>
</trans-unit>
</body>
</file>

View File

@ -5953,32 +5953,11 @@ Bindings to groups/users are checked against the user of the event.</source>
<trans-unit id="s32babfed740fd3c1">
<source>User type used for newly created users.</source>
</trans-unit>
<trans-unit id="s4a34a6be4c68ec87">
<source>Users created</source>
</trans-unit>
<trans-unit id="s275c956687e2e656">
<source>Failed logins</source>
</trans-unit>
<trans-unit id="sb35c08e3a541188f">
<source>Also known as Client ID.</source>
</trans-unit>
<trans-unit id="sd46fd9b647cfea10">
<source>Also known as Client Secret.</source>
</trans-unit>
<trans-unit id="s4476e9c50cfd13f4">
<source>Global status</source>
</trans-unit>
<trans-unit id="sd21a971eea208533">
<source>Vendor</source>
</trans-unit>
<trans-unit id="sadadfe9dfa06d7dd">
<source>No sync status.</source>
</trans-unit>
<trans-unit id="s2b1c81130a65a55b">
<source>Sync currently running.</source>
</trans-unit>
<trans-unit id="sf36170f71cea38c2">
<source>Connectivity</source>
</trans-unit>
</body>
</file>

File diff suppressed because it is too large Load Diff

View File

@ -6161,32 +6161,11 @@ Bindings to groups/users are checked against the user of the event.</source>
<trans-unit id="s32babfed740fd3c1">
<source>User type used for newly created users.</source>
</trans-unit>
<trans-unit id="s4a34a6be4c68ec87">
<source>Users created</source>
</trans-unit>
<trans-unit id="s275c956687e2e656">
<source>Failed logins</source>
</trans-unit>
<trans-unit id="sb35c08e3a541188f">
<source>Also known as Client ID.</source>
</trans-unit>
<trans-unit id="sd46fd9b647cfea10">
<source>Also known as Client Secret.</source>
</trans-unit>
<trans-unit id="s4476e9c50cfd13f4">
<source>Global status</source>
</trans-unit>
<trans-unit id="sd21a971eea208533">
<source>Vendor</source>
</trans-unit>
<trans-unit id="sadadfe9dfa06d7dd">
<source>No sync status.</source>
</trans-unit>
<trans-unit id="s2b1c81130a65a55b">
<source>Sync currently running.</source>
</trans-unit>
<trans-unit id="sf36170f71cea38c2">
<source>Connectivity</source>
</trans-unit>
</body>
</file>

View File

@ -7848,31 +7848,10 @@ Bindings to groups/users are checked against the user of the event.</source>
<trans-unit id="s32babfed740fd3c1">
<source>User type used for newly created users.</source>
</trans-unit>
<trans-unit id="s4a34a6be4c68ec87">
<source>Users created</source>
</trans-unit>
<trans-unit id="s275c956687e2e656">
<source>Failed logins</source>
</trans-unit>
<trans-unit id="sb35c08e3a541188f">
<source>Also known as Client ID.</source>
</trans-unit>
<trans-unit id="sd46fd9b647cfea10">
<source>Also known as Client Secret.</source>
</trans-unit>
<trans-unit id="s4476e9c50cfd13f4">
<source>Global status</source>
</trans-unit>
<trans-unit id="sd21a971eea208533">
<source>Vendor</source>
</trans-unit>
<trans-unit id="sadadfe9dfa06d7dd">
<source>No sync status.</source>
</trans-unit>
<trans-unit id="s2b1c81130a65a55b">
<source>Sync currently running.</source>
</trans-unit>
<trans-unit id="sf36170f71cea38c2">
<source>Connectivity</source>
</trans-unit>
</body></file></xliff>

View File

@ -5946,32 +5946,11 @@ Bindings to groups/users are checked against the user of the event.</source>
<trans-unit id="s32babfed740fd3c1">
<source>User type used for newly created users.</source>
</trans-unit>
<trans-unit id="s4a34a6be4c68ec87">
<source>Users created</source>
</trans-unit>
<trans-unit id="s275c956687e2e656">
<source>Failed logins</source>
</trans-unit>
<trans-unit id="sb35c08e3a541188f">
<source>Also known as Client ID.</source>
</trans-unit>
<trans-unit id="sd46fd9b647cfea10">
<source>Also known as Client Secret.</source>
</trans-unit>
<trans-unit id="s4476e9c50cfd13f4">
<source>Global status</source>
</trans-unit>
<trans-unit id="sd21a971eea208533">
<source>Vendor</source>
</trans-unit>
<trans-unit id="sadadfe9dfa06d7dd">
<source>No sync status.</source>
</trans-unit>
<trans-unit id="s2b1c81130a65a55b">
<source>Sync currently running.</source>
</trans-unit>
<trans-unit id="sf36170f71cea38c2">
<source>Connectivity</source>
</trans-unit>
</body>
</file>

View File

@ -7942,34 +7942,11 @@ Bindings to groups/users are checked against the user of the event.</source>
<source>User type used for newly created users.</source>
<target>新创建用户使用的用户类型。</target>
</trans-unit>
<trans-unit id="s4a34a6be4c68ec87">
<source>Users created</source>
<target>已创建用户</target>
</trans-unit>
<trans-unit id="s275c956687e2e656">
<source>Failed logins</source>
<target>失败登录</target>
</trans-unit>
<trans-unit id="sb35c08e3a541188f">
<source>Also known as Client ID.</source>
</trans-unit>
<trans-unit id="sd46fd9b647cfea10">
<source>Also known as Client Secret.</source>
</trans-unit>
<trans-unit id="s4476e9c50cfd13f4">
<source>Global status</source>
</trans-unit>
<trans-unit id="sd21a971eea208533">
<source>Vendor</source>
</trans-unit>
<trans-unit id="sadadfe9dfa06d7dd">
<source>No sync status.</source>
</trans-unit>
<trans-unit id="s2b1c81130a65a55b">
<source>Sync currently running.</source>
</trans-unit>
<trans-unit id="sf36170f71cea38c2">
<source>Connectivity</source>
</trans-unit>
</body>
</file>

View File

@ -5994,32 +5994,11 @@ Bindings to groups/users are checked against the user of the event.</source>
<trans-unit id="s32babfed740fd3c1">
<source>User type used for newly created users.</source>
</trans-unit>
<trans-unit id="s4a34a6be4c68ec87">
<source>Users created</source>
</trans-unit>
<trans-unit id="s275c956687e2e656">
<source>Failed logins</source>
</trans-unit>
<trans-unit id="sb35c08e3a541188f">
<source>Also known as Client ID.</source>
</trans-unit>
<trans-unit id="sd46fd9b647cfea10">
<source>Also known as Client Secret.</source>
</trans-unit>
<trans-unit id="s4476e9c50cfd13f4">
<source>Global status</source>
</trans-unit>
<trans-unit id="sd21a971eea208533">
<source>Vendor</source>
</trans-unit>
<trans-unit id="sadadfe9dfa06d7dd">
<source>No sync status.</source>
</trans-unit>
<trans-unit id="s2b1c81130a65a55b">
<source>Sync currently running.</source>
</trans-unit>
<trans-unit id="sf36170f71cea38c2">
<source>Connectivity</source>
</trans-unit>
</body>
</file>

View File

@ -5993,32 +5993,11 @@ Bindings to groups/users are checked against the user of the event.</source>
<trans-unit id="s32babfed740fd3c1">
<source>User type used for newly created users.</source>
</trans-unit>
<trans-unit id="s4a34a6be4c68ec87">
<source>Users created</source>
</trans-unit>
<trans-unit id="s275c956687e2e656">
<source>Failed logins</source>
</trans-unit>
<trans-unit id="sb35c08e3a541188f">
<source>Also known as Client ID.</source>
</trans-unit>
<trans-unit id="sd46fd9b647cfea10">
<source>Also known as Client Secret.</source>
</trans-unit>
<trans-unit id="s4476e9c50cfd13f4">
<source>Global status</source>
</trans-unit>
<trans-unit id="sd21a971eea208533">
<source>Vendor</source>
</trans-unit>
<trans-unit id="sadadfe9dfa06d7dd">
<source>No sync status.</source>
</trans-unit>
<trans-unit id="s2b1c81130a65a55b">
<source>Sync currently running.</source>
</trans-unit>
<trans-unit id="sf36170f71cea38c2">
<source>Connectivity</source>
</trans-unit>
</body>
</file>