Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: modular urls #5551

Merged
merged 2 commits into from May 9, 2023
Merged

api: modular urls #5551

merged 2 commits into from May 9, 2023

Conversation

BeryJu
Copy link
Member

@BeryJu BeryJu commented May 9, 2023

Details

In preparation for enterprise (which for now is a django app that is only included in enterprise images), we need to have non-static API URL loading, which doesn't require the API URLs to be defined in a single static file

This moves all API urls to the app's urls.py file in the api_urlpatterns list, which can take both a tuple of args to router.register or a path() call for a regular/API view

This doesn't change the schema, and make gen-build doesn't show any changes to the schema, as intended

Changes

New Features

  • Adds feature which does x, y, and z.

Breaking Changes

  • Adds breaking change which causes <issue>.

Checklist

  • Local tests pass (ak test authentik/)
  • The code has been formatted (make lint-fix)

If an API change has been made

  • The API schema has been updated (make gen-build)

If changes to the frontend have been made

  • The code has been formatted (make web)
  • The translation files have been updated (make i18n-extract)

If applicable

  • The documentation has been updated
  • The documentation has been formatted (make website)

load API urls from app module's urls file instead of a single static file

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

codecov bot commented May 9, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +43.89 🎉

Comparison is base (bb0eea1) 48.81% compared to head (b8da3da) 92.70%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5551       +/-   ##
===========================================
+ Coverage   48.81%   92.70%   +43.89%     
===========================================
  Files         509      546       +37     
  Lines       26158    26132       -26     
===========================================
+ Hits        12767    24223    +11456     
+ Misses      13391     1909    -11482     
Flag Coverage Δ
e2e 52.55% <95.18%> (+4.89%) ⬆️
integration 26.38% <0.00%> (+0.03%) ⬆️
unit 89.55% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
authentik/admin/urls.py 100.00% <100.00%> (ø)
authentik/api/v3/urls.py 100.00% <100.00%> (ø)
authentik/blueprints/urls.py 100.00% <100.00%> (ø)
authentik/core/urls.py 96.43% <100.00%> (+1.99%) ⬆️
authentik/crypto/urls.py 100.00% <100.00%> (ø)
authentik/events/urls.py 100.00% <100.00%> (ø)
authentik/flows/urls.py 100.00% <100.00%> (ø)
authentik/outposts/urls.py 100.00% <100.00%> (+100.00%) ⬆️
authentik/policies/dummy/urls.py 100.00% <100.00%> (ø)
authentik/policies/event_matcher/urls.py 100.00% <100.00%> (ø)
... and 36 more

... and 384 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2023

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-api-modular-urls-1683629774-b8da3da
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

For arm64, use these values:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-api-modular-urls-1683629774-b8da3da-arm64
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
image:
    repository: ghcr.io/goauthentik/dev-server
    tag: gh-api-modular-urls-1683629774-b8da3da

For arm64, use these values:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
image:
    repository: ghcr.io/goauthentik/dev-server
    tag: gh-api-modular-urls-1683629774-b8da3da-arm64

Afterwards, run the upgrade commands from the latest release notes.

@BeryJu BeryJu merged commit eaa3d11 into main May 9, 2023
57 checks passed
@BeryJu BeryJu deleted the api/modular-urls branch May 9, 2023 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant