Skip to content

Commit ebfc678

Browse files
authored
Merge pull request #858 from microsoftgraph/dev
Release 3.1.14
2 parents 9903e0c + fa1fb95 commit ebfc678

11 files changed

Lines changed: 114 additions & 55 deletions

File tree

.github/dependabot.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
11
version: 2
22
updates:
33
- package-ecosystem: nuget
4-
directory: "/"
4+
directories:
5+
- "**/*"
56
schedule:
67
interval: daily
78
open-pull-requests-limit: 10
89
groups:
910
kiota-dependencies:
1011
patterns:
1112
- "*kiota*"
13+
xunit:
14+
patterns:
15+
- xunit*
16+
coverlet:
17+
patterns:
18+
- coverlet*
19+
mstest:
20+
patterns:
21+
- Microsoft.NET.Test.Sdk
22+
- Microsoft.TestPlatform.ObjectModel
1223
- package-ecosystem: github-actions
1324
directory: "/"
1425
schedule:

.github/release-please.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
manifest: true
2+
primaryBranch: master
3+
handleGHRelease: true

.github/workflows/auto-merge-dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
steps:
2020
- name: Dependabot metadata
2121
id: metadata
22-
uses: dependabot/fetch-metadata@v2.1.0
22+
uses: dependabot/fetch-metadata@v2.2.0
2323
with:
2424
github-token: "${{ secrets.GITHUB_TOKEN }}"
2525

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "3.1.14"
3+
}

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project does adheres to [Semantic Versioning](https://semver.org/spec/v
77

88
## [Unreleased]
99

10+
## [3.1.14] - 2024-07-23
11+
12+
### Changed
13+
14+
- Obsoletes custom decompression handler in favor of native client capabilities at https://github.com/microsoft/kiota-dotnet/pull/303
15+
1016
## [3.1.12] - 2024-07-03
1117

1218
### Changed

CONTRIBUTING.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,36 @@ When a new package is about to be released, changes in dev will be merged into m
1515

1616
Some things to note about this project:
1717

18+
## Commit message format
19+
To support our automated release process, pull requests are required to follow the [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/)
20+
format.
21+
22+
Each commit message consists of a **header**, an optional **body** and an optional **footer**. The header is the first line of the commit and
23+
MUST have a **type** (see below for a list of types) and a **description**. An optional **scope** can be added to the header to give extra context.
24+
25+
```
26+
<type>[optional scope]: <short description>
27+
<BLANK LINE>
28+
<optional body>
29+
<BLANK LINE>
30+
<optional footer(s)>
31+
```
32+
33+
The recommended commit types used are:
34+
35+
- **feat** for feature updates (increments the _minor_ version)
36+
- **fix** for bug fixes (increments the _patch_ version)
37+
- **perf** for performance related changes e.g. optimizing an algorithm
38+
- **refactor** for code refactoring changes
39+
- **test** for test suite updates e.g. adding a test or fixing a test
40+
- **style** for changes that don't affect the meaning of code. e.g. formatting changes
41+
- **docs** for documentation updates e.g. ReadMe update or code documentation updates
42+
- **build** for build system changes (gradle updates, external dependency updates)
43+
- **ci** for CI configuration file changes e.g. updating a pipeline
44+
- **chore** for miscallaneous non-sdk changesin the repo e.g. removing an unused file
45+
46+
Adding a footer with the prefix **BREAKING CHANGE:** will cause an increment of the _major_ version.
47+
1848
### How the library is built
1949
The .Net client library has a handwritten set of core files and two folders of generated models and request builders. These models and request builders are generated using the [MSGraph SDK Code Generator](https://github.com/microsoftgraph/MSGraph-SDK-Code-Generator). **Changes made to the ```Models``` and ```Requests``` folders will be overwritten** the next time the generator is run.
2050

release-please-config.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"bootstrap-sha": "9903e0c129683979234f287d59f7468ca5cd7341",
3+
"exclude-paths": [
4+
".git",
5+
".idea",
6+
".github",
7+
".vscode"
8+
],
9+
"release-type": "dotnet-yoshi",
10+
"include-component-in-tag": false,
11+
"include-v-in-tag": true,
12+
"packages": {
13+
".": {
14+
"package-name": "src/Microsoft.Graph.Core/",
15+
"changelog-path": "CHANGELOG.md",
16+
"extra-files": [
17+
"src/Microsoft.Graph.Core/Microsoft.Graph.Core.csproj"
18+
]
19+
}
20+
},
21+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
22+
}

src/Microsoft.Graph.Core/Microsoft.Graph.Core.csproj

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@
2020
<DelaySign>false</DelaySign>
2121
<AssemblyOriginatorKeyFile>35MSSharedLib1024.snk</AssemblyOriginatorKeyFile>
2222
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
23-
<VersionPrefix>3.1.13</VersionPrefix>
23+
<!-- x-release-please-start-version -->
24+
<VersionPrefix>3.1.14</VersionPrefix>
25+
<!-- x-release-please-end -->
26+
<!-- VersionPrefix minor version should not be set when the change comes from the generator. It will be updated automatically. -->
27+
<!-- VersionPrefix minor version must be manually set when making manual changes to code. -->
28+
<!-- VersionPrefix major and patch versions must be manually set. -->
2429
<VersionSuffix></VersionSuffix>
2530
<PackageReleaseNotes>
2631
- https://github.com/microsoftgraph/msgraph-sdk-dotnet-core/blob/dev/CHANGELOG.md
@@ -33,7 +38,7 @@
3338
<EnableNETAnalyzers>True</EnableNETAnalyzers>
3439
<PackageReadmeFile>README.md</PackageReadmeFile>
3540
<NoWarn>NU5048;NETSDK1202</NoWarn>
36-
<IsTrimmable>true</IsTrimmable>
41+
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)','net5.0'))">true</IsTrimmable>
3742
</PropertyGroup>
3843
<!-- https://github.com/clairernovotny/DeterministicBuilds#deterministic-builds -->
3944
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
@@ -57,15 +62,15 @@
5762
</None>
5863
</ItemGroup>
5964
<ItemGroup>
60-
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="7.6.2" />
65+
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="8.0.1" />
6166
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
62-
<PackageReference Include="Microsoft.Kiota.Abstractions" Version="[1.9.6, 2.0.0)" />
63-
<PackageReference Include="Microsoft.Kiota.Authentication.Azure" Version="[1.1.7, 2.0.0)" />
64-
<PackageReference Include="Microsoft.Kiota.Serialization.Json" Version="[1.3.3, 2.0.0)" />
65-
<PackageReference Include="Microsoft.Kiota.Serialization.Text" Version="[1.2.2, 2.0.0)" />
66-
<PackageReference Include="Microsoft.Kiota.Serialization.Form" Version="[1.2.5, 2.0.0)" />
67-
<PackageReference Include="Microsoft.Kiota.Http.HttpClientLibrary" Version="[1.4.3, 2.0.0)" />
68-
<PackageReference Include="Microsoft.Kiota.Serialization.Multipart" Version="[1.1.5, 2.0.0)" />
67+
<PackageReference Include="Microsoft.Kiota.Abstractions" Version="1.9.11" />
68+
<PackageReference Include="Microsoft.Kiota.Authentication.Azure" Version="1.9.11" />
69+
<PackageReference Include="Microsoft.Kiota.Serialization.Json" Version="1.9.11" />
70+
<PackageReference Include="Microsoft.Kiota.Serialization.Text" Version="1.9.11" />
71+
<PackageReference Include="Microsoft.Kiota.Serialization.Form" Version="1.9.11" />
72+
<PackageReference Include="Microsoft.Kiota.Http.HttpClientLibrary" Version="1.9.11" />
73+
<PackageReference Include="Microsoft.Kiota.Serialization.Multipart" Version="1.9.11" />
6974
</ItemGroup>
7075
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
7176
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="[6.0,9.0)" />

src/Microsoft.Graph.Core/Requests/GraphClientFactory.cs

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,6 @@ public static IList<DelegatingHandler> CreateDefaultHandlers(GraphClientOptions
117117
var handlers = KiotaClientFactory.CreateDefaultHandlers();
118118
handlers.Add(new GraphTelemetryHandler(graphClientOptions));// add the telemetry handler last.
119119

120-
// TODO remove this once https://github.com/microsoft/kiota/issues/598 is closed.
121-
handlers.Insert(0, new CompressionHandler());
122-
123120
return handlers;
124121
}
125122

@@ -173,20 +170,6 @@ internal static (HttpMessageHandler Pipeline, FeatureFlag FeatureFlags) CreatePi
173170
throw new ArgumentNullException(nameof(handlers), "DelegatingHandler array contains null item.");
174171
}
175172

176-
#if IOS || MACOS || MACCATALYST
177-
#if IOS || MACCATALYST
178-
// Skip CompressionHandler since NSUrlSessionHandler automatically handles decompression on iOS and macOS and it can't be turned off.
179-
// See issue https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/481 for more details.
180-
if (finalHandler.GetType().Equals(typeof(NSUrlSessionHandler)) && handler.GetType().Equals(typeof(CompressionHandler)))
181-
#elif MACOS
182-
if (finalHandler.GetType().Equals(typeof(Foundation.NSUrlSessionHandler)) && handler.GetType().Equals(typeof(CompressionHandler)))
183-
#endif
184-
{
185-
// Skip chaining of CompressionHandler.
186-
continue;
187-
}
188-
#endif
189-
190173
// Check for duplicate handler by type.
191174
if (!existingHandlerTypes.Add(handler.GetType()))
192175
{
@@ -220,17 +203,17 @@ internal static HttpMessageHandler GetNativePlatformHttpHandler(IWebProxy proxy
220203
#elif MACOS
221204
return new Foundation.NSUrlSessionHandler { AllowAutoRedirect = false };
222205
#elif ANDROID
223-
return new Xamarin.Android.Net.AndroidMessageHandler { Proxy = proxy, AllowAutoRedirect = false, AutomaticDecompression = DecompressionMethods.None };
206+
return new Xamarin.Android.Net.AndroidMessageHandler { Proxy = proxy, AllowAutoRedirect = false, AutomaticDecompression = DecompressionMethods.All };
224207
#elif NETFRAMEWORK
225208
// If custom proxy is passed, the WindowsProxyUsePolicy will need updating
226209
// https://github.com/dotnet/runtime/blob/main/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs#L575
227210
var proxyPolicy = proxy != null ? WindowsProxyUsePolicy.UseCustomProxy : WindowsProxyUsePolicy.UseWinHttpProxy;
228-
return new WinHttpHandler { Proxy = proxy, AutomaticDecompression = DecompressionMethods.None , WindowsProxyUsePolicy = proxyPolicy, SendTimeout = Timeout.InfiniteTimeSpan, ReceiveDataTimeout = Timeout.InfiniteTimeSpan, ReceiveHeadersTimeout = Timeout.InfiniteTimeSpan };
211+
return new WinHttpHandler { Proxy = proxy, AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate , WindowsProxyUsePolicy = proxyPolicy, SendTimeout = Timeout.InfiniteTimeSpan, ReceiveDataTimeout = Timeout.InfiniteTimeSpan, ReceiveHeadersTimeout = Timeout.InfiniteTimeSpan };
229212
#elif NET6_0_OR_GREATER
230213
//use resilient configs when we can https://learn.microsoft.com/en-us/aspnet/core/fundamentals/http-requests?view=aspnetcore-5.0#alternatives-to-ihttpclientfactory-1
231-
return new SocketsHttpHandler { Proxy = proxy, AllowAutoRedirect = false, AutomaticDecompression = DecompressionMethods.None, PooledConnectionLifetime = TimeSpan.FromMinutes(1)};
214+
return new SocketsHttpHandler { Proxy = proxy, AllowAutoRedirect = false, AutomaticDecompression = DecompressionMethods.All, PooledConnectionLifetime = TimeSpan.FromMinutes(1)};
232215
#else
233-
return new HttpClientHandler { Proxy = proxy, AllowAutoRedirect = false, AutomaticDecompression = DecompressionMethods.None };
216+
return new HttpClientHandler { Proxy = proxy, AllowAutoRedirect = false, AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate };
234217
#endif
235218
}
236219

@@ -241,14 +224,16 @@ internal static HttpMessageHandler GetNativePlatformHttpHandler(IWebProxy proxy
241224
/// <returns>Delegating handler feature flag.</returns>
242225
private static FeatureFlag GetHandlerFeatureFlag(DelegatingHandler delegatingHandler)
243226
{
244-
if (delegatingHandler is CompressionHandler)
245-
return FeatureFlag.CompressionHandler;
246-
else if (delegatingHandler is RetryHandler)
247-
return FeatureFlag.RetryHandler;
248-
else if (delegatingHandler is RedirectHandler)
249-
return FeatureFlag.RedirectHandler;
250-
else
251-
return FeatureFlag.None;
227+
return delegatingHandler switch
228+
{
229+
// Type or member is obsolete
230+
#pragma warning disable CS0618 // Type or member is obsolete
231+
CompressionHandler => FeatureFlag.CompressionHandler,
232+
#pragma warning restore CS0618 // Type or member is obsolete
233+
RetryHandler => FeatureFlag.RetryHandler,
234+
RedirectHandler => FeatureFlag.RedirectHandler,
235+
_ => FeatureFlag.None
236+
};
252237
}
253238

254239
private static Uri DetermineBaseAddress(string nationalCloud, string version)

tests/Microsoft.Graph.DotnetCore.Core.Test/Microsoft.Graph.DotnetCore.Core.Test.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
<PackageReference Include="System.Reflection.Emit" Version="4.7.0">
2020
<ExcludeAssets>all</ExcludeAssets>
2121
</PackageReference>
22-
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
22+
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
2323
<PrivateAssets>all</PrivateAssets>
2424
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2525
</PackageReference>
2626
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
2727
<PackageReference Include="Moq" Version="4.20.70" />
28-
<PackageReference Include="xunit" Version="2.8.1" />
28+
<PackageReference Include="xunit" Version="2.9.0" />
2929
<ProjectReference Include="..\..\src\Microsoft.Graph.Core\Microsoft.Graph.Core.csproj" />
3030
</ItemGroup>
3131
<ItemGroup>

0 commit comments

Comments
 (0)