Skip to content

trivial(app): read end-user context system labels as int[] - #4450

Merged
knuhau merged 1 commit into
mainfrom
trivial/dapper-system-labels-int-array
Oct 6, 2026
Merged

knuhau merged 1 commit into
mainfrom
trivial/dapper-system-labels-int-array

Conversation

@knuhau

@knuhau knuhau commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator

Dapper 2.1.86+ no longer assigns an integer[] column to an enum array property (DapperLib/Dapper#2228, reported as DapperLib/Dapper#2231), so SearchDialogEndUserContextsAsServiceOwner throws on every row and 6 SearchDialogEndUserContextTests fail on #4445. Reading the column as int[] and casting in the projection works on both 2.1.79 and 2.1.89, with no change to the returned DTO.

Related to #4445.

Dapper 2.1.86 stopped assigning an integer[] column to an enum array
property (DapperLib/Dapper#2228, reported upstream as DapperLib/Dapper#2231),
so SearchDialogEndUserContextsAsServiceOwner throws "Object must implement
IConvertible" on every row. Reading the column as int[] and converting in
the projection works on both the current and newer Dapper versions.
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: Altinn/dialogporten/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 583d6ac2-8cf7-4e27-b8a5-172352693b3b

📥 Commits

Reviewing files that changed from the base of the PR and between 393ba03 and aac30b5.

📒 Files selected for processing (1)
  • src/Digdir.Domain.Dialogporten.Infrastructure/Persistence/Repositories/DialogSearchRepository.cs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The search repository now represents database system-label IDs as integers in the raw row and converts them to SystemLabel.Values when creating the DTO.

Changes

System label mapping

Layer / File(s) Summary
Map system-label IDs to enum values
src/Digdir.Domain.Dialogporten.Infrastructure/Persistence/Repositories/DialogSearchRepository.cs
The raw row uses int[] for system-label IDs. The DTO projection converts each ID to SystemLabel.Values.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Suggested reviewers: elsand

Merge Risk: ⚪ Minimal · up to aac30

The returned labels preserve the intended values; no actionable merge-blocking risk remains in the reviewed change.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the Dapper issue, the code change, the compatibility result, and the related issue. It does not include the required Verification or Documentation sections, and it does not pr… Add the required Verification and Documentation sections. Mark each verification item as complete or explain why it does not apply. State whether documentation updates are required.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: reading end-user context system labels as int[].
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the Dapper issue, the code change, the compatibility result, and the related issue. It does not include the required Verification or Documentation sections, and it does not provide checklist status for builds, manual testing, automated tests, or database changes.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@venjum venjum left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@knuhau
knuhau merged commit 79f8108 into main Oct 6, 2026
26 checks passed
@knuhau
knuhau deleted the trivial/dapper-system-labels-int-array branch October 6, 2026 06:53
@github-actions github-actions Bot added at23 Deployed to at23 tt02 yt01 Deployed to yt01 prod Deployed to prod labels Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

at23 Deployed to at23 prod Deployed to prod tt02 yt01 Deployed to yt01

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants