Skip to content

Skips rebuild requests in case of missing tenant in the configuration#347

Merged
gshukov98 merged 1 commit intomasterfrom
skip-rebuild-messages
Apr 2, 2025
Merged

Skips rebuild requests in case of missing tenant in the configuration#347
gshukov98 merged 1 commit intomasterfrom
skip-rebuild-messages

Conversation

@gshukov98
Copy link
Contributor

No description provided.

@gshukov98 gshukov98 requested a review from mynkow April 2, 2025 07:34
@gshukov98 gshukov98 force-pushed the skip-rebuild-messages branch from 14750f6 to cae5f2f Compare April 2, 2025 07:38
@gshukov98 gshukov98 requested a review from Copilot April 2, 2025 07:38
Copy link

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 the ProjectionBuilder class to skip rebuild requests when the tenant from the request is not present in the configuration.

  • Introduces IOptions dependency injection to retrieve tenant configuration.
  • Adds a check in HandleAsync to log a warning and return early if the tenant is missing.
Comments suppressed due to low confidence (1)

src/Elders.Cronus/Projections/Versioning/Handlers/ProjectionBuilder.cs:76

  • [nitpick] Consider using the '!' operator for clarity: rewrite to 'if (!tenants.Tenants.Contains(sagaTimeout.Tenant))' to improve readability.
if (tenants.Tenants.Contains(sagaTimeout.Tenant) == false)

@gshukov98 gshukov98 merged commit 30bf7ec into master Apr 2, 2025
2 of 4 checks passed
@gshukov98 gshukov98 deleted the skip-rebuild-messages branch April 2, 2025 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant