Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Please include a summary of the change and which issue is fixed or feature is introduced.
Checklist:
I checked that Licenses of new dependencies is compliant with our guidelines
I have performed a self-review of my own code
I have added comments in my code to clarify it
I have updated the documentation accordingly
I have added tests that show my fix/feature works
I cleaned the commit history, and they are following the conventional commits pattern, es:
Test scenarios:
Test 1: Official Build Script (64-bit):
PS C:\Users\nravada\newrelic\nri-winservices> .\win_build.ps1 -skipTests -skipExporterCompile
--- Checking dependencies
--- Collecting files
--- Format check
--- Running Build
--- Collecting Go main files
generating winservices
creating nri-winservices.exe
PS C:\Users\nravada\newrelic\nri-winservices> Get-Item "target\bin\windows_amd64\nri-winservices.exe" | Format-Table Name, Length, LastWriteTime -AutoSize
Name Length LastWriteTime
nri-winservices.exe 18683904 12/1/2025 11:37:50 AM
PS C:\Users\nravada\newrelic\nri-winservices> .\target\bin\windows_amd64\nri-winservices.exe -version
integration version: v0.0.0 commit: 14cf858
Test 2: Direct Go Build (64-bit):
PS C:\Users\nravada\newrelic\nri-winservices> go build -o "test_direct_amd64.exe" ./src/
PS C:\Users\nravada\newrelic\nri-winservices> Get-Item "test_direct_amd64.exe" | Format-Table Name, Length, LastWriteTime -AutoSize
Name Length LastWriteTime
test_direct_amd64.exe 18683392 12/1/2025 11:41:28 AM
PS C:\Users\nravada\newrelic\nri-winservices> .\test_direct_amd64.exe -version
integration version: v0.0.0 commit: default
Test 3: Explicit 64-bit Go Build:
PS C:\Users\nravada\newrelic\nri-winservices> $env:GOOS="windows"; $env:GOARCH="amd64"; go build -o "test_explicit_amd64.exe" ./src/; echo "Build completed with exit code: $LASTEXITCODE"
Build completed with exit code: 0
PS C:\Users\nravada\newrelic\nri-winservices> Get-Item "test_explicit_amd64.exe" | Format-Table Name, Length, LastWriteTime -AutoSize
Name Length LastWriteTime
test_explicit_amd64.exe 18683392 12/1/2025 11:42:44 AM
PS C:\Users\nravada\newrelic\nri-winservices> .\test_explicit_amd64.exe -version
integration version: v0.0.0 commit: default
Test 4: Try 32-bit Build with Build Script (Should Fail):
PS C:\Users\nravada\newrelic\nri-winservices> .\win_build.ps1 -arch "386" -skipTests -skipExporterCompile 2>&1 | Select-Object -First 5
C:\Users\nravada\newrelic\nri-winservices\win_build.ps1 : Cannot validate argument on parameter 'arch'.
The argument "386" does not belong to the set "amd64" specified by the ValidateSet attribute. Supply an
argument that is in the set and then try the command again.
At line:1 char:23
Test 5: Try Direct 32-bit Build (Should Fail):
PS C:\Users\nravada\newrelic\nri-winservices> $env:GOOS="windows"; $env:GOARCH="386"; go build -o "test_386_blocked.exe" ./src/ 2>&1 | Select-Object -First 3
go : package github.com/newrelic/nri-winservices/src: build constraints exclude all Go files in
C:\Users\nravada\newrelic\nri-winservices\src
At line:1 char:41
n
PS C:\Users\nravada\newrelic\nri-winservices> Test-Path "test_386_blocked.exe"
False
Test 6: Run Unit Tests (64-bit):
PS C:\Users\nravada\newrelic\nri-winservices> go env GOARCH
arm64
PS C:\Users\nravada\newrelic\nri-winservices> powershell -Command "cd 'C:\Users\nravada\newrelic\nri-winservices'; `$env:GOARCH='amd64'; go test ./src/matcher/ ./src/nri/" 2>&1 | Select-String "PASS|FAIL|ok"
ok github.com/newrelic/nri-winservices/src/matcher 0.412s
ok github.com/newrelic/nri-winservices/src/nri 0.570s
Summary:
Build Method 64-bit (amd64) 32-bit (386)
Official Build Script ✅ Works ❌ Blocked
Direct Go Build ✅ Works ❌ Blocked
Explicit GOARCH ✅ Works ❌ Blocked
Unit Tests ✅ Pass ❌ Blocked