Skip to content

outposts/proxy: better Redis error message#8044

Merged
rissson merged 2 commits intomainfrom
embedded-outpost-better-redis-error-message
Jan 2, 2024
Merged

outposts/proxy: better Redis error message#8044
rissson merged 2 commits intomainfrom
embedded-outpost-better-redis-error-message

Conversation

@rissson
Copy link
Copy Markdown
Member

@rissson rissson commented Jan 2, 2024

Details

Currently this can fail with an ugly:

panic: i/o timeout

goroutine 90 [running]:
goauthentik.io/internal/outpost/proxyv2/application.(*Application).getStore(_, {0x1, {0xc00090c7c4, 0x9}, 0xc000e82c30, {0xc000602840, 0x1f}, 0xc00090c7cd, 0xc000e82c40, 0xc000e82c50, ...}, ...)
	/go/src/goauthentik.io/internal/outpost/proxyv2/application/session.go:43 +0x439
goauthentik.io/internal/outpost/proxyv2/application.NewApplication({0x1, {0xc00090c7c4, 0x9}, 0xc000e82c30, {0xc000602840, 0x1f}, 0xc00090c7cd, 0xc000e82c40, 0xc000e82c50, {{0xc001a82cc0, ...}, ...}, ...}, ...)
	/go/src/goauthentik.io/internal/outpost/proxyv2/application/application.go:140 +0xfce
goauthentik.io/internal/outpost/proxyv2.(*ProxyServer).Refresh(0xc0006e4160)
	/go/src/goauthentik.io/internal/outpost/proxyv2/refresh.go:37 +0x587
goauthentik.io/internal/outpost/ak.(*APIController).OnRefresh(0xc0001d8a80)
	/go/src/goauthentik.io/internal/outpost/ak/api.go:180 +0x314
goauthentik.io/internal/outpost/ak.(*APIController).startIntervalUpdater(0xc0001d8a80)
	/go/src/goauthentik.io/internal/outpost/ak/api_ws.go:191 +0x17b
goauthentik.io/internal/outpost/ak.(*APIController).StartBackgroundTasks.func3()
	/go/src/goauthentik.io/internal/outpost/ak/api.go:218 +0x5d
created by goauthentik.io/internal/outpost/ak.(*APIController).StartBackgroundTasks in goroutine 102
	/go/src/goauthentik.io/internal/outpost/ak/api.go:216 +0x38d

This adds a bit of context.


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)

Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
@rissson rissson self-assigned this Jan 2, 2024
@rissson rissson requested a review from a team as a code owner January 2, 2024 14:22
@netlify
Copy link
Copy Markdown

netlify bot commented Jan 2, 2024

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit cd4b54a
🔍 Latest deploy log https://app.netlify.com/sites/authentik-storybook/deploys/659468f55fae9b0008538eef
😎 Deploy Preview https://deploy-preview-8044--authentik-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (aa1bb7b) 92.32% compared to head (cd4b54a) 92.34%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8044      +/-   ##
==========================================
+ Coverage   92.32%   92.34%   +0.01%     
==========================================
  Files         608      608              
  Lines       30156    30156              
==========================================
+ Hits        27841    27847       +6     
+ Misses       2315     2309       -6     
Flag Coverage Δ
e2e 50.60% <ø> (+0.02%) ⬆️
integration 26.25% <ø> (ø)
unit 89.51% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 2, 2024

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-embedded-outpost-better-redis-error-message-1704226120-cd4b54a
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-embedded-outpost-better-redis-error-message-1704226120-cd4b54a-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-embedded-outpost-better-redis-error-message-1704226120-cd4b54a

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-embedded-outpost-better-redis-error-message-1704226120-cd4b54a-arm64

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

@rissson rissson enabled auto-merge (rebase) January 2, 2024 15:10
@rissson rissson disabled auto-merge January 2, 2024 19:50
Co-authored-by: Jens L. <jens@goauthentik.io>
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
@rissson rissson requested a review from BeryJu January 2, 2024 19:51
@rissson rissson enabled auto-merge (squash) January 2, 2024 19:51
@rissson rissson merged commit d54b410 into main Jan 2, 2024
@rissson rissson deleted the embedded-outpost-better-redis-error-message branch January 2, 2024 20:01
kensternberg-authentik added a commit that referenced this pull request Jan 2, 2024
* main: (30 commits)
  outposts/proxy: better Redis error message (#8044)
  translate: Updates for file web/xliff/en.xlf in fr (#8046)
  web: bump the eslint group in /tests/wdio with 2 updates (#8041)
  web: bump the storybook group in /web with 7 updates (#8042)
  web: bump the eslint group in /web with 2 updates (#8043)
  web: bump @types/guacamole-common-js from 1.3.2 to 1.5.2 in /web (#8030)
  translate: Updates for file web/xliff/en.xlf in zh_CN (#8038)
  translate: Updates for file web/xliff/en.xlf in zh-Hans (#8039)
  website: bump clsx from 2.0.0 to 2.1.0 in /website (#8033)
  core: bump golang from 1.21.3-bookworm to 1.21.5-bookworm (#8027)
  web: bump the babel group in /web with 4 updates (#8028)
  web: bump the esbuild group in /web with 2 updates (#8029)
  web: bump rollup from 4.9.1 to 4.9.2 in /web (#8031)
  tests/e2e: fix tests to work without docker network_mode host (#8035)
  website/docs: fix typo (#8015)
  web: bump API Client version (#8025)
  enterprise/providers: Add RAC [AUTH-15] (#7291)
  outposts: disable deployment and secret reconciler for embedded outpost in code instead of in config (#8021)
  providers/proxy: use access token (#8022)
  website/integrations: Add custom Group/Role mapping documentation for Grafana (#7453)
  ...
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.

2 participants