Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .azuredevops/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: 2
# Disabling dependabot on Azure DevOps as this is a mirrored repo. Updates should go through github.
enable-campaigned-updates: false
enable-security-updates: false
version: 2

# Disabling dependabot on Azure DevOps as this is a mirrored repo. Updates should go through github.
enable-campaigned-updates: false
enable-security-updates: false
28 changes: 14 additions & 14 deletions SUPPORT.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Support
This repository is only intended for use with the Microsoft build of Go infrastructure.
Please let us know if you find it useful for a different purpose!
## How to file issues and get help
This project uses GitHub Issues to track bugs, feature requests, and questions.
Please search the existing issues before filing new issues to avoid duplicates.
For new issues, file your bug or feature request as a new Issue.
## Microsoft Support Policy
Support for this project is limited to the resources listed above.
# Support

This repository is only intended for use with the Microsoft build of Go infrastructure.
Please let us know if you find it useful for a different purpose!

## How to file issues and get help

This project uses GitHub Issues to track bugs, feature requests, and questions.
Please search the existing issues before filing new issues to avoid duplicates.
For new issues, file your bug or feature request as a new Issue.

## Microsoft Support Policy

Support for this project is limited to the resources listed above.
25 changes: 25 additions & 0 deletions buildmodel/buildassets/buildassets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
package buildassets

import (
"bytes"
"encoding/json"
"errors"
"os"
Expand Down Expand Up @@ -47,6 +48,11 @@ func TestBuildResultsDirectoryInfo_GoldenCreateSummary(t *testing.T) {
t.Fatal(err)
}
} else {
// Ensure the manifest test data keeps its real-world format: UTF-16 LE with CRLF.
// This matters because the code parses this encoding in production, so it's
// important that tests exercise it. If this check fails, restore the file from
// source control rather than changing this check.
checkManifestIsUTF16LECRLF(t, destManifestPath)
b.DestinationManifest = destManifestPath
}

Expand Down Expand Up @@ -115,3 +121,22 @@ func tempExtractTxtar(t *testing.T, path string) (outDir string, ok bool) {
}
return td, true
}

// checkManifestIsUTF16LECRLF checks that path is a UTF-16 LE file (starts with BOM) that contains
// at least one CRLF sequence in UTF-16 LE encoding. These manifest files are real-world test data
// produced by pipeline tooling, and the code must handle this encoding in production.
func checkManifestIsUTF16LECRLF(t *testing.T, path string) {
t.Helper()
content, err := os.ReadFile(path)
if err != nil {
t.Fatalf("unable to read manifest file %q: %v", path, err)
}
utf16LEBOM := []byte{0xFF, 0xFE}
if !bytes.HasPrefix(content, utf16LEBOM) {
t.Errorf("manifest test data %q must start with UTF-16 LE BOM (FF FE); restore the file from source control", path)
}
utf16LECRLF := []byte{0x0D, 0x00, 0x0A, 0x00}
if !bytes.Contains(content, utf16LECRLF) {
t.Errorf("manifest test data %q must contain UTF-16 LE CRLF sequences (0D 00 0A 00); restore the file from source control", path)
}
}
4 changes: 4 additions & 0 deletions buildmodel/buildassets/testdata/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# These manifest JSON files are real-world test data that the program parses in production.
# They use UTF-16 LE encoding with CRLF line endings as produced by the pipeline tooling.
# Keep them in their original format to ensure the parser handles this encoding correctly.
*/msGo.output.manifest.json -text
Binary file modified buildmodel/publishmanifest/testdata/msGo.output.manifest.json
Binary file not shown.
Loading