Skip to content

Ensure stream closed#1527

Merged
aphralG merged 1 commit intomainfrom
ensure-stream-closure
Feb 19, 2026
Merged

Ensure stream closed#1527
aphralG merged 1 commit intomainfrom
ensure-stream-closure

Conversation

@aphralG
Copy link
Contributor

@aphralG aphralG commented Feb 17, 2026

Proposed changes

This PR fixes the file upload logic in FileServiceOperator to ensure that when sending files over 1MB (using chunked streaming), the agent closes the gRPC stream and waits for the NGINX One Console response only after all file chunks have been sent.

Details

Previously, the stream might not have been properly closed after sending all chunks, potentially causing incomplete uploads or missing server responses.
Now, after all chunks are sent in sendFileUpdateStreamChunks, the agent calls CloseAndRecv() on the stream client, ensuring the stream is closed and the server response is received before proceeding.

Impact

  • Ensures reliable file uploads for large files.
  • Prevents issues with incomplete or unacknowledged uploads.

Copy of #1522 due to issue with PR

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING document
  • I have run make install-tools and have attached any dependency changes to this pull request
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes
  • If applicable, I have updated any relevant documentation (README.md)
  • If applicable, I have tested my cross-platform changes on Ubuntu 22, Redhat 8, SUSE 15 and FreeBSD 13

@aphralG aphralG requested a review from a team as a code owner February 17, 2026 15:01
@github-actions github-actions bot added the chore Pull requests for routine tasks label Feb 17, 2026
@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.02%. Comparing base (48f97f4) to head (7017443).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1527   +/-   ##
=======================================
  Coverage   85.02%   85.02%           
=======================================
  Files         103      103           
  Lines       13587    13588    +1     
=======================================
+ Hits        11552    11553    +1     
  Misses       1518     1518           
  Partials      517      517           
Files with missing lines Coverage Δ
internal/file/file_service_operator.go 77.53% <100.00%> (+0.06%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 48f97f4...7017443. Read the comment docs.

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

@aphralG aphralG merged commit 2ef9720 into main Feb 19, 2026
69 of 70 checks passed
@aphralG aphralG deleted the ensure-stream-closure branch February 19, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Pull requests for routine tasks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants