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

7.0 release checklist / misc items #1413

Open
12 of 14 tasks
lukebakken opened this issue Nov 15, 2023 · 26 comments · Fixed by #1661
Open
12 of 14 tasks

7.0 release checklist / misc items #1413

lukebakken opened this issue Nov 15, 2023 · 26 comments · Fixed by #1661
Assignees
Milestone

Comments

@lukebakken
Copy link
Contributor

lukebakken commented Nov 15, 2023

@lukebakken lukebakken added this to the 7.0.0 milestone Nov 15, 2023
@lukebakken lukebakken self-assigned this Nov 15, 2023
@lukebakken lukebakken changed the title Use newer C# language features 7.0 release checklist / misc items Nov 15, 2023
@lukebakken
Copy link
Contributor Author

lukebakken commented Nov 15, 2023

@stebet what do you think of this item?

Mark all sync API methods as Obsolete. Version 8 of this lib could then be async-only.

@stebet
Copy link
Contributor

stebet commented Nov 16, 2023

@stebet what do you think of this item?

Mark all sync API methods as Obsolete. Version 8 of this lib could then be async-only.

All for it!

@bangjiehan
Copy link

Does we need QueueDeclarePassiveAsync too?

@lukebakken
Copy link
Contributor Author

@bangjiehan -

Does we need QueueDeclarePassiveAsync too?

The QueueDeclareAsync method has a passive parameter. Set it to true, and you will do a passive declaration.

QueueDeclarePassive has always been a convenience method added to the API. I'll make a note to add it to version 7.

lukebakken added a commit that referenced this issue May 13, 2024
Part of #1413

* Prefer explicit types instead of `var`
lukebakken added a commit that referenced this issue May 13, 2024
* Various editor suggestions

Part of #1413

* Prefer explicit types instead of `var`

* Hopefully eliminate this test flake.

* Publish smaller messages to make timeouts less likely.
@lukebakken
Copy link
Contributor Author

#1589

@Gladskih
Copy link

Is there documentation for new API? Or at least some example.

@lukebakken
Copy link
Contributor Author

@Gladskih there isn't too much of a difference between the old API and the new one, to be honest. If you need a reference, the best place at this time are the test applications and integration tests:

If you need further assistance, please start a discussion rather than commenting on an issue:
https://github.com/rabbitmq/rabbitmq-dotnet-client/discussions

@YarinOmesi
Copy link

YarinOmesi commented Jul 20, 2024

@bollhals just FYI, I have decided that version 7 should ship on July 12th. I'm releasing 7.0.0-rc.2 today.

Any news on the release date ?

@lukebakken
Copy link
Contributor Author

@YarinOmesi - if you'd like to assist with the release of version 7, test out an RC and report back how it works in your environment.

@lukebakken
Copy link
Contributor Author

@bollhals - thanks for your latest contribution (#1636). Anything else on your plate for version 7? I am going to release a new RC today.

@bollhals
Copy link
Contributor

bollhals commented Jul 22, 2024

@bollhals - thanks for your latest contribution (#1636). Anything else on your plate for version 7? I am going to release a new RC today.

Yes maybe. I'm almost done working on removing the non async @workflow for e.g. IBasicConsumer / Consumedispatcher. )
As this is facing public api change, it might be beneficial to include in 7.O

@lukebakken
Copy link
Contributor Author

@bollhals feel free to open a draft PR with the work you have already done for that.

@bollhals
Copy link
Contributor

Will do once I have something that is buildable / testable.

@Hawxy
Copy link

Hawxy commented Jul 24, 2024

if you'd like to assist with the release of version 7, test out an RC and report back how it works in your environment.

@lukebakken Just some feedback as a developer of Wolverine, I upgraded our vnext branch to v7 RC a few weeks ago and all of our tests are passing. RC2 was a bit broken for us, but RC3 onwards has been fine.

@lukebakken
Copy link
Contributor Author

@Hawxy thank you!

@bollhals bollhals mentioned this issue Jul 24, 2024
11 tasks
@danielmarbach
Copy link
Collaborator

I noticed some of the channel extensions don't have cancellation token support. I sent in a PR #1641

There seems to be also connection extensions that might require a cancellation token (the ones that don't accept a timespan but don't have a token yet)

@danielmarbach
Copy link
Collaborator

danielmarbach commented Jul 30, 2024

I have also noticed some API asymmetry, and I don't understand why that is the case.

BasicAck and Nack return ValueTask while BasicReject returns a Task and has to call AsTask on ModelSendAsync which makes we wonder whether this was deliberate or the client API hasn't been properly aligned where necessary?

@lukebakken
Copy link
Contributor Author

@danielmarbach I'll wait on releasing version 7 since you're finding stuff to address. Plus, there is #1640 to deal with as well. Thank you!

@danielmarbach
Copy link
Collaborator

@lukebakken I was wondering if it would make sense to consistently use value task on the channel APIs

Currently it is a mix and that leads to different ripple effects of having to adjust the outer code depending on the method you call.

Technically the Value Task on the public API would leave room for future optimizations under the hood without having to break the API. I guess the tradeoff there is API consistency and room for future changes under the cover.

https://blog.marcgravell.com/2019/08/prefer-valuetask-to-task-always-and.html?m=1

Thoughts? @stebet @paulomorgado @bollhals

@Hawxy
Copy link

Hawxy commented Sep 5, 2024

https://blog.marcgravell.com/2019/08/prefer-valuetask-to-task-always-and.html?m=1

Worth mentioning that this blog post is out of date. The value task pooling mentioned was a .NET 5 experiment & never shipped as it negatively impacted performance in some scenarios and is now opt-in via an attribute (you'd need to benchmark to see if anything benefits from it). The recommendation of using ValueTask by default to benefit from some magical future improvement is incorrect.

The general rule of thumb is:

  • Use ValueTask if all downstream callers are also using ValueTask (all calls down to System.Threading.Channels makes sense).
  • OR use ValueTask if an execution path is going to return synchronously most of the time (ie a GetOrSetAsync caching method).

@danielmarbach
Copy link
Collaborator

Just to clarify. By default I'm also in the deliberate usage of Value Task camp. I only brought this up because as a user of the API the mixed mode has consequences too and changing the return value is a breaking change

@paulomorgado
Copy link
Contributor

I'll have to admit that I haven't delved myself into the benefits of using ValueTask/ValueTask<T>.

@mgravell might be able to shed some light in how he feels about it 5 years later.

There's also Understanding the Whys, Whats, and Whens of ValueTask, from @stephentoub.

ValueTask/ValueTask<T> is better than Task/Task<T> for synchronous completion but comes with a few limitations over Task/Task<T> like being awaitable only once and sync-over-async might not work as expected.

ValueTask/ValueTask<T> can be pooled by explicitly using a specific state machine builder.

I would look into .NET source code the gather insights on real usage, but there's probably not time for that.

ValueTask/ValueTask<T>, although feeling strange, might be more future-proof. But that's just a feeling at this time.

@stebet
Copy link
Contributor

stebet commented Sep 5, 2024

I'm in the prefer ValueTask camp as well. There was a good blog post about it here: https://blog.marcgravell.com/2019/08/prefer-valuetask-to-task-always-and.html?m=1

@danielmarbach
Copy link
Collaborator

Related to @Hawxy and my comments and the guidance shared

When adding abstract, virtual, or interface methods, you also need to consider whether these situations will exist for overrides/implementations of that method.

https://devblogs.microsoft.com/dotnet/understanding-the-whys-whats-and-whens-of-valuetask/

is the type of nuanced discussion I also wanted to kick off here before the API is shipped.

@lukebakken lukebakken reopened this Sep 5, 2024
@lukebakken
Copy link
Contributor Author

@danielmarbach @stebet @paulomorgado @Hawxy please move the Task / ValueTask discussion here -

#1645

Thanks.

@lukebakken
Copy link
Contributor Author

  • Double-check the public API file
  • Update the changelog

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

Successfully merging a pull request may close this issue.

9 participants