Skip to content

Commit

Permalink
Merge branch 'main' into users/merlinbot/1es-pt-auto-baselining-pr
Browse files Browse the repository at this point in the history
  • Loading branch information
andrueastman authored Feb 6, 2025
2 parents f432842 + e15fc32 commit da9bfb2
Show file tree
Hide file tree
Showing 58 changed files with 1,669 additions and 290 deletions.
40 changes: 20 additions & 20 deletions .azure-pipelines/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ extends:
- stage: build
jobs:
- job: build
templateContext:
outputs:
- output: pipelineArtifact
displayName: 'Publish Microsoft.Kiota.*.nupkg and release pipeline scripts'
artifactName: ArtifactsForRelease
targetPath: $(Build.ArtifactStagingDirectory)
steps:

- task: UseDotNet@2 # needed for ESRP sign
Expand All @@ -42,9 +48,9 @@ extends:
version: 6.x

- task: UseDotNet@2
displayName: 'Use .NET 8'
displayName: 'Use .NET 9'
inputs:
version: 8.x
version: 9.x

- task: PowerShell@2
displayName: 'Enable signing'
Expand Down Expand Up @@ -84,7 +90,7 @@ extends:
inputs:
command: test
projects: '$(Build.SourcesDirectory)\Microsoft.Kiota.sln'
arguments: '--configuration $(BuildConfiguration) --no-build --framework net8.0'
arguments: '--configuration $(BuildConfiguration) --no-build --framework net9.0'

- task: EsrpCodeSigning@5
displayName: 'ESRP DLL Strong Name'
Expand Down Expand Up @@ -226,19 +232,20 @@ extends:
Contents: 'scripts\**'
TargetFolder: '$(Build.ArtifactStagingDirectory)'

- task: 1ES.PublishPipelineArtifact@1
displayName: 'Upload Artifact: Nugets'
inputs:
artifactName: Nugets
targetPath: $(Build.ArtifactStagingDirectory)

- stage: deploy
condition: and(contains(variables['build.sourceBranch'], 'refs/heads/main'), succeeded())
dependsOn: build
jobs:
- deployment: deploy_dotnet_kiota_libs
dependsOn: []
environment: nuget-org
templateContext:
type: releaseJob
isProduction: true
inputs:
- input: pipelineArtifact
artifactName: ArtifactsForRelease
targetPath: $(Pipeline.Workspace)
strategy:
runOnce:
deploy:
Expand All @@ -251,11 +258,6 @@ extends:
inputs:
versionSpec: '>=6.11.0'
checkLatest: true
- task: DownloadPipelineArtifact@2
displayName: Download nupkg from artifacts
inputs:
artifact: Nugets
source: current
- task: PowerShell@2
displayName: 'Extract release information to pipeline'
inputs:
Expand All @@ -276,13 +278,11 @@ extends:
inputs:
gitHubConnection: 'Kiota_Release'
target: $(Build.SourceVersion)
tagSource: userSpecifiedTag
repositoryName: '$(Build.Repository.Name)'
action: edit
tag: 'v$(VERSION_STRING)'
title: '$(VERSION_STRING)'
releaseNotesSource: inline
addChangeLog: false
assetUploadMode: replace
assets: |
!**/**
$(Pipeline.Workspace)/Microsoft.Kiota.*.*nupkg
changeLogType: issueBased
isPreRelease : '$(IS_PRE_RELEASE)'
addChangeLog : true
36 changes: 36 additions & 0 deletions .github/policies/kiota-dotnet-branch-protection.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: kiota-dotnet-branch-protection
description: Branch protection policy for the kiota-dotnet repository
resource: repository
configuration:
branchProtectionRules:
- branchNamePattern: main
# Specifies whether this branch can be deleted. boolean
allowsDeletions: false
# Specifies whether forced pushes are allowed on this branch. boolean
allowsForcePushes: false
# Specifies whether new commits pushed to the matching branches dismiss pull request review approvals. boolean
dismissStaleReviews: true
# Specifies whether admins can overwrite branch protection. boolean
isAdminEnforced: false
# Indicates whether "Require a pull request before merging" is enabled. boolean
requiresPullRequestBeforeMerging: true
# Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required
requiredApprovingReviewsCount: 1
# Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean
requireCodeOwnersReview: true
# Are commits required to be signed. boolean.
requiresCommitSignatures: false
# Are conversations required to be resolved before merging? boolean
requiresConversationResolution: true
# Are merge commits prohibited from being pushed to this branch. boolean
requiresLinearHistory: false
# Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status
requiredStatusChecks:
- license/cla
- build-and-test
# Require branches to be up to date before merging
requiresStrictStatusChecks: true
# Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush.
restrictsPushes: false
# Restrict who can dismiss pull request reviews. boolean
restrictsReviewDismissals: false
3 changes: 3 additions & 0 deletions .github/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
manifest: true
primaryBranch: main
handleGHRelease: true
2 changes: 1 addition & 1 deletion .github/workflows/auto-merge-dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2.2.0
uses: dependabot/fetch-metadata@v2.3.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
dotnet-version: 9.x
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
Expand All @@ -35,7 +35,7 @@ jobs:
run: dotnet build ${{ env.solutionName }} --no-restore /p:UseSharedCompilation=false
- name: Test for net462
run: dotnet test ${{ env.solutionName }} --no-build --verbosity normal --framework net462
- name: Test for net8.0 and collect coverage
run: dotnet test ${{ env.solutionName }} --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=opencover --framework net8.0
- name: Test for net9.0 and collect coverage
run: dotnet test ${{ env.solutionName }} --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=opencover --framework net9.0
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
6 changes: 3 additions & 3 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
with: # At the moment the scanner requires dotnet 5 https://www.nuget.org/packages/dotnet-sonarscanner
dotnet-version: |
5.x
8.x
9.x
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
Expand All @@ -62,8 +62,8 @@ jobs:
CoverletOutputFormat: "opencover" # https://github.com/microsoft/vstest/issues/4014#issuecomment-1307913682
shell: pwsh
run: |
dotnet tool run dotnet-sonarscanner begin /k:"microsoft_kiota-abstractions-dotnet" /o:"microsoft" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="tests/abstractions/coverage.net8.0.opencover.xml,tests/authentication/azure/coverage.net8.0.opencover.xml,tests/http/httpClient/coverage.net8.0.opencover.xml,tests/serialization/json/coverage.net8.0.opencover.xml,tests/serialization/text/coverage.net8.0.opencover.xml,tests/serialization/form/coverage.net8.0.opencover.xml,tests/serialization/multipart/coverage.net8.0.opencover.xml,tests/bundle/coverage.net8.0.opencover.xml"
dotnet tool run dotnet-sonarscanner begin /k:"microsoft_kiota-abstractions-dotnet" /o:"microsoft" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="tests/abstractions/coverage.net9.0.opencover.xml,tests/authentication/azure/coverage.net9.0.opencover.xml,tests/http/httpClient/coverage.net9.0.opencover.xml,tests/serialization/json/coverage.net9.0.opencover.xml,tests/serialization/text/coverage.net9.0.opencover.xml,tests/serialization/form/coverage.net9.0.opencover.xml,tests/serialization/multipart/coverage.net9.0.opencover.xml,tests/bundle/coverage.net9.0.opencover.xml"
dotnet workload restore
dotnet build
dotnet test Microsoft.Kiota.sln --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover --framework net8.0
dotnet test Microsoft.Kiota.sln --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover --framework net9.0
dotnet tool run dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.17.0"
}
84 changes: 83 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,91 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [1.17.0](https://github.com/microsoft/kiota-dotnet/compare/v1.16.4...v1.17.0) (2025-02-06)


### Features

* Add trim-safe handler lookup ([cd2520f](https://github.com/microsoft/kiota-dotnet/commit/cd2520f931a8d4ea82f5c7e279abcc9f2d96ccf7))
* Add trim-safe handler lookup ([a2800ab](https://github.com/microsoft/kiota-dotnet/commit/a2800ab7c9bfa0292b8490b91962636917fa8c4c))

## [1.16.4](https://github.com/microsoft/kiota-dotnet/compare/v1.16.3...v1.16.4) (2025-01-15)


### Bug Fixes

* browser/wasm message handler being returned was incompatible ([fa0c59e](https://github.com/microsoft/kiota-dotnet/commit/fa0c59e3bffdd868e00381148e6f674eaf035524))
* browser/wasm message handler being returned was incompatible ([aaf4ced](https://github.com/microsoft/kiota-dotnet/commit/aaf4ced980c7368cc4854a91a4b9bef2c78093ef))
* removes message handler properties that don't exist for browser ([45a41a9](https://github.com/microsoft/kiota-dotnet/commit/45a41a9679b3f8cd0badeffbbe7ad4450f825dc6))

## [1.16.3](https://github.com/microsoft/kiota-dotnet/compare/v1.16.2...v1.16.3) (2025-01-07)


### Bug Fixes

* removes bom from encoding ([7ef6862](https://github.com/microsoft/kiota-dotnet/commit/7ef6862e76a08b59fdc4ce9d3240d21ac4f33114))

## [1.16.2] - 2024-01-07

- Fixed inspecting of response body when response http content is not buffered. [#501](https://github.com/microsoft/kiota-dotnet/issues/501)
- Fixed a misalignment in return nullability for IParseNode GetObjectValue. [#429](https://github.com/microsoft/kiota-dotnet/issues/429)

## [1.16.1] - 2024-12-18

### Changed

- Aligned retry open telemetry attributes names with latest specification. [#324](https://github.com/microsoft/kiota-dotnet/issues/324)
- Fixed a bug where the client would fail on 301/302 responses with no location headers. [#272](https://github.com/microsoft/kiota-dotnet/issues/272)

## [1.16.0] - 2024-12-13

### Added

- Added body inspection handler to enable inspection of request and response bodies. [#482](https://github.com/microsoft/kiota-dotnet/issues/482)

## [1.15.2] - 2024-11-13

### Changed

- Fixed an issue where System.Diagnostics.DiagnosticSource would be locked version < 9.0.

## [1.15.1] - 2024-11-13

### Added

- Fixes serialization collections of primitives present in additional data. [microsoftgraph/msgraph-sdk-dotnet#2729](https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/2729)

## [1.15.0] - 2024-11-13

### Added

- Added support for `net9.0`.

## [1.14.0] - 2024-11-06

### Added

- Added `AuthorizationHandler` to authenticate requests and `GraphClientFactory.create(authProvider)` to instantiate
an HttpClient with the built-in Authorization Handler.

## [1.13.2] - 2024-10-28

### Changed

- Added Non-Generic Solution to KiotaDeserialization helper method. [#436](https://github.com/microsoft/kiota-dotnet/pull/436)

## [1.13.1] - 2024-10-10

### Changed

- Updated HTTP span attributes to comply with updated OpenTelemetry semantic conventions. [#344](https://github.com/microsoft/kiota-dotnet/issues/344)

## [1.13.0] - 2024-09-25

### Changed

- Adds extension methods for make serializing easier [#338](https://github.com/microsoft/kiota-dotnet/issues/338).

## [1.12.4] - 2024-09-05

### Changed
Expand Down
58 changes: 58 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Contributing to Kiota Dotnet

Kiota Dotnet is a mono-repo containing source code for the following packages:

## Libraries

| Library | NuGet Release |
|----------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Abstractions](./src/abstractions/README.md) | [![NuGet Version](https://img.shields.io/nuget/vpre/Microsoft.Kiota.Abstractions?label=Latest&logo=nuget)](https://www.nuget.org/packages/Microsoft.Kiota.Abstractions/) |
| [Authentication - Azure](./src/authentication/azure/README.md) | [![NuGet Version](https://img.shields.io/nuget/vpre/Microsoft.Kiota.Authentication.Azure?label=Latest&logo=nuget)](https://www.nuget.org/packages/Microsoft.Kiota.Authentication.Azure/) |
| [Http - HttpClientLibrary](./src/http/httpClient/README.md) | [![NuGet Version](https://img.shields.io/nuget/vpre/Microsoft.Kiota.Http.HttpClientLibrary?label=Latest&logo=nuget)](https://www.nuget.org/packages/Microsoft.Kiota.Http.HttpClientLibrary/) |
| [Serialization - JSON](./src/serialization/json/README.md) | [![NuGet Version](https://img.shields.io/nuget/vpre/Microsoft.Kiota.Serialization.Json?label=Latest&logo=nuget)](https://www.nuget.org/packages/Microsoft.Kiota.Serialization.Json/) |
| [Serialization - FORM](./src/serialization/form/README.md) | [![NuGet Version](https://img.shields.io/nuget/vpre/Microsoft.Kiota.Serialization.Form?label=Latest&logo=nuget)](https://www.nuget.org/packages/Microsoft.Kiota.Serialization.Form/) |
| [Serialization - TEXT](./src/serialization/text/README.md) | [![NuGet Version](https://img.shields.io/nuget/vpre/Microsoft.Kiota.Serialization.Text?label=Latest&logo=nuget)](https://www.nuget.org/packages/Microsoft.Kiota.Serialization.Text/) |
| [Serialization - MULTIPART](./src/serialization/multipart/README.md) | [![NuGet Version](https://img.shields.io/nuget/vpre/Microsoft.Kiota.Serialization.Multipart?label=Latest&logo=nuget)](https://www.nuget.org/packages/Microsoft.Kiota.Serialization.Multipart/) |
| [Bundle](./src/bundle/README.md) | [![NuGet Version](https://img.shields.io/nuget/vpre/Microsoft.Kiota.Bundle?label=Latest&logo=nuget)](https://www.nuget.org/packages/Microsoft.Kiota.Bundle/) |


Kiota Dotnet is open to contributions. There are a couple of different recommended paths to get contributions into the released version of this library.

__NOTE__ A signed a contribution license agreement is required for all contributions, and is checked automatically on new pull requests. Please read and sign [the agreement](https://cla.microsoft.com/) before starting any work for this repository.

## File issues

The best way to get started with a contribution is to start a dialog with the owners of this repository. Sometimes features will be under development or out of scope for this SDK and it's best to check before starting work on contribution. Discussions on bugs and potential fixes could point you to the write change to make.

## Submit pull requests for bug fixes and features

Feel free to submit a pull request with a linked issue against the __main__ branch. The main branch will be updated frequently.
## Commit message format

To support our automated release process, pull requests are required to follow the [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/)
format.
Each commit message consists of a __header__, an optional __body__ and an optional __footer__. The header is the first line of the commit and
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.

```
<type>[optional scope]: <short description>
<BLANK LINE>
<optional body>
<BLANK LINE>
<optional footer(s)>
```

The recommended commit types used are:

- __feat__ for feature updates (increments the _minor_ version)
- __fix__ for bug fixes (increments the _patch_ version)
- __perf__ for performance related changes e.g. optimizing an algorithm
- __refactor__ for code refactoring changes
- __test__ for test suite updates e.g. adding a test or fixing a test
- __style__ for changes that don't affect the meaning of code. e.g. formatting changes
- __docs__ for documentation updates e.g. ReadMe update or code documentation updates
- __build__ for build system changes (gradle updates, external dependency updates)
- __ci__ for CI configuration file changes e.g. updating a pipeline
- __chore__ for miscallaneous non-sdk changesin the repo e.g. removing an unused file

Adding an exclamation mark after the commit type (`feat!`) or footer with the prefix __BREAKING CHANGE:__ will cause an increment of the _major_ version.
10 changes: 8 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project>
<!-- Common default project properties for ALL projects-->
<PropertyGroup>
<VersionPrefix>1.12.4</VersionPrefix>
<VersionSuffix></VersionSuffix>
<VersionPrefix>1.17.0</VersionPrefix>
<VersionSuffix/>
<!-- This is overidden in test projects by setting to true-->
<IsTestProject>false</IsTestProject>
<!-- This is overidden in test projects by setting to true-->
Expand All @@ -17,4 +17,10 @@
<IsPackable>false</IsPackable>
<OutputType>Library</OutputType>
</PropertyGroup>
<ItemGroup>
<!-- The target application is the one which will resolve the correct version.
When the version range is updated to > 8.0.4 in the future, remove the GHSA suppression -->
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-hh2w-p6rv-4g7w"/>
<NuGetAuditSuppress Include="https://github.com/advisories/GHSA-8g4q-xg66-9fp4"/>
</ItemGroup>
</Project>
6 changes: 6 additions & 0 deletions Microsoft.Kiota.lutconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<LUTConfig Version="1.0">
<Repository />
<ParallelBuilds>true</ParallelBuilds>
<ParallelTestRuns>true</ParallelTestRuns>
<TestCaseTimeout>180000</TestCaseTimeout>
</LUTConfig>
Loading

0 comments on commit da9bfb2

Please sign in to comment.