Skip to content

file profile management#757

Merged
StuartFerguson merged 3 commits into
mainfrom
task/#756_file_profile_aggregate
Jul 11, 2026
Merged

file profile management#757
StuartFerguson merged 3 commits into
mainfrom
task/#756_file_profile_aggregate

Conversation

@StuartFerguson

Copy link
Copy Markdown
Member

closes #756

@codacy-production

codacy-production Bot commented Jul 10, 2026

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 1 medium

Alerts:
⚠ 1 issue (≤ 0 issues of at least medium severity)

Results:
1 new issue

Category Results
BestPractice 1 medium

View in Codacy

🟢 Metrics 144 complexity · 13 duplication

Metric Results
Complexity 144
Duplication 13

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

return Result.Invalid("No operator name provided");
}

if (string.IsNullOrEmpty(request.LineTerminator))

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

LineTerminator validation still uses IsNullOrEmpty, so whitespace-only values such as a single space will pass and get persisted. That later breaks file splitting in processing. Please reject whitespace-only input here and in the update path as well.

return await this.FileProfileAggregateRepository.SaveChanges(aggregateResult.Data, cancellationToken);
}

private async Task<Result<FileProfileAggregateRoot>> LoadAggregate(CancellationToken cancellationToken, bool seedIfMissing)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Read operations now seed and save the aggregate on a cache miss. That turns GET into a write path and makes list/get fail if Event Store writes are unavailable. It also introduces a race for concurrent cold starts. Consider keeping seeding in startup or a dedicated initializer instead of calling LoadAggregate(..., true) from the read methods.

@StuartFerguson StuartFerguson merged commit 5beff84 into main Jul 11, 2026
5 of 6 checks passed
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.

Endpoint to Manage FileProfile Data

1 participant