Skip to content

fix: ensure postgres works with ciraconfigs#950

Merged
rsdmike merged 1 commit intomainfrom
cira
May 5, 2026
Merged

fix: ensure postgres works with ciraconfigs#950
rsdmike merged 1 commit intomainfrom
cira

Conversation

@rsdmike
Copy link
Copy Markdown
Member

@rsdmike rsdmike commented May 5, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 5, 2026 21:34
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates CIRA config handling so generateRandomPassword can be stored and retrieved through the CIRA config path without Postgres type mismatches, while keeping the external DTO/config layers boolean-based.

Changes:

  • Switched entity.CIRAConfig.GenerateRandomPassword from bool to string to match the persisted CIRA config representation.
  • Added bool/string conversions in the CIRA config and profile use cases.
  • Updated related tests/fuzz inputs to use the new string-backed entity field.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
internal/usecase/sqldb/ciraconfig.go Reads CIRA generate_random_password as text from the database and stores it on the entity as a string.
internal/usecase/profiles/usecase.go Parses the string-backed CIRA flag back into a boolean when building provisioning config.
internal/usecase/ciraconfigs/usecase.go Converts the DTO bool to/from the entity string representation.
internal/usecase/ciraconfigs/usecase_test.go Adjusts mocked entity fixtures to the new string field type.
internal/usecase/ciraconfigs/transform_fuzz_test.go Updates fuzz entity construction to use stringified bool values.
internal/entity/ciraconfig.go Changes the entity model field type for GenerateRandomPassword.
internal/controller/httpapi/v1/login.go Adds an issuer claim to locally generated JWTs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/entity/ciraconfig.go Outdated
Comment thread internal/usecase/sqldb/ciraconfig.go Outdated
Comment thread internal/usecase/profiles/usecase.go Outdated
Comment thread internal/usecase/ciraconfigs/usecase.go Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 39.91%. Comparing base (f5975ba) to head (6a9ef9f).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/usecase/sqldb/ciraconfig.go 75.00% 1 Missing and 1 partial ⚠️
internal/controller/httpapi/v1/login.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #950      +/-   ##
==========================================
+ Coverage   39.81%   39.91%   +0.09%     
==========================================
  Files         124      124              
  Lines       11395    11398       +3     
==========================================
+ Hits         4537     4549      +12     
+ Misses       6461     6453       -8     
+ Partials      397      396       -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rsdmike rsdmike enabled auto-merge (squash) May 5, 2026 22:10
@rsdmike rsdmike merged commit f3690c5 into main May 5, 2026
18 checks passed
@rsdmike rsdmike deleted the cira branch May 5, 2026 22:12
@rsdmike rsdmike restored the cira branch May 5, 2026 22:13
@RosieAMT
Copy link
Copy Markdown

RosieAMT commented May 5, 2026

🎉 This PR is included in version 1.25.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants