Skip to content

Fix Go generation for nullable UUID path parameters - #8208

Merged
Vincent Biret (baywet) merged 2 commits into
mainfrom
copilot/investigate-integration-test-failure
Sep 16, 2026
Merged

Vincent Biret (baywet) merged 2 commits into
mainfrom
copilot/investigate-integration-test-failure

Conversation

Copilot AI commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

bug uncovered by these changes microsoftgraph/msgraph-metadata#1209

Recent Dependabot PRs exposed a Graph beta metadata update that added Edm.Guid getByUser overloads under storage.fileStorage. Go generation emitted invalid pointer dereferencing for nullable UUID path parameters.

  • Go writer
    • Parenthesize dereferenced Guid / UUID pointer values before calling String().
    • Preserve existing output for non-pointer UUID values.
// before
m.BaseRequestBuilder.PathParameters["userObjectId"] = *userObjectId.String()

// after
m.BaseRequestBuilder.PathParameters["userObjectId"] = (*userObjectId).String()
  • Regression coverage
    • Added a Go convention test for nullable UUID path parameter assignment.
    • Keeps coverage for escaped path parameter names at the emission site.

Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
@baywet
Vincent Biret (baywet) marked this pull request as ready for review September 16, 2026 10:37
@baywet
Vincent Biret (baywet) requested a review from a team as a code owner September 16, 2026 10:37
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for opening this pull request! Please add a changelog entry under ## [Unreleased] in CHANGELOG.md, before the first released version section, so users can see what changed. Add bug fixes under ### Changed and new features under ### Added.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The fix is covered by regression tests with no unresolved blocking issues.

Pull request overview

Fixes invalid Go generation for nullable UUID path parameters.

Changes:

  • Parenthesizes dereferenced UUID values before calling String().
  • Adds regression coverage, including escaped parameter names.
File summaries
File Description
tests/Kiota.Builder.Tests/Writers/Go/GoConventionServiceTests.cs Adds regression assertions for generated output.
src/Kiota.Builder/Writers/Go/GoConventionService.cs Corrects nullable UUID pointer conversion.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-code-quality

github-code-quality Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: C#

C# / code-coverage/dotnet

The overall line coverage in commit 7be99cc in the copilot/investigate-... branch is 32%. Line coverage data for the main branch is not yet available.

Show a line coverage summary of the most covered files.
File main copilot/investigate-... 7be99cc +/-
/home/runner/wo...guageRefiner.cs — 98% —
/home/runner/wo...criptRefiner.cs — 98% —
/home/runner/wo...MethodWriter.cs — 98% —
/home/runner/wo...MethodWriter.cs — 97% —
/home/runner/wo...rs/GoRefiner.cs — 97% —
/home/runner/wo...MethodWriter.cs — 96% —
/home/runner/wo...MethodWriter.cs — 95% —
/home/runner/wo...KiotaBuilder.cs — 93% —
/home/runner/wo...ationService.cs — 89% —
/home/runner/wo...MethodWriter.cs — 89% —

Updated September 16, 2026 11:39 UTC

@baywet

Copy link
Copy Markdown
Member

Copilot add a changelog entry under unreleased changed section

Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>

Copilot AI commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

Copilot add a changelog entry under unreleased changed section

Added the Unreleased Changed changelog entry in commit 7be99cc.

@github-project-automation github-project-automation Bot moved this to In Progress 🚧 in Kiota Sep 16, 2026
@baywet
Vincent Biret (baywet) added this pull request to the merge queue Sep 16, 2026
Merged via the queue into main with commit 7c1cf8d Sep 16, 2026
317 checks passed
@baywet
Vincent Biret (baywet) deleted the copilot/investigate-integration-test-failure branch September 16, 2026 16:20
@github-project-automation github-project-automation Bot moved this from In Progress 🚧 to Done ✔️ in Kiota Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants