Skip to content

blueprints: fix mismatched API schema and implementation#22087

Merged
melizeche merged 1 commit intomainfrom
blueprint_import_returncode
May 8, 2026
Merged

blueprints: fix mismatched API schema and implementation#22087
melizeche merged 1 commit intomainfrom
blueprint_import_returncode

Conversation

@melizeche
Copy link
Copy Markdown
Member

@melizeche melizeche commented May 6, 2026

Details

POST /blueprints/instances/import/ declared 204/400 responses but always returned 200, with two identical unreachable return statements.

  • Collapse the duplicate return branches into one.
  • Update @extend_schema to responses={200: BlueprintImportResultSerializer} to match actual behavior.

Wire response is unchanged (200 with {success, logs}), so frontend callers and existing tests are unaffected.


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 and clients have been updated (make gen)

If changes to the frontend have been made

  • The code has been formatted (make web)

If applicable

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

@melizeche melizeche requested review from a team as code owners May 6, 2026 16:32
@melizeche melizeche self-assigned this May 6, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented May 6, 2026

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit b8f9525
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/69fb6d10cc437000083dc7bf
😎 Deploy Preview https://deploy-preview-22087--authentik-docs.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 project configuration.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.19%. Comparing base (ebd18b4) to head (b8f9525).
⚠️ Report is 46 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #22087      +/-   ##
==========================================
- Coverage   93.23%   93.19%   -0.05%     
==========================================
  Files        1024     1024              
  Lines       59344    59344              
  Branches      400      400              
==========================================
- Hits        55327    55303      -24     
- Misses       4017     4041      +24     
Flag Coverage Δ
conformance 36.88% <0.00%> (+<0.01%) ⬆️
e2e 42.06% <0.00%> (-0.01%) ⬇️
integration 32.78% <0.00%> (-0.50%) ⬇️
rust 0.00% <ø> (ø)
unit 92.15% <100.00%> (+<0.01%) ⬆️
unit-migrate 92.18% <100.00%> (-0.01%) ⬇️

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.

@BeryJu BeryJu changed the title core: Fix dead code and false API contract in blueprint import endpoint blueprints: fix mismatched API schema and implementation May 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

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-b8f952558fa0b6fbe7b3b5cfff7e05a52856b5f8
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
global:
    image:
        repository: ghcr.io/goauthentik/dev-server
        tag: gh-b8f952558fa0b6fbe7b3b5cfff7e05a52856b5f8

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

@github-project-automation github-project-automation Bot moved this from Todo to In Progress in authentik Core May 6, 2026
@BeryJu BeryJu added backport/version-2026.5 Add this label to PRs to backport changes to version-2026.5 and removed backport/version-2026.5 labels May 8, 2026
@melizeche melizeche merged commit 34364f4 into main May 8, 2026
118 checks passed
@melizeche melizeche deleted the blueprint_import_returncode branch May 8, 2026 17:37
@github-project-automation github-project-automation Bot moved this from In Progress to Done in authentik Core May 8, 2026
@authentik-automation
Copy link
Copy Markdown
Contributor

🍒 Cherry-pick to version-2026.5 created: #22171

BeryJu pushed a commit that referenced this pull request May 8, 2026
…22087 to version-2026.5) (#22171)

blueprints: fix mismatched API schema and implementation (#22087)

align blueprint import schema with 200 result response

Co-authored-by: Marcelo Elizeche Landó <marcelo@goauthentik.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/version-2026.5 Add this label to PRs to backport changes to version-2026.5

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants