Skip to content

Commit

Permalink
events: fix lint (#7700)
Browse files Browse the repository at this point in the history
* events: fix lint

Signed-off-by: Jens Langhammer <[email protected]>

* test without explicit poetry env use?

Signed-off-by: Jens Langhammer <[email protected]>

* delete previous poetry env

Signed-off-by: Jens Langhammer <[email protected]>

* prevent invalid cached poetry envs

Signed-off-by: Jens Langhammer <[email protected]>

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

Signed-off-by: Jens Langhammer <[email protected]>

* fix missing postgres version

Signed-off-by: Jens Langhammer <[email protected]>

* sigh

Signed-off-by: Jens Langhammer <[email protected]>

* idk

Signed-off-by: Jens Langhammer <[email protected]>

---------

Signed-off-by: Jens Langhammer <[email protected]>
# Conflicts:
#	.github/actions/setup/action.yml
#	.github/workflows/ci-main.yml
  • Loading branch information
BeryJu committed Dec 19, 2023
1 parent acc3b59 commit fcd6dc1
Show file tree
Hide file tree
Showing 13 changed files with 1,473 additions and 1,772 deletions.
5 changes: 2 additions & 3 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions authentik/events/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down
21 changes: 0 additions & 21 deletions web/xliff/de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
21 changes: 0 additions & 21 deletions web/xliff/en.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
21 changes: 0 additions & 21 deletions web/xliff/es.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Loading

0 comments on commit fcd6dc1

Please sign in to comment.