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

Move scopes inside #3454

Merged
merged 8 commits into from
Jan 5, 2025
Merged

Move scopes inside #3454

merged 8 commits into from
Jan 5, 2025

Conversation

preardon
Copy link
Member

@preardon preardon commented Jan 3, 2025

At the minute the Factory Scope (Dependency injection) is around the command processor, this means that when Publish is called multiple Handlers could share the same scope which would be unexpected by the users.

#3356

As scopes are now done in the Handler Factories Command Processor Providers are no longer needed
@preardon
Copy link
Member Author

preardon commented Jan 3, 2025

@iancooper let me know if you're happy with this direction

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: OK

Change in average Code Health of affected files: +0.01 (9.52 -> 9.53)

  • Improving Code Health: 3 findings(s) ✅
  • Affected Hotspots: 2 files(s) 🔥

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: OK

Change in average Code Health of affected files: +0.01 (9.52 -> 9.53)

  • Improving Code Health: 3 findings(s) ✅
  • Affected Hotspots: 2 files(s) 🔥

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: OK

Change in average Code Health of affected files: +0.01 (9.52 -> 9.53)

  • Improving Code Health: 3 findings(s) ✅
  • Affected Hotspots: 2 files(s) 🔥

View detailed results in CodeScene

@iancooper
Copy link
Member

@iancooper let me know if you're happy with this direction

When I publish, particularly in parallel, I would expect state to be fresh. I think the problem with reusing scope, is that's not true.

I think we need to ask for a fresh scope for each publish chain.

I like where we are, so hopefully we can do that through the lifetime somehow.

@iancooper
Copy link
Member

The only other alternative is to make them transient within the scope i.e. the publish has the scope, the publish chains are transient within that scope.

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

Change in average Code Health of affected files: -0.01 (9.52 -> 9.51)

  • Declining Code Health: 1 findings(s) 🚩
  • Improving Code Health: 3 findings(s) ✅
  • Affected Hotspots: 2 files(s) 🔥

View detailed results in CodeScene

src/Paramore.Brighter/PipelineBuilder.cs Show resolved Hide resolved
src/Paramore.Brighter/PipelineBuilder.cs Show resolved Hide resolved
Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

Change in average Code Health of affected files: -0.01 (9.52 -> 9.51)

  • Declining Code Health: 1 findings(s) 🚩
  • Improving Code Health: 3 findings(s) ✅
  • Affected Hotspots: 2 files(s) 🔥

View detailed results in CodeScene

@preardon preardon marked this pull request as ready for review January 4, 2025 21:50
Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

Change in average Code Health of affected files: -0.01 (9.50 -> 9.50)

  • Declining Code Health: 1 findings(s) 🚩
  • Improving Code Health: 3 findings(s) ✅
  • Affected Hotspots: 2 files(s) 🔥

View detailed results in CodeScene

Copy link
Member

@iancooper iancooper left a comment

Choose a reason for hiding this comment

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

I think this a solid approach and follows what we would expect the scope to be.

@preardon preardon merged commit ff8fbbf into master Jan 5, 2025
12 of 20 checks passed
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.

2 participants