Skip to content

[Foundation] Clean up pre-net10.0 code from NSUrlSessionHandler.#25177

Merged
rolfbjarne merged 1 commit intomainfrom
dev/rolf/nsurlsession-cleanup
Apr 20, 2026
Merged

[Foundation] Clean up pre-net10.0 code from NSUrlSessionHandler.#25177
rolfbjarne merged 1 commit intomainfrom
dev/rolf/nsurlsession-cleanup

Conversation

@rolfbjarne
Copy link
Copy Markdown
Member

NET10_0_OR_GREATER is always set now, so remove other code paths.

NET10_0_OR_GREATER is always set now, so remove other code paths.
Copy link
Copy Markdown
Contributor

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

Removes legacy pre-.NET 10 conditional code paths from NSUrlSessionHandler, on the basis that NET10_0_OR_GREATER is now always defined for the repo’s supported builds.

Changes:

  • Deleted ServicePointManager.SecurityProtocolNSUrlSessionConfiguration TLS mapping code guarded by pre-.NET 10 defines.
  • Removed legacy iOS background-notification observer logic and the related BypassBackgroundSessionCheck backing field/behavior.
  • Simplified BypassBackgroundSessionCheck to a consistently ignored/obsolete API surface.

Comment thread src/Foundation/NSUrlSessionHandler.cs
@rolfbjarne rolfbjarne enabled auto-merge (squash) April 17, 2026 14:56
@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ [CI Build #b3223c4] Build passed (Build packages) ✅

Pipeline on Agent
Hash: b3223c442069169fe016c9d290cc3d2779aff451 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ [PR Build #b3223c4] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: b3223c442069169fe016c9d290cc3d2779aff451 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: b3223c442069169fe016c9d290cc3d2779aff451 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ [CI Build #b3223c4] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: b3223c442069169fe016c9d290cc3d2779aff451 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

rolfbjarne added a commit that referenced this pull request Apr 17, 2026
The pull request #25177 ran the PR pipeline twice:

* https://dev.azure.com/devdiv/DevDiv/_build/results?buildId=13868591&view=results
* https://dev.azure.com/devdiv/DevDiv/_build/results?buildId=13868592&view=results

when there should be only one.

So I asked Copilot, which said:

    It was triggered twice because two different Azure triggers fired for the same change.

     - 13868591 was queued as individualCI for refs/heads/dev/rolf/nsurlsession-cleanup on commit b3223c4.
     - 13868592 was queued seconds later as pullRequest for refs/pull/25177/merge on the synthetic merge commit 7fccb8c.

    That matches the repo’s PR pipeline config in tools/devops/automation/build-pull-request.yml, which has both a branch trigger: for refs/heads/dev/* and a pr: trigger for '*'. So opening/updating PR #25177 caused one normal branch CI run and one PR-validation run.

So disable the branched-based trigger.
@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

🚀 [CI Build #b3223c4] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 156 tests passed 🎉

Tests counts

✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 6 tests passed. Html Report (VSDrops) Download
✅ linker: All 44 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 11 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 15 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 12 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 11 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Ventura (13): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

Linux build succeeded

Pipeline on Agent
Hash: b3223c442069169fe016c9d290cc3d2779aff451 [PR build]

rolfbjarne added a commit that referenced this pull request Apr 20, 2026
The pull request #25177 ran the PR pipeline twice:

* https://dev.azure.com/devdiv/DevDiv/_build/results?buildId=13868591&view=results
* https://dev.azure.com/devdiv/DevDiv/_build/results?buildId=13868592&view=results

when it should only have been done once.

So I asked Copilot, which said:

    It was triggered twice because two different Azure triggers fired for the same change.

     - 13868591 was queued as individualCI for refs/heads/dev/rolf/nsurlsession-cleanup on commit b3223c4.
     - 13868592 was queued seconds later as pullRequest for refs/pull/25177/merge on the synthetic merge commit 7fccb8c.

    That matches the repo’s PR pipeline config in tools/devops/automation/build-pull-request.yml, which has both a branch trigger: for refs/heads/dev/* and a pr: trigger for '*'. So opening/updating PR #25177 caused one normal branch CI run and one PR-validation run.

So disable the branched-based trigger.
@rolfbjarne rolfbjarne merged commit ad8572a into main Apr 20, 2026
52 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.

4 participants