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

fix(setup): decode complex config strings #7854

Merged
merged 10 commits into from
May 1, 2024
Merged

fix(setup): decode complex config strings #7854

merged 10 commits into from
May 1, 2024

Conversation

eliobischof
Copy link
Member

@eliobischof eliobischof commented Apr 26, 2024

The env variable ZITADEL_INTERNALAUTHZ_ROLEPERMISSIONMAPPINGS works for the start command but not for the setup command.

In the setup decoders, the complex string type is tried to be decoded AFTER the string is already split by comma into a slice of meaningless strings by the string list decoder.

With this PR...

  • ...the decoding order is fixed for both the setup as well as the start decoders.
  • ...the decoders order is the same for the start and setup commands
  • ...the tests for the start config decoding are copied so they also run against the setup config decoders

The bug was reported on Discord.

Definition of Ready

  • I am happy with the code
  • Short description of the feature/issue is added in the pr description
  • PR is linked to the corresponding user story
  • Acceptance criteria are met
  • All open todos and follow ups are defined in a new ticket and justified
  • Deviations from the acceptance criteria and design are agreed with the PO and documented.
  • No debug or dead code
  • My code has no repetitions
  • Critical parts are tested automatically
  • Where possible E2E tests are implemented
  • Documentation/examples are up-to-date
  • All non-functional requirements are met
  • Functionality of the acceptance criteria is checked manually on the dev system.

Copy link

vercel bot commented Apr 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 1, 2024 8:33am

@eliobischof eliobischof self-assigned this Apr 26, 2024
@eliobischof eliobischof added bug Something isn't working backend reviewer wanted When you read this, please request your own review labels Apr 26, 2024
@eliobischof eliobischof marked this pull request as ready for review April 26, 2024 12:35
Copy link

codecov bot commented Apr 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.00%. Comparing base (9950caf) to head (cbb86d7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7854      +/-   ##
==========================================
+ Coverage   62.98%   63.00%   +0.02%     
==========================================
  Files        1333     1333              
  Lines      110076   110078       +2     
==========================================
+ Hits        69327    69360      +33     
+ Misses      36800    36772      -28     
+ Partials     3949     3946       -3     
Flag Coverage Δ
core-integration-tests-postgres 63.00% <100.00%> (+0.02%) ⬆️

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.

@eliobischof eliobischof removed the reviewer wanted When you read this, please request your own review label Apr 29, 2024
@eliobischof eliobischof marked this pull request as draft April 29, 2024 14:07
@eliobischof eliobischof merged commit 6c0e7c4 into main May 1, 2024
27 checks passed
@eliobischof eliobischof deleted the fix-setup-envs branch May 1, 2024 10:17
Copy link

github-actions bot commented May 2, 2024

🎉 This PR is included in version 2.51.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend bug Something isn't working released
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants