Skip to content

Upload rust binding diff as an artifact #5077

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

Merged
merged 9 commits into from
May 5, 2025

Conversation

guhetier
Copy link
Contributor

@guhetier guhetier commented May 5, 2025

Description

Upload rust binding diff as an artifact + print it in the logs: the comment on the PR doesn't work for forks based PRs.

Testing

See on this PR CI run.

Documentation

N/A

@guhetier guhetier marked this pull request as ready for review May 5, 2025 17:54
@guhetier guhetier requested a review from a team as a code owner May 5, 2025 17:54
Copy link
Contributor

@ProjectsByJackHe ProjectsByJackHe left a comment

Choose a reason for hiding this comment

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

LGTM once you remove the dummy code to break Cargo.

@microsoft microsoft deleted a comment from github-actions bot May 5, 2025
@microsoft microsoft deleted a comment from github-actions bot May 5, 2025
@microsoft microsoft deleted a comment from github-actions bot May 5, 2025
@microsoft microsoft deleted a comment from github-actions bot May 5, 2025
Copy link

github-actions bot commented May 5, 2025

Cargo - ubuntu-latest

The rust bindings need to be updated. Please apply (git apply) this patch:

diff --git a/src/rs/ffi/linux_bindings.rs b/src/rs/ffi/linux_bindings.rs
index 99ddcd7..8930f19 100644
--- a/src/rs/ffi/linux_bindings.rs
+++ b/src/rs/ffi/linux_bindings.rs
@@ -6392,12 +6392,13 @@ pub struct QUIC_API_TABLE {
     pub ConnectionResumptionTicketValidationComplete: QUIC_CONNECTION_COMP_RESUMPTION_FN,
     pub ConnectionCertificateValidationComplete: QUIC_CONNECTION_COMP_CERT_FN,
     pub ConnectionOpenInPartition: QUIC_CONNECTION_OPEN_IN_PARTITION_FN,
+    pub Dummy: QUIC_CONNECTION_OPEN_IN_PARTITION_FN,
     pub StreamProvideReceiveBuffers: QUIC_STREAM_PROVIDE_RECEIVE_BUFFERS_FN,
     pub ConnectionPoolCreate: QUIC_CONN_POOL_CREATE_FN,
 }
 #[allow(clippy::unnecessary_operation, clippy::identity_op)]
 const _: () = {
-    ["Size of QUIC_API_TABLE"][::std::mem::size_of::<QUIC_API_TABLE>() - 272usize];
+    ["Size of QUIC_API_TABLE"][::std::mem::size_of::<QUIC_API_TABLE>() - 280usize];
     ["Alignment of QUIC_API_TABLE"][::std::mem::align_of::<QUIC_API_TABLE>() - 8usize];
     ["Offset of field: QUIC_API_TABLE::SetContext"]
         [::std::mem::offset_of!(QUIC_API_TABLE, SetContext) - 0usize];
@@ -6467,10 +6468,12 @@ const _: () = {
     ) - 240usize];
     ["Offset of field: QUIC_API_TABLE::ConnectionOpenInPartition"]
         [::std::mem::offset_of!(QUIC_API_TABLE, ConnectionOpenInPartition) - 248usize];
+    ["Offset of field: QUIC_API_TABLE::Dummy"]
+        [::std::mem::offset_of!(QUIC_API_TABLE, Dummy) - 256usize];
     ["Offset of field: QUIC_API_TABLE::StreamProvideReceiveBuffers"]
-        [::std::mem::offset_of!(QUIC_API_TABLE, StreamProvideReceiveBuffers) - 256usize];
+        [::std::mem::offset_of!(QUIC_API_TABLE, StreamProvideReceiveBuffers) - 264usize];
     ["Offset of field: QUIC_API_TABLE::ConnectionPoolCreate"]
-        [::std::mem::offset_of!(QUIC_API_TABLE, ConnectionPoolCreate) - 264usize];
+        [::std::mem::offset_of!(QUIC_API_TABLE, ConnectionPoolCreate) - 272usize];
 };
 pub const QUIC_STATUS_SUCCESS: QUIC_STATUS = 0;
 pub const QUIC_STATUS_PENDING: QUIC_STATUS = 4294967294;

Copy link

github-actions bot commented May 5, 2025

Cargo - windows-latest

The rust bindings need to be updated. Please apply (git apply) this patch:

diff --git a/src/rs/ffi/win_bindings.rs b/src/rs/ffi/win_bindings.rs
index 6e59aa2..59d1b1d 100644
--- a/src/rs/ffi/win_bindings.rs
+++ b/src/rs/ffi/win_bindings.rs
@@ -6413,12 +6413,13 @@ pub struct QUIC_API_TABLE {
     pub ConnectionResumptionTicketValidationComplete: QUIC_CONNECTION_COMP_RESUMPTION_FN,
     pub ConnectionCertificateValidationComplete: QUIC_CONNECTION_COMP_CERT_FN,
     pub ConnectionOpenInPartition: QUIC_CONNECTION_OPEN_IN_PARTITION_FN,
+    pub Dummy: QUIC_CONNECTION_OPEN_IN_PARTITION_FN,
     pub StreamProvideReceiveBuffers: QUIC_STREAM_PROVIDE_RECEIVE_BUFFERS_FN,
     pub ConnectionPoolCreate: QUIC_CONN_POOL_CREATE_FN,
 }
 #[allow(clippy::unnecessary_operation, clippy::identity_op)]
 const _: () = {
-    ["Size of QUIC_API_TABLE"][::std::mem::size_of::<QUIC_API_TABLE>() - 272usize];
+    ["Size of QUIC_API_TABLE"][::std::mem::size_of::<QUIC_API_TABLE>() - 280usize];
     ["Alignment of QUIC_API_TABLE"][::std::mem::align_of::<QUIC_API_TABLE>() - 8usize];
     ["Offset of field: QUIC_API_TABLE::SetContext"]
         [::std::mem::offset_of!(QUIC_API_TABLE, SetContext) - 0usize];
@@ -6488,10 +6489,12 @@ const _: () = {
     ) - 240usize];
     ["Offset of field: QUIC_API_TABLE::ConnectionOpenInPartition"]
         [::std::mem::offset_of!(QUIC_API_TABLE, ConnectionOpenInPartition) - 248usize];
+    ["Offset of field: QUIC_API_TABLE::Dummy"]
+        [::std::mem::offset_of!(QUIC_API_TABLE, Dummy) - 256usize];
     ["Offset of field: QUIC_API_TABLE::StreamProvideReceiveBuffers"]
-        [::std::mem::offset_of!(QUIC_API_TABLE, StreamProvideReceiveBuffers) - 256usize];
+        [::std::mem::offset_of!(QUIC_API_TABLE, StreamProvideReceiveBuffers) - 264usize];
     ["Offset of field: QUIC_API_TABLE::ConnectionPoolCreate"]
-        [::std::mem::offset_of!(QUIC_API_TABLE, ConnectionPoolCreate) - 264usize];
+        [::std::mem::offset_of!(QUIC_API_TABLE, ConnectionPoolCreate) - 272usize];
 };
 pub const QUIC_STATUS_SUCCESS: QUIC_STATUS = 0;
 pub const QUIC_STATUS_PENDING: QUIC_STATUS = 459749;

csujedihy
csujedihy previously approved these changes May 5, 2025
@guhetier
Copy link
Contributor Author

guhetier commented May 5, 2025

Should be ready to go.
An additional improvement could be to try to edit the diff comment instead of having multiple ones, but I am not sure it is worth the additional complexity, so lets see how it is in practice first.

Copy link

codecov bot commented May 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.98%. Comparing base (e2fc8e9) to head (7b4099b).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5077      +/-   ##
==========================================
- Coverage   87.19%   85.98%   -1.22%     
==========================================
  Files          59       59              
  Lines       17924    17924              
==========================================
- Hits        15629    15412     -217     
- Misses       2295     2512     +217     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@guhetier guhetier merged commit 00bfb1e into main May 5, 2025
287 of 288 checks passed
@guhetier guhetier deleted the guhetier/rust_binding_diff_forks branch May 5, 2025 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants